The following testcase causes an ICE: ============================================== template<typename> struct A { typedef int X; static const int i = 0; };
template<typename> struct B { typedef typename A<char[A<B>::i]>::X Y; template<typename T> B(T, Y); }; B<int> b(0,0); ============================================== dPR19208B.cc:10: internal compiler error: in push_access_scope, at cp/pt.c:176 Please submit a full bug report, [etc.] The testcase crashed since at least gcc 2.95.3, but was fixed with the patch for PR19208. The problem reappeared on the 3.4 branch and mainline with Josh's patch for PR 19989. I think the code should be accepted at least with -fpermissive, but rejected with -pedantic. -- Summary: [4.0/4.1 regression] ICE with zero-sized arrays Product: gcc Version: 4.0.3 Status: UNCONFIRMED Keywords: ice-on-valid-code, ice-on-invalid-code, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org BugsThisDependsOn: 19208,19989 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24671