summaryrefslogtreecommitdiffstats
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-04 11:16:12 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-04 11:16:12 +0000
commite49f4c1fa1154acb8f4366a0f0e6142d9bd38a77 (patch)
tree145d253b5815ed37a21759852507374e98f2f254 /gcc/fortran/expr.c
parent72a430e4dd7cfa5d104dfc1eb9f76c988bd83b0e (diff)
downloadppe42-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/expr.c')
-rw-r--r--gcc/fortran/expr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 304d7c1f00d..16e89f85c26 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;
OpenPOWER on IntegriCloud