The following testcase crashes mainline when compiled with
g++ -O -ftree-vectorize:
==================================================================
struct C;
struct A
{
void foo(const C&) { bar(); }
void bar();
};
struct B
{
short int x[2];
B() { short int* p=x; for (int i=0; i<2; ++i) p[i] = 0; }
};
struct C
{
A* p;
char c;
B b;
void baz() const { p->bar(); }
};
void foobar(C& c, A& a)
{
c.baz();
a.foo(C());
}
==================================================================
The error message is:
bug.cc: In function 'void foobar(C&, A&)':
bug.cc:24: internal compiler error: tree check: expected ssa_name, have
var_decl in verify_ssa, at tree-ssa.c:750
Please submit a full bug report, [etc.]
The 4.0 branch is not affected.
--
Summary: [4.1 regression] ICE with -ftree-vectorize
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, monitored
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21789