diff options
author | Tobias Burnus <burnus@net-b.de> | 2011-07-23 00:39:10 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2011-07-23 00:39:10 +0200 |
commit | efc694a70a411f4399c71c715afaa22b10edac75 (patch) | |
tree | 46400e4f1cc98b9ae152afccca2b060c049d14ad /gcc/fortran/resolve.c | |
parent | eda42c4f3c1d39590277fb33309e95af8baf8062 (diff) | |
download | gcc-efc694a70a411f4399c71c715afaa22b10edac75.zip gcc-efc694a70a411f4399c71c715afaa22b10edac75.tar.gz gcc-efc694a70a411f4399c71c715afaa22b10edac75.tar.bz2 |
resolve.c (resolve_symbol): Fix coarray var decl check.
2011-07-23 Tobias Burnus <burnus@net-b.de>
* resolve.c (resolve_symbol): Fix coarray var decl check.
2011-07-23 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/coarray_25.f90: New.
From-SVN: r176660
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 71e0ba0..e9e7bf0 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -12435,16 +12435,14 @@ resolve_symbol (gfc_symbol *sym) sym->name, &sym->declared_at); /* F2008, C526. The function-result case was handled above. */ - if (((sym->ts.type == BT_DERIVED && sym->ts.u.derived->attr.coarray_comp) - || sym->attr.codimension) + if (sym->attr.codimension && !(sym->attr.allocatable || sym->attr.dummy || sym->attr.save || sym->ns->save_all || sym->ns->proc_name->attr.flavor == FL_MODULE || sym->ns->proc_name->attr.is_main_program || sym->attr.function || sym->attr.result || sym->attr.use_assoc)) - gfc_error ("Variable '%s' at %L is a coarray or has a coarray " - "component and is not ALLOCATABLE, SAVE nor a " - "dummy argument", sym->name, &sym->declared_at); + gfc_error ("Variable '%s' at %L is a coarray and is not ALLOCATABLE, SAVE " + "nor a dummy argument", sym->name, &sym->declared_at); /* F2008, C528. */ /* FIXME: sym->as check due to PR 43412. */ else if (sym->attr.codimension && !sym->attr.allocatable && sym->as && sym->as->cotype == AS_DEFERRED) |