https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80186
Bug ID: 80186 Summary: ICE on C++ code with invalid constructor on x86_64-linux-gnu: Segmentation fault (program cc1plus) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu Target Milestone: --- This seems to affect at least all versions 4.6.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.1/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.1 20170325 (experimental) [trunk revision 246473] (GCC) $ $ g++-trunk -c small.cpp small.cpp: In instantiation of ‘struct A<int, int>’: small.cpp:10:34: required from here small.cpp:5:3: error: invalid constructor; you probably meant ‘A<int, int> (const A<int, int>&)’ A (A < T, T >); ^ g++-trunk: internal compiler error: Segmentation fault (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. $ ---------------------------------------- template < class T, class > struct A { A (); A (A &); A (A < T, T >); }; void f () { A < int, int > (A < int, int >()); }