http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49855
Summary: internal compiler error: in fold_convert_const_int_from_real Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: xinlian...@gmail.com In the following code, FE should generate FIX_TRUNC_EXPR instead of NOP_EXPR for the float to int conversion. extern void foo(int); template <class Key, class Value> void Basic() { const int kT = 1.5e6; // <--- causes ICE int size = kT*2/3; do { foo(size); size = size * 0.5 - 1; } while (size >= 0 ); } Note that removing the template specification, the right code is generated and there is no ICE. David