http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49932
Summary: [C++0x] ICE on instantiating decltype(expr)::type with template Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: fl...@flast.jp ICE on instantiating the following two template functions. I tested with GCC 4.7.0 20110801. ---- 8< ---- template < typename T > auto f1( T x ) // ICE on here -> typename decltype( x )::type {} template < typename T > typename decltype( T{} )::type f2( T x ) {} // ICE on here struct S { typedef void type; }; void g() { f1( S() ); f2( S() ); } ---- 8< ----