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

            Bug ID: 70776
           Summary: ICE on invalid code on x86_64-linux-gnu: Segmentation
                    fault (program cc1plus)
           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 in both 32-bit and 64-bit modes. 

It seems to affect at least all GCC versions 4.4.x and later. 


$ 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 20160423 (experimental) [trunk revision 235384] (GCC) 
$ 
$ g++-trunk small.cpp -c
g++-trunk: 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.
$ 


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


template < int > struct A;

template < typename, typename = void > struct B;

template < typename T > 
struct B < T, typename A < B < T >::value >::type >
{
  B < int > b;   // OK: B < int > *b; 
};

Reply via email to