http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56817
Bug #: 56817
Summary: [4.8/4.9 Regression] ICE in
hide_evolution_in_other_loops_than_loop
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
// { dg-do compile }
// { dg-options "-O3 --param max-unroll-times=32" }
struct A {};
A **q;
struct B
{
A **j;
B () { j = q; }
A *& operator[] (unsigned long x) { return j[x]; }
};
struct C
{
C (int r) : v (), s (r) {}
A *& operator () (int i, int j) { return v[i * s + j]; }
B v;
int s;
};
struct D
{
D ()
{
unsigned h = 2;
for (int i = 0; i < 1; ++i, h *= 2)
{
C w (h);
for (unsigned j = 0; j < h; ++j)
for (unsigned k = 0; k < h; ++k)
w (j, k) = new A;
}
}
};
void
foo ()
{
for (int i = 0; i < 3; i++)
A (), A (), D ();
}
ICEs with:
rh947433.C: In function ‘void foo()’:
rh947433.C:34:1: internal compiler error: in
hide_evolution_in_other_loops_than_loop, at tree-chrec.c:716
foo ()
^
starting with http://gcc.gnu.org/r193098