From e3d748dd0ec180b1405dad4b72652c4f70766e92 Mon Sep 17 00:00:00 2001 From: Mikael Morin Date: Thu, 7 Jul 2011 22:58:16 +0200 Subject: [PATCH] re PR fortran/49648 (ICE(segfault) with MATMUL and function-result actual argument) 2011-07-07 Mikael Morin PR fortran/49648 * resolve.c (resolve_symbol): Force resolution of function result's array specification. From-SVN: r176011 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/resolve.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 267c81e3076..fef19449436 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-07-07 Mikael Morin + + PR fortran/49648 + * resolve.c (resolve_symbol): Force resolution of function result's + array specification. + 2011-07-07 Tobias Burnus * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 8418c216c83..b51ae962412 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/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 -- 2.30.2