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

            Bug ID: 88389
           Summary: [8/9 Regression] -flto -g -gsplit-dwarf is broken
           Product: gcc
           Version: 8.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

int main()
{
  return 0;
}

> gcc t.c -g -gsplit-dwarf -flto
> gdb ./a.out
GNU gdb (GDB; devel:gcc) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
...
Reading symbols from ./a.out...../../gdb/dwarf2read.c:18815: internal-error:
could not find partial DIE 0x0 in cache [from module /tmp/a.out]

A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) 

also if you do

> gcc -c t.c -g -gsplit-dwarf -flto
> gcc  t.o -g  -flto
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld:
/tmp/ccoEbX2B.ltrans0.ltrans.o:(.debug_info+0x2e): undefined reference to
`t.c.8f05b885'
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld:
/tmp/ccoEbX2B.ltrans0.ltrans.o:(.debug_info+0x33): undefined reference to
`t.c.8f05b885'
collect2: error: ld returned 1 exit status

Reply via email to