From b78a06b2243643c6c35f19e6c376502e3fb0f07f Mon Sep 17 00:00:00 2001 From: Mikael Morin Date: Fri, 7 Oct 2011 21:07:04 +0200 Subject: [PATCH] resolve.c (compare_spec_to_ref): Move coarray ref initialization code... * resolve.c (compare_spec_to_ref): Move coarray ref initialization code... (resolve_array_ref): ... here. From-SVN: r179672 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/resolve.c | 16 ++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index d1a90144918..4c0888f237f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-10-07 Mikael Morin + + * resolve.c (compare_spec_to_ref): Move coarray ref initialization + code... + (resolve_array_ref): ... here. + 2011-10-07 Mikael Morin * check.c (is_coarray): Remove. diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 84db3ddb019..e6770db07ab 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -4396,14 +4396,6 @@ compare_spec_to_ref (gfc_array_ref *ar) return FAILURE; } - if (as->corank && ar->codimen == 0) - { - int n; - ar->codimen = as->corank; - for (n = ar->dimen; n < ar->dimen + ar->codimen; n++) - ar->dimen_type[n] = DIMEN_THIS_IMAGE; - } - return SUCCESS; } @@ -4672,6 +4664,14 @@ resolve_array_ref (gfc_array_ref *ar) if (!ar->as->cray_pointee && compare_spec_to_ref (ar) == FAILURE) return FAILURE; + if (ar->as->corank && ar->codimen == 0) + { + int n; + ar->codimen = ar->as->corank; + for (n = ar->dimen; n < ar->dimen + ar->codimen; n++) + ar->dimen_type[n] = DIMEN_THIS_IMAGE; + } + return SUCCESS; }