[Bug debug/82202] Missing debug information in LTO/offload compilation

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 13 11:23:00 GMT 2017


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |lto
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-09-13
                 CC|                            |rguenth at gcc dot gnu.org
            Summary|Missing debug information   |Missing debug information
                   |in offloading compilation   |in LTO/offload compilation
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The same is true for LTO:

> cat t.c
int main() { return 0; }
> gcc-7 t.c -flto -c -g -Wstrict-overflow
> gcc-7 t.o
> readelf -w a.out | grep main
> gcc-7 t.o -g
> readelf -w a.out | grep main
    <189>   DW_AT_name        : (indirect string, offset: 0x248): main
  0x00000240 666c7472 616e7300 6d61696e 0073697a fltrans.main.siz

-g options are handled the same as -W ones, they are not streamed nor merged:

> readelf -x 10 t.o

Hex dump of section '.gnu.lto_.opts':
  0x00000000 272d666d 6174682d 6572726e 6f272027 '-fmath-errno' '
  0x00000010 2d667369 676e6564 2d7a6572 6f732720 -fsigned-zeros' 
  0x00000020 272d6674 72617070 696e672d 6d617468 '-ftrapping-math
  0x00000030 2720272d 666e6f2d 74726170 76272027 ' '-fno-trapv' '
  0x00000040 2d666e6f 2d737472 6963742d 6f766572 -fno-strict-over
  0x00000050 666c6f77 2720272d 666e6f2d 6f70656e flow' '-fno-open
  0x00000060 6d702720 272d666e 6f2d6f70 656e6163 mp' '-fno-openac
  0x00000070 63272027 2d6d7475 6e653d67 656e6572 c' '-mtune=gener
  0x00000080 69632720 272d6d61 7263683d 7838362d ic' '-march=x86-
  0x00000090 36342720 272d666c 746f2700          64' '-flto'.


More information about the Gcc-bugs mailing list