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

            Bug ID: 89422
           Summary: [8/9 Regression] ICE in field_byte_offset, at
                    dwarf2out.c:19086
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Started with gcc-8 and option -g :


$ cat z1.cc
template <int> struct S
{
  friend void foo (int a = []{ return 0; }()) {}
  int b;
};
S<0> t;



$ g++-9-20190217 -c z1.cc
$
$ g++-9-20190217 -c z1.cc -g
z1.cc: In instantiation of 'struct S<0>':
z1.cc:6:6:   required from here
z1.cc:3:28: internal compiler error: Segmentation fault
    3 |   friend void foo (int a = []{ return 0; }()) {}
      |                            ^~~~~~~~~~~~~~~
0xba166f crash_signal
        ../../gcc/toplev.c:326
0x8ac58e field_byte_offset
        ../../gcc/dwarf2out.c:19086
0x8ad27d add_data_member_location_attribute
        ../../gcc/dwarf2out.c:19365
0x8adb96 gen_field_die
        ../../gcc/dwarf2out.c:24290
0x898b5f gen_field_die
        ../../gcc/dwarf2out.c:24266
0x898b5f gen_decl_die
        ../../gcc/dwarf2out.c:26419
0x89a6a7 gen_member_die
        ../../gcc/dwarf2out.c:25169
0x89a6a7 gen_struct_or_union_type_die
        ../../gcc/dwarf2out.c:25265
0x89a6a7 gen_tagged_type_die
        ../../gcc/dwarf2out.c:25466
0x89b1ac gen_type_die_with_usage
        ../../gcc/dwarf2out.c:25661
0x89a2b7 gen_tagged_type_die
        ../../gcc/dwarf2out.c:25435
0x89b1ac gen_type_die_with_usage
        ../../gcc/dwarf2out.c:25661
0x89ba66 gen_type_die
        ../../gcc/dwarf2out.c:25715
0x8988ce gen_decl_die
        ../../gcc/dwarf2out.c:26347
0x899376 dwarf2out_decl
        ../../gcc/dwarf2out.c:26892
0x89963c dwarf2out_type_decl
        ../../gcc/dwarf2out.c:26619
0xadd0c2 rest_of_type_compilation(tree_node*, int)
        ../../gcc/passes.c:339
0x615b4d finish_struct_1(tree_node*)
        ../../gcc/cp/class.c:7068
0x616f74 finish_struct(tree_node*, tree_node*)
        ../../gcc/cp/class.c:7212
0x6f97e6 tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/cp/pt.c:18126

Reply via email to