http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49648
--- Comment #8 from Mikael Morin <mikael at gcc dot gnu.org> 2011-07-06
15:00:56 UTC ---
(In reply to comment #7)
> Here is a "fix".
It breaks class_20.f03 and extends_4.f03 at least.
There is another attempt below.
(In reply to comment #6)
> Alternatively, one should somehow make sure that also expressions below
> sym->result - in particular: sym->result->as->{lbound,ubound} - get fixed via
> a
> call to resolve_ref.
That is a better way (than your other suggestions) IMO.
diff --git a/resolve.c b/resolve.c
index f484a22..cbf403c 100644
--- a/resolve.c
+++ b/resolve.c
@@ -12198,6 +12198,8 @@ resolve_symbol (gfc_symbol *sym)
}
}
}
+ else if (mp_flag && sym->attr.flavor == FL_PROCEDURE && sym->attr.function)
+ gfc_resolve_array_spec (sym->result->as, false);
/* Assumed size arrays and assumed shape arrays must be dummy
arguments. Array-spec's of implied-shape should have been resolved to