Bug 99234 - Out-of-line class triple nested from template causes ICE
Summary: Out-of-line class triple nested from template causes ICE
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 9
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-16 12:42 UTC by Benjamin S. Scarlet
Modified: 2007-04-18 16:55 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2003-07-18 15:12:19 UTC


Attachments (Terms of Use)

Description Benjamin S. Scarlet 2003-07-16 12:42:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
compiling the following code causes an internal compiler error.

template <class T0>
class A {
public:
  class B;
};

template <class T0>
class A<T0>::B {
public:
  class C;
};

template <class T0>
class A<T0>::B::C {
public:
  A<T0> &a;
};



Version-Release number of selected component (if applicable):
gcc-c++-3.2.2-5

How reproducible:
Always

Steps to Reproduce:
1. put the above code in a file (foo.cpp)
2. compile the file (g++ foo.cpp -o foo.o)

    

Actual Results:  Foo.cpp:14: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

Additional info:

Comment 1 Benjamin S. Scarlet 2003-07-16 12:44:24 UTC
I guess that's actually only double nested. :-)

Comment 2 Jakub Jelinek 2003-07-18 15:12:19 UTC
With gcc 3.3 (e.g. gcc-3.3-4 or gcc-3.3-14 in rawhide) I just get error message
about the testcase, no ICE.


Note You need to log in before you can comment on or make changes to this bug.