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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|                            |aldyh at gcc dot gnu.org
            Summary|ice in check_die, at        |[6/7/8 Regression] ICE in
                   |dwarf2out.c:6185            |check_die, at
                   |                            |dwarf2out.c:6185

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, there's minimal reproducer:

$ cat pr81406.i
int a;
int *b (void);
static inline int __attribute__ ((__artificial__)) c ()
{
  if (a)
    *b () = 2;
}
void *d() { return (void *)c; }

$ gcc -c -flto pr81406.i -O2 -g -fPIC && gcc -shared -fPIC -g pr81406.o
Duplicate attributes in DIE:
DIE    0: DW_TAG_subprogram (0x2b3b30e12230)
  abbrev id: 0 offset: 0 mark: 0
  DW_AT_name: "c.part.0"
  DW_AT_type: die -> 0 (0x2b3b30e12280)
  DW_AT_artificial: 1
  DW_AT_inline: 3
  DW_AT_artificial: 1

during IPA pass: inline
In function ‘c.part.0’:
lto1: internal compiler error: in check_die, at dwarf2out.c:6175
0x6e78db check_die
        ../../gcc/dwarf2out.c:6175
0x70a21e dwarf2out_decl
        ../../gcc/dwarf2out.c:25765
0x70ab9d dwarf2out_abstract_function
        ../../gcc/dwarf2out.c:21660
0xb2a134 expand_call_inline
        ../../gcc/tree-inline.c:4923
0xb2bf84 gimple_expand_calls_inline
        ../../gcc/tree-inline.c:4953
0xb2bf84 optimize_inline_calls(tree_node*)
        ../../gcc/tree-inline.c:5093
0x126a12e inline_transform(cgraph_node*)
        ../../gcc/ipa-inline-transform.c:705
0x9c7b76 execute_one_ipa_transform_pass
        ../../gcc/passes.c:2234
0x9c7b76 execute_all_ipa_transforms()
        ../../gcc/passes.c:2276
0x69294f cgraph_node::expand()
        ../../gcc/cgraphunit.c:2045
0x693f40 expand_all_functions
        ../../gcc/cgraphunit.c:2188
0x693f40 symbol_table::compile()
        ../../gcc/cgraphunit.c:2540
0x5f4f1f lto_main()
        ../../gcc/lto/lto.c:3334

Started with r224393, adding Aldy.

Reply via email to