aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2016-07-12 16:42:57 +0000
committerMartin Jambor <mjambor@suse.cz>2016-07-12 16:42:57 +0000
commit28b8dcee563068144d128dd80f632a76eadf166e (patch)
tree08a2ad27918bdea8c42cff29e35d1d6ba2bf142f /gcc/fortran/expr.c
parentab9b316a08275b1c14ea16dfc07d712bd2418124 (diff)
Merged trunk revision 238207 into the hsa branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/hsa@238255 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index d1258cdf380..7328898f2b6 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -4428,6 +4428,23 @@ gfc_ref_this_image (gfc_ref *ref)
return true;
}
+gfc_expr *
+gfc_find_stat_co(gfc_expr *e)
+{
+ gfc_ref *ref;
+
+ for (ref = e->ref; ref; ref = ref->next)
+ if (ref->type == REF_ARRAY && ref->u.ar.codimen > 0)
+ return ref->u.ar.stat;
+
+ if(e->value.function.actual->expr)
+ for(ref = e->value.function.actual->expr->ref; ref;
+ ref = ref->next)
+ if (ref->type == REF_ARRAY && ref->u.ar.codimen > 0)
+ return ref->u.ar.stat;
+
+ return NULL;
+}
bool
gfc_is_coindexed (gfc_expr *e)