http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50853
Bug #: 50853 Summary: Internal Compiler Error returning a template type using brace initialization Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: pub...@alisdairm.net The following obscure code produces an ICE when the function template 'test' is called: template<int> struct MyType{}; template<int VAL> auto test(MyType<VAL>) -> MyType<int{VAL}> { return {}; } int main() { MyType<int{256}>{}; test( MyType<256>{} ); // no error without this call } The ICE produced is: internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13389