http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51421
Bug #: 51421 Summary: [c++0x] ICE with invalid use of auto Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: reich...@gcc.gnu.org The following invalid code snippet triggers an ICE since GCC 4.4.0: ===================== int foo(int); void bar() { auto i = foo(i); } ===================== bug.cc: In function 'void bar()': bug.cc:5:17: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have template_type_parm in lookup_conversions, at cp/search.c:2499 Please submit a full bug report, [etc.] A slightly different example triggers an ICE in a different position: ===================== struct A {}; A foo(A); void bar() { auto a = foo(a); } ===================== bug.cc: In function 'void bar()': bug.cc:7:17: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have template_type_parm in lookup_base, at cp/search.c:212 Please submit a full bug report, [etc.]