[Bug c++/70709] New: gcc hangs on valid C++ code on x86_64-linux-gnu

su at cs dot ucdavis.edu gcc-bugzilla@gcc.gnu.org
Mon Apr 18 01:25:00 GMT 2016


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

            Bug ID: 70709
           Summary: gcc hangs on valid C++ code on x86_64-linux-gnu
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following code causes an ICE when compiled with the current gcc trunk on
x86_64-linux-gnu. 

It also affects 4.8.x and later, and is a regression from 4.7.x. 


$ g++-trunk -v
Using built-in specs.
COLLECT_GCC=g++-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160417 (experimental) [trunk revision 235070] (GCC) 
$ 
$ g++-4.7 -c small.cpp
$ clang++-3.8 -c small.cpp    
$ 
$ g++-trunk -c small.cpp^C
$ timeout -s 9 10 g++-trunk -c small.cpp
Killed
$ 


---------------------


struct A
{
  A (int);
};

struct B
{
  B () {} 
  A a[0];
};

struct C
{
  C () {} 
  B a[0];
};


More information about the Gcc-bugs mailing list