[Bug lto/107030] Emitted binary code changes when -g is enabled at -O2 -flto and optimize attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107030 Richard Biener 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 --- 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.
[Bug lto/107030] Emitted binary code changes when -g is enabled at -O2 -flto and optimize attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107030 --- Comment #2 from Andreas Schwab --- But -g is supposed to never change the generated code.
[Bug lto/107030] Emitted binary code changes when -g is enabled at -O2 -flto and optimize attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107030 --- Comment #1 from Andrew Pinski --- I doubt this is a bug. The difference is in the got. If anything the got is slightly different.