http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46855

           Summary: cc1plus: internal compiler error: Segmentation fault
                    (instead of g++-4.5's: expected unqualified-id at end
                    of input)
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: g...@abeckmann.de


The following piece of invalid code gives an ICE SIGSEGV in 4.6:

===== 8< =====
struct
{
struct
my_data
<
===== >8 =====

$ g++-trunk -c ice-SIGSEGV.min.ii
ice-SIGSEGV.min.ii:4:1: error: ‘my_data’ is not a template
ice-SIGSEGV.min.ii:4:1: error: expected unqualified-id at end of input
ice-SIGSEGV.min.ii:4:1: error: expected ‘}’ at end of input
cc1plus: error: expected ‘;’ after struct definition
ice-SIGSEGV.min.ii:4:1: error: abstract declarator ‘<anonymous struct>’ used as
declaration
cc1plus: internal compiler error: Segmentation fault
Please submit a full bug report,

$ g++-4.5.x -c ice-SIGSEGV.min.ii
ice-SIGSEGV.min.ii:4:1: error: ‘my_data’ is not a template
ice-SIGSEGV.min.ii:4:1: error: expected unqualified-id at end of input
ice-SIGSEGV.min.ii:4:1: error: expected ‘}’ at end of input
ice-SIGSEGV.min.ii:4:1: error: expected unqualified-id at end of input

$ g++-trunk -v -c ice-SIGSEGV.min.ii
Using built-in specs.
COLLECT_GCC=/opt/software/x86_64/gcc-trunk/bin/g++-trunk
COLLECT_LTO_WRAPPER=/opt/software/x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/opt/software/x86_64/gcc-trunk
--program-suffix=-trunk --enable-languages=c,c++ --enable-checking
Thread model: posix
gcc version 4.6.0 20101207 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'

/opt/software/x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1plus
-fpreprocessed ice-SIGSEGV.min.ii -quiet -dumpbase ice-SIGSEGV.min.ii
-mtune=generic -march=x86-64 -auxbase ice-SIGSEGV.min -version -o
/tmp/cci7gnRt.s
GNU C++ (GCC) version 4.6.0 20101207 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20101207 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.6.0 20101207 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20101207 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 58dd45b357216c1e9d23aab2b8f87581
ice-SIGSEGV.min.ii:4:1: error: ‘my_data’ is not a template
ice-SIGSEGV.min.ii:4:1: error: expected unqualified-id at end of input
ice-SIGSEGV.min.ii:4:1: error: expected ‘}’ at end of input
cc1plus: error: expected ‘;’ after struct definition
ice-SIGSEGV.min.ii:4:1: error: abstract declarator ‘<anonymous struct>’ used as
declaration
cc1plus: internal compiler error: Segmentation fault
Please submit a full bug report,

Reply via email to