Bug 99234

Summary: Out-of-line class triple nested from template causes ICE
Product: [Retired] Red Hat Linux Reporter: Benjamin S. Scarlet <scarlet>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-07-18 15:12:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.