Found with this test case. Still have not analyzed it, so I'm not quite sure where we're getting confused:
#include <stdio.h> #include <string.h> inline int bci (const float &source) { int dest; memcpy (&dest, &source, sizeof (dest)); return dest; } inline float bcf (const int &source) { float dest; memcpy (&dest, &source, sizeof (dest)); return dest; } float Foo () { const int foo = bci (0.0f); int bar = foo; const int baz = foo & 1; if (!baz && (foo & 2)) bar = 0; return bcf (bar); } main () { printf ("Foo() = %f\n", Foo()); } $ <mainline>/bin/g++ -o mathutil -O2 mathutil.cc mathutil.cc: In function 'float Foo()': mathutil.cc:21: internal compiler error: in vn_reference_insert_pieces, at tree-ssa-sccvn.c:1131 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: ICE in vn_reference_insert_pieces at tree-ssa- sccvn.c:1131 Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dnovillo 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=37421