aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2013-12-07 20:27:19 +0100
committerJanus Weil <janus@gcc.gnu.org>2013-12-07 20:27:19 +0100
commit36ad06d23a2d7ca558691047fe54da18b078be8d (patch)
tree9199b10cb402263529d385cb37fefb5c266e0532 /gcc/fortran
parentef43c728f385bd9e647378593aeb9f3e714a6dec (diff)
downloadgcc-36ad06d23a2d7ca558691047fe54da18b078be8d.zip
gcc-36ad06d23a2d7ca558691047fe54da18b078be8d.tar.gz
gcc-36ad06d23a2d7ca558691047fe54da18b078be8d.tar.bz2
re PR fortran/59414 ([OOP] ICE in in gfc_conv_expr_descriptor on ALLOCATE inside SELECT TYPE)
2013-12-07 Janus Weil <janus@gcc.gnu.org> PR fortran/59414 * resolve.c (resolve_specific_f0): Handle CLASS-valued functions. 2013-12-07 Janus Weil <janus@gcc.gnu.org> PR fortran/59414 * gfortran.dg/class_result_2.f90: New. From-SVN: r205785
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/resolve.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index bad7d6b..4be8725 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-07 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/59414
+ * resolve.c (resolve_specific_f0): Handle CLASS-valued functions.
+
2013-12-04 Tobias Burnus <burnus@net-b.de>
PR debug/37132
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index d16347d..5ed7053 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -2616,7 +2616,9 @@ found:
expr->ts = sym->ts;
expr->value.function.name = sym->name;
expr->value.function.esym = sym;
- if (sym->as != NULL)
+ if (sym->ts.type == BT_CLASS && CLASS_DATA (sym)->as)
+ expr->rank = CLASS_DATA (sym)->as->rank;
+ else if (sym->as != NULL)
expr->rank = sym->as->rank;
return MATCH_YES;