diff options
author | Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> | 2016-07-05 09:33:06 -0600 |
---|---|---|
committer | Alessandro Fanfarillo <afanfa@gcc.gnu.org> | 2016-07-05 09:33:06 -0600 |
commit | 20d0bfcefd6caf09c23113732edd98241a46af56 (patch) | |
tree | ec27aaef1b5d3d90fcdc003d50d5ed2169894af8 /gcc/fortran/expr.c | |
parent | 1174b21b388ba06e8cebfaa2d0a4cc7a026475ad (diff) | |
download | gcc-20d0bfcefd6caf09c23113732edd98241a46af56.zip gcc-20d0bfcefd6caf09c23113732edd98241a46af56.tar.gz gcc-20d0bfcefd6caf09c23113732edd98241a46af56.tar.bz2 |
Second review of STAT= patch + tests
From-SVN: r238007
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index d1258cd..7328898 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) |