summaryrefslogtreecommitdiff
path: root/gcc/fortran/check.c
diff options
context:
space:
mode:
authormikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-07 19:02:36 +0000
committermikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-07 19:02:36 +0000
commitbf5c5f33853ab20e9a07f6ad751e08f3f2b16922 (patch)
tree0fb7332cc98560cbdefc344dd7525f8d30c3a087 /gcc/fortran/check.c
parent058e4e296f417f74dc896c690ebd2b10c82ecaa3 (diff)
downloadgcc-bf5c5f33853ab20e9a07f6ad751e08f3f2b16922.tar.gz
* check.c (is_coarray): Remove.
(coarray_check): Use gfc_is_coarray. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179671 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r--gcc/fortran/check.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index b1fc38accb8..9b8ec21a763 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -203,42 +203,10 @@ double_check (gfc_expr *d, int n)
}
-/* Check whether an expression is a coarray (without array designator). */
-
-static bool
-is_coarray (gfc_expr *e)
-{
- bool coarray = false;
- gfc_ref *ref;
-
- if (e->expr_type != EXPR_VARIABLE)
- return false;
-
- coarray = e->symtree->n.sym->attr.codimension;
-
- for (ref = e->ref; ref; ref = ref->next)
- {
- if (ref->type == REF_COMPONENT)
- coarray = ref->u.c.component->attr.codimension;
- else if (ref->type != REF_ARRAY || ref->u.ar.dimen != 0)
- coarray = false;
- else if (ref->type == REF_ARRAY && ref->u.ar.codimen != 0)
- {
- int n;
- for (n = 0; n < ref->u.ar.codimen; n++)
- if (ref->u.ar.dimen_type[n] != DIMEN_THIS_IMAGE)
- coarray = false;
- }
- }
-
- return coarray;
-}
-
-
static gfc_try
coarray_check (gfc_expr *e, int n)
{
- if (!is_coarray (e))
+ if (!gfc_is_coarray (e))
{
gfc_error ("Expected coarray variable as '%s' argument to the %s "
"intrinsic at %L", gfc_current_intrinsic_arg[n]->name,