This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/5213: ICE on (possibly) illegal code
- From: pcarlini at unitus dot it
- To: gcc-gnats at gcc dot gnu dot org
- Cc: fabiosmoker at libero dot it
- Date: 28 Dec 2001 22:14:06 -0000
- Subject: c++/5213: ICE on (possibly) illegal code
- Reply-to: pcarlini at unitus dot it
>Number: 5213
>Category: c++
>Synopsis: ICE on (possibly) illegal code
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Fri Dec 28 14:16:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Paolo Carlini
>Release: 3.0.3, 3.1 20011228 (experimental)
>Organization:
>Environment:
i686, Linux2.4.16, glibc2.2.4
>Description:
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
>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 (e.g. 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
with errors the latter. Other compilers manage to deal
without errors with both of them.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: