The following valid code snippet triggers an ICE on mainline and 4.3 branch when compiled with "-ftrapv -O3":
================================ void foo(int x[]) { int i, j; for (i = 0; i < 2; i++) for (j = 0; j < 2; j++) { x[i] = x[i*j]; x[i] = x[i*j]; } } ================================ bug.c: In function 'foo': bug.c:2: internal compiler error: tree check: expected integer_cst, have polynomial_chrec in int_cst_value, at tree.c:7968 Please submit a full bug report, [etc.] -- Summary: [4.3/4.4 regression] ICE with "-ftrapv" Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, monitored Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35428