From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) Description of problem: When class X has a (member) subclass that created a typedef, and this typedef has the same name as a class inside the base class of class X, g++3 and g++ crash with an internal error Version-Release number of selected component (if applicable): arnold@bunny:~/develop $ rpm -q gcc-c++ gcc-c++-2.96-98 arnold@bunny:~/develop $ rpm -q gcc3-c++ gcc3-c++-3.0.1-3 How reproducible: Always Code to Reproduce: struct Base { class AutoReadLock { }; }; struct Standalone { class AutoLock { }; typedef AutoLock AutoReadLock; }; struct Derived : Base { struct LocalMember : public Standalone { }; class AutoReadLock { }; }; Actual Results: arnold@bunny:~/develop $ g++3 test.C test.C:14: Internal compiler error in pop_binding, at cp/decl.c:1193 Expected Results: An error at link time (because of the lack of main()), but no compile time crash Additional info: Renaming the typedefs fixes the problem
Confirmed still present in 8.0
Present in all versions up through 3.4; fixed in 4.0. Pushed upstream to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17795