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/match.c | |
parent | 7831434fbfa750c69867348177e82c752cd69fc0 (diff) | |
download | gcc-22061030a7395524b390bf0cc7382802586cfd53.zip gcc-22061030a7395524b390bf0cc7382802586cfd53.tar.gz gcc-22061030a7395524b390bf0cc7382802586cfd53.tar.bz2 |
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/match.c')
-rw-r--r-- | gcc/fortran/match.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 44da1bb..a74fdb7 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -2956,7 +2956,7 @@ gfc_match_allocate (void) b1 = !(tail->expr->ref && (tail->expr->ref->type == REF_COMPONENT || tail->expr->ref->type == REF_ARRAY)); - if (sym && sym->ts.type == BT_CLASS) + if (sym && sym->ts.type == BT_CLASS && sym->attr.class_ok) b2 = !(CLASS_DATA (sym)->attr.allocatable || CLASS_DATA (sym)->attr.class_pointer); else |