[Bug c++/89900] New: [9 Regression] ICE: Segmentation fault (in check_instantiated_arg)

asolokha at gmx dot com gcc-bugzilla@gcc.gnu.org
Mon Apr 1 10:23:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89900

            Bug ID: 89900
           Summary: [9 Regression] ICE: Segmentation fault (in
                    check_instantiated_arg)
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: error-recovery, 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++-9.0.0-alpha20190331 snapshot (r270048) ICEs when compiling the following
testcase:

template<typename SX, typename ...XE> void
fk (XE..., SW);

void
w9 (void)
{
  fk<int> (0);
}

% g++-9.0.0-alpha20190331 -c b9rp7pts.cc
b9rp7pts.cc:2:12: error: 'SW' has not been declared
    2 | fk (XE..., SW);
      |            ^~
b9rp7pts.cc: In substitution of 'template<class SX, class ... XE> void fk(XE
..., int) [with SX = int; XE = <missing>]':
b9rp7pts.cc:7:13:   required from here
b9rp7pts.cc:7:13: internal compiler error: Segmentation fault
    7 |   fk<int> (0);
      |             ^
0xf75abf crash_signal
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/toplev.c:326
0x9c3505 check_instantiated_arg
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/pt.c:19573
0x9c38d1 check_instantiated_args
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/pt.c:19645
0x9d0dea instantiate_template_1
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/pt.c:19745
0x9d0dea instantiate_template(tree_node*, tree_node*, int)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/pt.c:19849
0x9fe88f fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool,
bool)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/pt.c:20283
0x88581f add_template_candidate_real
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/call.c:3315
0x886226 add_template_candidate
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/call.c:3400
0x886226 add_candidates
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/call.c:5725
0x88b943 add_candidates
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/call.c:4391
0x88b943 perform_overload_resolution
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/call.c:4399
0x88ec05 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/call.c:4473
0xa1bc1d finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/semantics.c:2585
0x998887 cp_parser_postfix_expression
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/parser.c:7383
0x9a61d9 cp_parser_unary_expression
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/parser.c:8469
0x97f112 cp_parser_cast_expression
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/parser.c:9355
0x97f9ba cp_parser_binary_expression
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/parser.c:9458
0x980a06 cp_parser_assignment_expression
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/parser.c:9756
0x980d89 cp_parser_expression
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/parser.c:9923
0x984285 cp_parser_expression_statement
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190331/work/gcc-9-20190331/gcc/cp/parser.c:11512


More information about the Gcc-bugs mailing list