https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61361

            Bug ID: 61361
           Summary: gcc segfaults on SLES12 beta4 P8
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wangn at ca dot ibm.com

gcc segfaults on sles12 p8 machine. 

1. gcc version:
g++ (SUSE Linux) 4.8.2 20140324 [gcc-4_8-branch revision 208789]
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

2. source code:

t.cpp:

class A {
        static int aval;
public:
        int get_val();
};

class B : public A {
        static int bval;
public:
        int get_val();
        int bf();
};


int B::bval=5;
int B::get_val() {return bval;};
int B::bf() {return 3;};

int funcB() {
    B b;
    return b.get_val();
}

3. command:

gcc -m64 -c t.cpp

4. output:

g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.

5. expected output:

compile pass


note: pass on the following machine:

Linux cit318 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:09:21 UTC 2014
ppc64le ppc64le ppc64le GNU/Linux

Reply via email to