diff options
author | Janus Weil <janus@gcc.gnu.org> | 2010-12-30 12:53:35 +0100 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2010-12-30 12:53:35 +0100 |
commit | 22061030a7395524b390bf0cc7382802586cfd53 (patch) | |
tree | bef3e9e1852e6cf04b23e16f4eb7ab3a68eaed6e /gcc/fortran/primary.c | |
parent | 7831434fbfa750c69867348177e82c752cd69fc0 (diff) | |
download | gcc-22061030a7395524b390bf0cc7382802586cfd53.tar.gz |
re PR fortran/47085 ([OOP] Problem in allocate( SOURCE=) for polymorphic component)
2010-12-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/47085
* match.c (gfc_match_allocate): Check for 'class_ok'.
* primary.c (gfc_match_varspec): Ditto.
2010-12-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/47085
* gfortran.dg/allocate_class_1.f90: New.
From-SVN: r168340
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index da028b42df8..ed85398357a 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -1774,7 +1774,8 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag, && !gfc_is_proc_ptr_comp (primary, NULL) && !(gfc_matching_procptr_assignment && sym->attr.flavor == FL_PROCEDURE)) - || (sym->ts.type == BT_CLASS && CLASS_DATA (sym)->attr.dimension)) + || (sym->ts.type == BT_CLASS && sym->attr.class_ok + && CLASS_DATA (sym)->attr.dimension)) { /* In EQUIVALENCE, we don't know yet whether we are seeing an array, character variable or array of character |