https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90916
Bug ID: 90916
Summary: [10 Regression] ICE in retrieve_specialization, at
cp/pt.c:1258
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
This issue hits gcc-10 and has changed before 20190505 :
$ cat z1.cc
template <typename> struct S
{
struct A;
struct f A ();
};
template class S <int>;
$ g++-9-20190615 -c z1.cc
$
$ g++-10-20190616 -c z1.cc
z1.cc: In instantiation of 'class S<int>':
z1.cc:6:16: required from here
z1.cc:4:12: internal compiler error: Segmentation fault
4 | struct f A ();
| ^
0xb933cf crash_signal
../../gcc/toplev.c:326
0x6d8f0f retrieve_specialization
../../gcc/cp/pt.c:1258
0x6f54ad tsubst_function_decl
../../gcc/cp/pt.c:12983
0x6eeeb9 tsubst_decl
../../gcc/cp/pt.c:13489
0x6e56a7 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/cp/pt.c:14390
0x6fda98 instantiate_class_template_1
../../gcc/cp/pt.c:11229
0x6fda98 instantiate_class_template(tree_node*)
../../gcc/cp/pt.c:11534
0x72e655 complete_type(tree_node*)
../../gcc/cp/typeck.c:139
0x6f6e7f do_type_instantiation(tree_node*, tree_node*, int)
../../gcc/cp/pt.c:23909
0x6cacf7 cp_parser_explicit_instantiation
../../gcc/cp/parser.c:17199
0x6cd271 cp_parser_declaration
../../gcc/cp/parser.c:13186
0x6cd911 cp_parser_translation_unit
../../gcc/cp/parser.c:4690
0x6cd911 c_parse_file()
../../gcc/cp/parser.c:41255
0x78c1f0 c_common_parse_file()
../../gcc/c-family/c-opts.c:1156