http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51226
Bug #: 51226 Summary: [c++0x] ICE with opaque enum and invalid template 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.6.0: ======================================= template<int> struct A { enum E : int; }; template<> enum A<>::E : int {}; ======================================= bug.cc:6:19: error: wrong number of template arguments (0, should be 1) bug.cc:1:22: error: provided for 'template<int <anonymous> > struct A' bug.cc:6:26: internal compiler error: in is_ancestor, at cp/name-lookup.c:2586 Please submit a full bug report, [etc.]