diff mbox

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

Message ID CAKwh3qhB0XsDytquCgLi5nWYCzqjH3Avv3zxpmV5Kr6YuMJXeA@mail.gmail.com
State New
Headers show

Commit Message

Janus Weil Nov. 18, 2016, 1:03 p.m. UTC
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.
diff mbox

Patch

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