aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorDamian Rouson <damian@sourceryinstitute.org>2018-01-26 20:14:09 +0000
committerAlessandro Fanfarillo <afanfa@gcc.gnu.org>2018-01-26 13:14:09 -0700
commitf8862a1b2afad9d107ad505de2bf554705ebdb38 (patch)
tree77fadaa9edcf35dc620e4fc70fd49c750295acd5 /gcc/fortran/expr.c
parentdeece1aa0135de487e7846025efbc8f6cd79ffe2 (diff)
downloadgcc-f8862a1b2afad9d107ad505de2bf554705ebdb38.zip
gcc-f8862a1b2afad9d107ad505de2bf554705ebdb38.tar.gz
gcc-f8862a1b2afad9d107ad505de2bf554705ebdb38.tar.bz2
Partial Failed Images patch
Co-Authored-By: Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> Co-Authored-By: Soren Rasmussen <s.c.rasmussen@gmail.com> From-SVN: r257105
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 2a5f8ec..40f20c9 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -5060,7 +5060,25 @@ gfc_ref_this_image (gfc_ref *ref)
}
gfc_expr *
-gfc_find_stat_co(gfc_expr *e)
+gfc_find_team_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.team;
+
+ 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.team;
+
+ return NULL;
+}
+
+gfc_expr *
+gfc_find_stat_co (gfc_expr *e)
{
gfc_ref *ref;