https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93297
John McFarlane <john at mcfarlane dot name> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |john at mcfarlane dot name --- Comment #7 from John McFarlane <john at mcfarlane dot name> --- I'm seeing what appears to be the same ICE at head (SHA b003c4b1). This is reproducible in CE (https://godbolt.org/z/MG1sax). Output with `-v` below. Source file is: template <class> class a; template <2> using b a<int>; static_assert(b{ } ========================= john@carbon:~/ws/c++20/cnl/build$ g++ -v reduceme.cpp Using built-in specs. COLLECT_GCC=/usr/bin/g++ COLLECT_LTO_WRAPPER=/home/john/gcc-head/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --disable-multilib --prefix=/home/john/gcc-head/ --enable-languages=c,c++,lto Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20201019 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a-' /home/john/gcc-head/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE reduceme.cpp -quiet -dumpdir a- -dumpbase reduceme.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -version -o /tmp/ccBQ8tty.s GNU C++17 (GCC) version 11.0.0 20201019 (experimental) (x86_64-pc-linux-gnu) compiled by GNU C version 11.0.0 20201019 (experimental), GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version none GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 ignoring non-existent directory "/usr/local/include/x86_64-linux-gnu" ignoring non-existent directory "/home/john/gcc-head/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /home/john/gcc-head/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0 /home/john/gcc-head/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/x86_64-pc-linux-gnu /home/john/gcc-head/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/backward /home/john/gcc-head/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include /usr/local/include /home/john/gcc-head/include /home/john/gcc-head/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include-fixed /usr/include/x86_64-linux-gnu /usr/include End of search list. GNU C++17 (GCC) version 11.0.0 20201019 (experimental) (x86_64-pc-linux-gnu) compiled by GNU C version 11.0.0 20201019 (experimental), GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version none GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 898bda479bba6f05660e15f0cb7d4838 reduceme.cpp:2:11: error: expected identifier before numeric constant 2 | template <2> using b a<int>; | ^ reduceme.cpp:2:11: error: expected ‘>’ before numeric constant reduceme.cpp:2:22: error: expected ‘=’ before ‘a’ 2 | template <2> using b a<int>; | ^ reduceme.cpp:3:52: warning: alias template deduction only available with ‘-std=c++20’ or ‘-std=gnu++20’ 3 | static_assert(b{ } | ^ reduceme.cpp:3:52: internal compiler error: in set_constraints, at cp/constraint.cc:1192 0x63dc05 set_constraints(tree_node*, tree_node*) ../../gcc/gcc/cp/constraint.cc:1192 0xa37768 alias_ctad_tweaks ../../gcc/gcc/cp/pt.c:28819 0xa37768 deduction_guides_for ../../gcc/gcc/cp/pt.c:28934 0xa37a98 do_class_deduction ../../gcc/gcc/cp/pt.c:29042 0xa37a98 do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) ../../gcc/gcc/cp/pt.c:29211 0xa8b289 finish_compound_literal(tree_node*, tree_node*, int, fcl_t) ../../gcc/gcc/cp/semantics.c:2934 0x9e7f7a cp_parser_functional_cast ../../gcc/gcc/cp/parser.c:29749 0xa005d7 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:7251 0x9e229a cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:9648 0x9e402e cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:9953 0x9e2bad cp_parser_constant_expression ../../gcc/gcc/cp/parser.c:10247 0x9e2f11 cp_parser_static_assert ../../gcc/gcc/cp/parser.c:14829 0xa1bfe6 cp_parser_declaration ../../gcc/gcc/cp/parser.c:13575 0xa1c63b cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4793 0xa1c63b c_parse_file() ../../gcc/gcc/cp/parser.c:44170 0xb3948d c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1188 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. =========================