https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100634
Bug ID: 100634
Summary: [11/12 Regression] ICE in convert_nontype_argument, at
cp/pt.c:7653
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
g++-12.0.0-alpha20210516 snapshot (g:4a322345cab10879162a2ddf659fb0f873ba0182)
ICEs when compiling the following testcase, extracted from
test/SemaTemplate/temp_arg_nontype_cxx20.cpp from the clang 12.0.0 test suite,
w/ -std=gnu++20:
template<_Complex int> struct ComplexInt {};
using CI = ComplexInt<1 + 3i>;
% g++-12.0.0 -std=gnu++20 -c xqj500ey.cpp
xqj500ey.cpp:2:29: internal compiler error: in convert_nontype_argument, at
cp/pt.c:7653
2 | using CI = ComplexInt<1 + 3i>;
| ^
0x6b6b34 convert_nontype_argument
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/pt.c:7653
0x6b6b34 convert_template_argument
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/pt.c:8546
0xacd2c3 coerce_template_parms
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/pt.c:9025
0xad0069 lookup_template_class_1
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/pt.c:9863
0xad1e31 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/pt.c:10250
0xafb7fb finish_template_type(tree_node*, tree_node*, int)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/semantics.c:3585
0xa6a1e9 cp_parser_template_id
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:17503
0xa6a3e5 cp_parser_class_name
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:24749
0xa6156a cp_parser_qualifying_entity
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:7002
0xa6156a cp_parser_nested_name_specifier_opt
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:6684
0xa7760b cp_parser_simple_type_specifier
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:18904
0xa554a5 cp_parser_type_specifier
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:18563
0xa67ae4 cp_parser_type_specifier_seq
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:23424
0xa66098 cp_parser_type_id_1
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:23224
0xa6841d cp_parser_type_id
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:23320
0xa6841d cp_parser_alias_declaration
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:20890
0xa853e5 cp_parser_declaration
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:14161
0xa86160 cp_parser_toplevel_declaration
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:14190
0xa86160 cp_parser_translation_unit
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:4942
0xa86160 c_parse_file()
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:45393