Bug 9159 - g++ faults when compiling "memberspace" declarations
Summary: g++ faults when compiling "memberspace" declarations
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: unknown
: P2 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2003-01-03 10:16 UTC by bala
Modified: 2003-07-25 17:33 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bala 2003-01-03 10:16:01 UTC
Please see bug report 9133.
Joaquín M Lopez has closed in on the problem from my original submission. Here is the gist of the problem:

// membspace.C
template <typename T>
class A {
  class A1{} A1;
};

template <typename T>
class B: public A<T> {};

int main(void)
{
  return 0;
}
//
booby:~/c++/bimap> alias g3
alias g3='/usr/local/products/gcc/3.2.1/bin/g++'
booby:~/c++/bimap> g3 -v      
Reading specs from /usr/local/products/gcc/3.2.1/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/specs
Configured with: ../gcc-3.2.1/configure --with-gnu-as --with-as=/usr/local/products/binutils/2.11.2/bin/gnu-as --with-gnu-ld --with-ld=/usr/local/products/binutils/2.11.2/bin/gnu-ld --disable-nls --enable-languages=c,c++ --disable-libgcj --disable-shared --prefix=/usr/local/products/gcc/3.2.1
Thread model: posix
gcc version 3.2.1
booby:~/c++/bimap> g3 membspace.C 
membspace.C:7: internal error: Segmentation Fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Release:
unknown

Environment:
UNIX/LINUX

How-To-Repeat:
Compile the sampple code provided above (repeated here):
// membspace.C
template <typename T>
class A {
  class A1{} A1;
};

template <typename T>
class B: public A<T> {};

int main(void)
{
  return 0;
}
//
Comment 1 Volker Reichelt 2003-01-06 05:44:19 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed.
    The bug is present since at least gcc 2.95.x and
    affects the 3.2 and 3.3 branch, and mainline
    (with the new parser).
Comment 2 Giovanni Bajo 2003-05-05 11:51:15 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed in 3.4 CVS 20030503