https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88187
Bug ID: 88187 Summary: ICE on (invalid) C++ code when compiled with -std=c++17: Segmentation fault 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 20181124 (experimental) [trunk revision 266429] (GCC) $ $ g++tk -std=c++11 tmp.cpp tmp.cpp:3:9: error: variable or field âfâ declared void 3 | void f (A ()); | ^ tmp.cpp:3:11: error: missing template arguments before â(â token 3 | void f (A ()); | ^ $ $ g++tk -std=c++17 tmp.cpp tmp.cpp:3:12: internal compiler error: Segmentation fault 3 | void f (A ()); | ^ 0xfd219f crash_signal ../../gcc-source-trunk/gcc/toplev.c:326 0x9354a2 dguide_name_p(tree_node*) ../../gcc-source-trunk/gcc/cp/pt.c:26623 0x856d3d grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) ../../gcc-source-trunk/gcc/cp/decl.c:11281 0x917e0b cp_parser_parameter_declaration_list ../../gcc-source-trunk/gcc/cp/parser.c:21813 0x91850f cp_parser_parameter_declaration_clause ../../gcc-source-trunk/gcc/cp/parser.c:21728 0x90761d cp_parser_direct_declarator ../../gcc-source-trunk/gcc/cp/parser.c:20494 0x90761d cp_parser_declarator ../../gcc-source-trunk/gcc/cp/parser.c:20368 0x919911 cp_parser_init_declarator ../../gcc-source-trunk/gcc/cp/parser.c:19885 0x91a9c6 cp_parser_simple_declaration ../../gcc-source-trunk/gcc/cp/parser.c:13398 0x923b90 cp_parser_declaration ../../gcc-source-trunk/gcc/cp/parser.c:13087 0x922b05 cp_parser_translation_unit ../../gcc-source-trunk/gcc/cp/parser.c:4674 0x922b05 c_parse_file() ../../gcc-source-trunk/gcc/cp/parser.c:40680 0xa7e34a 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 < int > struct A; void f (A ());