The following invalid code snippet crashes the C++ frontend sionce GCC 3.4.0:
================================== struct A; template<A&> void foo(); A a; void bar() { foo<a>(); } ================================== bug.cc:5: error: aggregate 'A a' has incomplete type and cannot be defined bug.cc: In function 'void bar()': bug.cc:9: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in convert_nontype_argument, at cp/pt.c:3583 Please submit a full bug report, [etc.] -- Summary: [4.0/4.1/4.2 regression] ICE with invalid template parameter Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, error-recovery, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27427