c++/5213: ICE on (possibly) illegal code
pcarlini@unitus.it
pcarlini@unitus.it
Fri Dec 28 14:52:00 GMT 2001
>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:
More information about the Gcc-bugs
mailing list