https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88325
Bug ID: 88325 Summary: ICE on (invalid) C++ code when compiled with -std=c++2a: in make_typename_type, at cp/decl.c:3816 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 appears to be a recent regression. $ g++tk -v Using built-in specs. COLLECT_GCC=g++tk COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap Thread model: posix gcc version 9.0.0 20181203 (experimental) [trunk revision 266735] (GCC) $ $ g++tk -std=c++2a -c tmp.cpp tmp.cpp:6:34: internal compiler error: in make_typename_type, at cp/decl.c:3816 6 | template < typename T > A < T >::A < T > () {} | ^~~~~~~ 0x7573fd make_typename_type(tree_node*, tree_node*, tag_types, int) ../../gcc-source-trunk/gcc/cp/decl.c:3816 0x80a9ac cp_parser_class_name ../../gcc-source-trunk/gcc/cp/parser.c:22970 0x80ae81 cp_parser_type_name ../../gcc-source-trunk/gcc/cp/parser.c:17837 0x7f4334 cp_parser_simple_type_specifier ../../gcc-source-trunk/gcc/cp/parser.c:17697 0x8037b5 cp_parser_type_specifier ../../gcc-source-trunk/gcc/cp/parser.c:17336 0x80dbc7 cp_parser_decl_specifier_seq ../../gcc-source-trunk/gcc/cp/parser.c:13986 0x81a7e8 cp_parser_single_declaration ../../gcc-source-trunk/gcc/cp/parser.c:27828 0x81abbc cp_parser_template_declaration_after_parameters ../../gcc-source-trunk/gcc/cp/parser.c:27507 0x81b6cd cp_parser_explicit_template_declaration ../../gcc-source-trunk/gcc/cp/parser.c:27754 0x81b6cd cp_parser_template_declaration_after_export ../../gcc-source-trunk/gcc/cp/parser.c:27772 0x823179 cp_parser_declaration ../../gcc-source-trunk/gcc/cp/parser.c:13055 0x821e5e cp_parser_translation_unit ../../gcc-source-trunk/gcc/cp/parser.c:4688 0x821e5e c_parse_file() ../../gcc-source-trunk/gcc/cp/parser.c:40806 0x979bfa c_common_parse_file() ../../gcc-source-trunk/gcc/c-family/c-opts.c:1151 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ -------------------------------------------------- template < typename > struct A { template < typename > A (); }; template < typename T > A < T >::A < T > () {}