[Patch, Fortran] PR 78392: ICE in gfc_trans_auto_array_allocation, at fortran/trans-array.c:5979

Janus Weil janus@gcc.gnu.org
Fri Nov 18 13:03:00 GMT 2016


Hi all,

the attached patch fixes an ice-on-valid problem, simply by removing
an assert. The generated code works as expected and the patch regtests
cleanly on x86_64-linux-gnu. Ok for trunk?

Cheers,
Janus



2016-11-18  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/78392
    * trans-array.c (gfc_trans_auto_array_allocation): Remove an assert.

2016-11-18  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/78392
    * gfortran.dg/saved_automatic_2.f90: New test case.
-------------- next part --------------
Index: gcc/fortran/trans-array.c
===================================================================
--- gcc/fortran/trans-array.c	(Revision 242586)
+++ gcc/fortran/trans-array.c	(Arbeitskopie)
@@ -5976,7 +5976,6 @@ gfc_trans_auto_array_allocation (tree decl, gfc_sy
   type = TREE_TYPE (type);
 
   gcc_assert (!sym->attr.use_assoc);
-  gcc_assert (!TREE_STATIC (decl));
   gcc_assert (!sym->module);
 
   if (sym->ts.type == BT_CHARACTER
-------------- next part --------------
A non-text attachment was scrubbed...
Name: saved_automatic_2.f90
Type: text/x-fortran
Size: 393 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20161118/29cbb945/attachment.bin>


More information about the Fortran mailing list