Test case: ========================================== void foo (int N) { int C; double R; R = 0.0; do { R += 0.001; C = (int) (R * N); if (-R * N <= R * N) { C++; } } while (C < 0); return; } ========================================== $ ./cc1 -fno-unit-at-a-time -O1 -ffast-math t.c foo t.c: In function 'foo': t.c:3: internal compiler error: tree check: expected real_cst, have integer_cst in const_binop, at fold-const.c:1512 The test case comes from SPEC twolf. The problem appeared after this patch was committed: http://gcc.gnu.org/ml/gcc-patches/2005-08/msg00801.html
-- Summary: [4.1 regression] Tree checking failure due to scev Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P2 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: steven at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org,spop at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23391