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

            Bug ID: 95695
           Summary: -gcolumn-info is unstable with LTO and --save-temps
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org, rguenth at gcc dot gnu.org
  Target Milestone: ---

It originally comes from:
https://bugzilla.suse.com/show_bug.cgi?id=1172846

Richi reduced the following test-case:

$ cat demo.C
#include <iostream>
int main() {
    std::cout << "Hello world!" << std::endl;
    return 0;
}

$ g++ -gcolumn-info -flto -g -O2 demo.C && readelf --wide --debug-dump=info
a.out > 1
$ g++ -gcolumn-info -flto -g -O2 demo.C --save-temps && readelf --wide
--debug-dump=info a.out > 2
$ diff -u 1 2 | head
--- 1   2020-06-16 10:55:00.308735283 +0200
+++ 2   2020-06-16 10:55:07.084696652 +0200
@@ -995,7 +995,7 @@
     <80a>   DW_AT_name        : (indirect string, offset: 0x1808): size_t
     <80e>   DW_AT_decl_file   : 3
     <80f>   DW_AT_decl_line   : 2355
-    <811>   DW_AT_decl_column : 26
+    <811>   DW_AT_decl_column : 29
     <812>   DW_AT_type        : <0x11ad>
  <2><816>: Abbrev Number: 23 (DW_TAG_namespace)

Reply via email to