This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/5213: ICE on (possibly) illegal code



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]