http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57402

            Bug ID: 57402
           Summary: [4.9 Regression] ICE: in make_decl_rtl, at
                    varasm.c:1147 when initializing variable-sized array
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz

Created attachment 30183
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30183&action=edit
reduced testcase

Compiler output:
$ gcc testcase.C         
testcase.C: In function 'void f(int)':
testcase.C:3:15: internal compiler error: in make_decl_rtl, at varasm.c:1147
   int a[i] = {};
               ^
0xe21df3 make_decl_rtl(tree_node*)
        /mnt/svn/gcc-trunk/gcc/varasm.c:1143
0x938380 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**)
        /mnt/svn/gcc-trunk/gcc/expr.c:9334
0x9511f7 expand_constructor
        /mnt/svn/gcc-trunk/gcc/expr.c:7745
0x938182 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**)
        /mnt/svn/gcc-trunk/gcc/expr.c:9571
0x945112 store_expr(tree_node*, rtx_def*, int, bool)
        /mnt/svn/gcc-trunk/gcc/expr.c:5239
0x9474e9 expand_assignment(tree_node*, tree_node*, bool)
        /mnt/svn/gcc-trunk/gcc/expr.c:4874
0x84650f expand_gimple_stmt_1
        /mnt/svn/gcc-trunk/gcc/cfgexpand.c:2274
0x84650f expand_gimple_stmt
        /mnt/svn/gcc-trunk/gcc/cfgexpand.c:2370
0x847dad expand_gimple_basic_block
        /mnt/svn/gcc-trunk/gcc/cfgexpand.c:4204
0x849e1c gimple_expand_cfg
        /mnt/svn/gcc-trunk/gcc/cfgexpand.c:4723
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


$ gcc -v        
Using built-in specs.
COLLECT_GCC=/mnt/svn/gcc-trunk/binary-latest/bin/gcc
COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-199273-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /mnt/svn/gcc-trunk//configure --enable-checking=yes,rtl,df
--enable-languages=c,c++,lto,fortran
--prefix=/mnt/svn/gcc-trunk/binary-199273-lto-fortran-checking-yes-rtl-df/
--without-cloog --without-ppl
Thread model: posix
gcc version 4.9.0 20130524 (experimental) (GCC) 

GCC 4.8 output:
$ gcc testcase.C
testcase.C: In function 'void f(int)':
testcase.C:3:15: error: variable-sized object 'a' may not be initialized
   int a[i] = {};
               ^
Tested revisions:
r199273 - crash
4.8 r198018 - error

Reply via email to