diff options
author | Tobias Burnus <burnus@net-b.de> | 2010-12-11 23:04:06 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2010-12-11 23:04:06 +0100 |
commit | a70de21ffba9c1c8b4c5096bf9faf3deeb054c76 (patch) | |
tree | 8646350dc5a6c869ac5b7a700195ae944f31614a /gcc/fortran/primary.c | |
parent | 1dbe5c7838f306d8867802fa6e394d0fa5e1bf86 (diff) | |
download | gcc-a70de21ffba9c1c8b4c5096bf9faf3deeb054c76.zip gcc-a70de21ffba9c1c8b4c5096bf9faf3deeb054c76.tar.gz gcc-a70de21ffba9c1c8b4c5096bf9faf3deeb054c76.tar.bz2 |
re PR fortran/46370 ([Coarray] [OOP] ALLOCATE: Error allocating CLASS coarrays)
2010-12-11 Tobias Burnus <burnus@net-b.de>
PR fortran/46370
* primary.c (gfc_match_varspec): Pass information about
* codimension
to gfc_match_array_ref also for BT_CLASS.
* resolve.c (resolve_procedure): Correct check for C612.
2010-12-11 Tobias Burnus <burnus@net-b.de>
PR fortran/46370
* gfortran.dg/coarray_14.f90: New.
From-SVN: r167715
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 9632d1c..1ec677b 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -1783,7 +1783,11 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag, tail->type = REF_ARRAY; m = gfc_match_array_ref (&tail->u.ar, equiv_flag ? NULL : sym->as, - equiv_flag, sym->as ? sym->as->corank : 0); + equiv_flag, + sym->ts.type == BT_CLASS + ? (CLASS_DATA (sym)->as + ? CLASS_DATA (sym)->as->corank : 0) + : (sym->as ? sym->as->corank : 0)); if (m != MATCH_YES) return m; |