Bug 7083

Summary: ICE using -gstabs with dodgy class derivation
Product: gcc Reporter: dmonksfd
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, hb, lerdsuwa, reichelt
Priority: P3 Keywords: ice-on-valid-code, monitored
Version: 3.1   
Target Milestone: 3.3.1   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2003-06-23 11:16:30

Description dmonksfd 2002-06-20 03:36:01 UTC
gcc -v:
    Reading specs from /tools/gcc/3.1/i686-2.4.7-10/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
    Configured with: ../gcc-3.1/configure --prefix=/tools/gcc/3.1 --exec-prefix=/tools/gcc/3.1/i686-2.4.7-10 --disable-nls --enable-shared
    Thread model: single
    gcc version 3.1

Command line:
    g++ -gstabs -c gcc31bug.cc

Output:
    gcc31bug.cc:5: 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.

Preprocessed source:
    # 1 "gcc31bug.cc"
    # 1 "<built-in>"
    # 1 "<command line>"
    # 1 "gcc31bug.cc"
    typedef struct {
        int x;
    } A;

    class B: public A {
        int y;
    };

Notes:
    This is nasty (probably invalid) code, but it works
    under -ggdb, and probably shouldn't segfault anyway.

Release:
3.1
Comment 1 Kriang Lerdsuwanakij 2002-10-26 07:30:53 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirm.
Comment 2 Volker Reichelt 2003-05-06 18:17:47 UTC
From: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
To: gcc-gnats@gcc.gnu.org, dmonksfd@broadcom.com, gcc-bugs@gcc.gnu.org
Cc:  
Subject: Re: c++/7083: [2003-01-22] ICE using -gstabs with dodgy class
 derivation
Date: Tue, 06 May 2003 18:17:47 +0200 (CEST)

 GCC crashes at least since 2.95.x on the code.
 This affects also 3.3 branch and mainline as of 2003-05-06.
 
 BTW, the code looks legal to me.
 
 Regards,
 Volker
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7083
Comment 3 Andrew Pinski 2003-07-11 12:42:13 UTC
*** Bug 8446 has been marked as a duplicate of this bug. ***
Comment 4 Andrew Pinski 2003-07-11 15:08:08 UTC
This also fails in 3.2.2 and 3.2.3.
Comment 5 Andrew Pinski 2003-07-16 04:39:11 UTC
Most likely the same fix for bug 11473, fixed this bug.  I will submit a testcase when I get 
cvs access.