template<typename U> struct X {}; template<typename T> auto f(T t) -> X<decltype(t+1)> {} template<typename T> auto g(T t) -> X<decltype(t+1)> {}
Compiling with -std=c++0x gives decltype_ice.cc:4:52: internal compiler error: Segmentation fault: 11 -- Summary: [c++0x] ICE on repeated decltype expression in auto functions Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: aaz at althenia dot net GCC build triplet: x86_64-portbld-freebsd7.2 GCC host triplet: x86_64-portbld-freebsd7.2 GCC target triplet: x86_64-portbld-freebsd7.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40619