https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62127
Bug ID: 62127
Summary: [5.0 Regression] ICE with VLA in constructor
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
The following valid code snippet triggers an ICE on trunk:
==================
struct A
{
A(int);
};
A::A(int i)
{
int x[1][i];
x[0][0] = 0;
}
==================
bug.cc: In constructor 'A::A(int)':
bug.cc:6:1: internal compiler error: in execute, at cfgexpand.c:5731
A::A(int i)
^
0x83a0b3 execute
../../gcc/gcc/cfgexpand.c:5731
Please submit a full bug report, [etc.]
The regression was introduced in June between 2014-06-12 and 2014-06-29.
This is actually the first part of the testcase from g++.dg/ext/vla1.C
compiled without "-pedantic-errors" (see PR6994).