This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
This short snippet: template <class T> class vector { }; class OUTER { public: template <class T> class List { }; vector<class List> data; }; triggers an ICE: bug.cc:4: internal error: Segmentation fault Release: 3.0.3, 3.1 20011228 (experimental) Environment: i686, Linux2.4.16, glibc2.2.4 How-To-Repeat: No ICE but: bug.cc:7: `struct list' redeclared as different kind of symbol bug.cc:5: previous declaration of `template<class T> class list' for (i.e., no enclosing class): template <class T> class vector { }; template <class T> class List { }; vector<class List> data; Also, the new parser ICEs on the first testcase, compiles without errors the latter. Other compilers manage to deal without errors with both of them.
State-Changed-From-To: open->analyzed State-Changed-Why: confirmed
Responsible-Changed-From-To: unassigned->nathan Responsible-Changed-Why: patch in progress
State-Changed-From-To: analyzed->closed State-Changed-Why: 2002-01-02 Nathan Sidwell <nathan@codesourcery.com> PR c++/5213 * pt.c (convert_template_argument): Be more careful determining when RECORD_TYPE templates are or are not templates.