Compiling the following code snippet with "-ftree-vectorize -O2 -march=pentium4" triggers an ICE on mainline (the 4.0 branch is not affected):
============================================ struct A { double d[2]; double foo(int i) { return d[i]; } }; struct B : public A {}; void bar(B& b) { for (int i=0; i<2; ++i) b.d[i] = b.foo(i); } ============================================ bug.cc: In function 'void bar(B&)': bug.cc:9: error: Definition in block 1 does not dominate use in block 18 for SSA_NAME: this_5 in statement: vect_p.20_56 = this_5 + base_off.19_55; lall.cc:9: internal compiler error: verify_ssa failed. Please submit a full bug report, [etc.] -- Summary: [4.1 regression] ICE using -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=21218