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

             Bug #: 56260
           Summary: GCC hangs/crashes on potentially invalid source
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: novu...@hotmail.com


This came from http://www.glenmccl.com/cpp11.htm, and was part of the free
sample of tests.

Originally this hung for me. Now it just causes a ICE/segfault.

This was with GCC 4.7.2, on Ubuntu 12 x86_64.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/data00/opt/pkg/gcc-4.7.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.7.2/configure --prefix=/opt/pkg/gcc-4.7.2
--program-suffix=-4.7.2 --enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 4.7.2 (GCC) 


$ cat test.cpp
// [dcl.fct.def]
// autogenerated crash test
// Copyright (C) 2009 Glen McCluskey & Associates LLC.  All Rights Reserved.

void f()
{
[ ] ( struct A { A ( ) = default ; A(const A&) = delete; } * ) { return 0 ; } (
0 ) ; 
}

$ g++ -c -std=c++11 test.cpp
test.cpp: In function ‘void f()’:
test.cpp:7:16: error: types may not be defined in parameter types
g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to