http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51348
Bug #: 51348 Summary: [c++0x] ICE in finish_class_member_access_expr with bogus(?) enum class use Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: l...@mit.edu I haven't checked whether this is legal C++, but it certainly looks fishy: struct A { enum class EC { VAL, }; }; int main() { A a; a.EC::VAL; } An old-ish build from trunk (g++-trunk (GCC) 4.7.0 20111006 (experimental)) says: test_ice.cc: In function ‘int main()’: test_ice.cc:11:9: internal compiler error: in finish_class_member_access_expr, at cp/typeck.c:2555 Fedora 16's gcc (g++ (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1)) says: test_ice.cc: In function ‘int main()’: test_ice.cc:11:9: internal compiler error: in finish_class_member_access_expr, at cp/typeck.c:2546 In both cases, I've compiled with g++ -c -std=c++0x.