c++/7083: internal error (segfault) using -gstabs with dodgy class derivation

dmonksfd@broadcom.com dmonksfd@broadcom.com
Thu Jun 20 07:26:00 GMT 2002

>Number:         7083
>Category:       c++
>Synopsis:       internal error (segfault) using -gstabs with dodgy class derivation
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 20 03:36:01 PDT 2002
>Originator:     David Monksfield
>Release:        3.1

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

    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;

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



More information about the Gcc-bugs mailing list