diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-04 11:16:12 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-04 11:16:12 +0000 |
commit | e49f4c1fa1154acb8f4366a0f0e6142d9bd38a77 (patch) | |
tree | 145d253b5815ed37a21759852507374e98f2f254 /gcc/fortran/resolve.c | |
parent | 72a430e4dd7cfa5d104dfc1eb9f76c988bd83b0e (diff) | |
download | ppe42-gcc-e49f4c1fa1154acb8f4366a0f0e6142d9bd38a77.tar.gz ppe42-gcc-e49f4c1fa1154acb8f4366a0f0e6142d9bd38a77.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119489 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index d682b223b45..75a6ca31b8f 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -6043,8 +6043,17 @@ resolve_symbol (gfc_symbol * sym) on COMMON blocks. */ check_constant = sym->attr.in_common && !sym->attr.pointer; + + /* Set the formal_arg_flag so that check_conflict will not throw + an error for host associated variables in the specification + expression for an array_valued function. */ + if (sym->attr.function && sym->as) + formal_arg_flag = 1; + gfc_resolve_array_spec (sym->as, check_constant); + formal_arg_flag = 0; + /* Resolve formal namespaces. */ if (formal_ns_flag && sym != NULL && sym->formal_ns != NULL) |