re PR fortran/49648 (ICE(segfault) with MATMUL and function-result actual argument)
authorMikael Morin <mikael.morin@sfr.fr>
Thu, 7 Jul 2011 20:58:16 +0000 (22:58 +0200)
committerMikael Morin <mikael@gcc.gnu.org>
Thu, 7 Jul 2011 20:58:16 +0000 (20:58 +0000)
2011-07-07  Mikael Morin  <mikael.morin@sfr.fr>

PR fortran/49648
* resolve.c (resolve_symbol): Force resolution of function result's
array specification.

From-SVN: r176011

gcc/fortran/ChangeLog
gcc/fortran/resolve.c

index 267c81e3076b74add8edb5ab8d76a2de1d2b9b5d..fef19449436ec8b1c8df78052e2130e32f048144 100644 (file)
@@ -1,3 +1,9 @@
+2011-07-07  Mikael Morin  <mikael.morin@sfr.fr>
+
+       PR fortran/49648
+       * resolve.c (resolve_symbol): Force resolution of function result's
+       array specification.
+
 2011-07-07  Tobias Burnus  <burnus@net-b.de>
 
        * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register
index 8418c216c8378db257ee0ba057889a278585509c..b51ae962412abc90d446e3d1f1aa849e63a244c8 100644 (file)
@@ -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