[Bug lto/107030] Emitted binary code changes when -g is enabled at -O2 -flto and optimize attribute

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 26 09:25:54 GMT 2022


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-09-26
           Keywords|                            |compare-debug-failure
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
The difference is that with -g 'd' is not emitted:

@@ -46,10 +57,217 @@
        .size   a, 4
 a:
        .zero   4
-       .align 8
-       .type   d, @object
-       .size   d, 8
-d:
-       .zero   8
+       .text
+.Letext0:
+       .section        .debug_info,"",@progbits

with just -fwhole-program but without -flto 'd' is emitted in both cases.


More information about the Gcc-bugs mailing list