The following code compiles successfully under gcc-3.4.3 on amd64: > cat bug.C float foo();
int _numTransitions; int _offset; void bar(int &base) { float tmp = foo(); tmp -= (float)_offset; if (tmp < 0.0) tmp = 0.0; if (tmp > (float)(_numTransitions-1)) tmp = (float)(_numTransitions-1); base = (int) tmp; } > /dept/rnd/vendor/gcc-4.0.0-amd64/bin/g++ -fnon-call-exceptions -fPIC -O2 -c bug.C -o /dev/null bug.C: In function 'void bar(int&)': bug.C:15: error: insn does not satisfy its constraints: (insn 67 35 36 0 (set (reg:SF 24 xmm3) (lt:SF (reg/v:SF 22 xmm1 [orig:60 tmp ] [60]) (reg:SF 23 xmm2 [65]))) 487 {*sse_setccsf} (nil) (nil)) bug.C:15: internal compiler error: in reload_cse_simplify_operands, at postreload.c:391 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. > /dept/rnd/vendor/gcc-4.0.0-amd64/bin/g++ -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4.0.0/configure --prefix=/dept/rnd/vendor/gcc-4.0.0-amd64 --enable-threads --enable-languages=c,c++ Thread model: posix gcc version 4.0.0 -- Summary: [4.0 regression] ICE in reload_cse_simplify_operands with -fnon-call-exceptions -fPIC -O2 Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nick at ilm dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21169