diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2006-12-04 11:16:12 +0000 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2006-12-04 12:16:12 +0100 |
commit | 98bbe5ee70747aff4449f719a0b3f00a9b72d5b0 (patch) | |
tree | 145d253b5815ed37a21759852507374e98f2f254 /gcc/fortran/expr.c | |
parent | aad741f435aac46420c6294df03e0f78ee177747 (diff) | |
download | gcc-98bbe5ee70747aff4449f719a0b3f00a9b72d5b0.zip gcc-98bbe5ee70747aff4449f719a0b3f00a9b72d5b0.tar.gz gcc-98bbe5ee70747aff4449f719a0b3f00a9b72d5b0.tar.bz2 |
re PR fortran/29916 ([4.1 only] Dimension of a function result as host association does not work)
fortran/
2006-12-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29916
* resolve.c (resolve_symbol): Allow host-associated variables
in the specification expression of an array-valued function.
* expr.c (check_restricted): Accept host-associated dummy
array indices.
testsuite/
2006-12-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29916
* gfortran.dg/host_dummy_index_1.f90: Added additional test.
From-SVN: r119489
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 304d7c1..16e89f8 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -2047,14 +2047,15 @@ check_restricted (gfc_expr * e) /* gfc_is_formal_arg broadcasts that a formal argument list is being processed in resolve.c(resolve_formal_arglist). This is done so that host associated - dummy array indices are accepted (PR23446). */ + dummy array indices are accepted (PR23446). This mechanism also does the + same for the specification expressions of array-valued functions. */ if (sym->attr.in_common || sym->attr.use_assoc || sym->attr.dummy || sym->ns != gfc_current_ns || (sym->ns->proc_name != NULL && sym->ns->proc_name->attr.flavor == FL_MODULE) - || gfc_is_formal_arg ()) + || (gfc_is_formal_arg () && (sym->ns == gfc_current_ns))) { t = SUCCESS; break; |