[Bug rtl-optimization/104589] Emitted binary code changes when -g is enabled at -O0 -flto and optimize attribute
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 18 07:45:11 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104589
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Keywords| |compare-debug-failure
Component|lto |rtl-optimization
Last reconfirmed| |2022-02-18
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. .optimized are the same besides UID differences. The only
visible RTL difference is
-(insn 17 16 32 4 (set (reg:SI 0 ax [orig:84 _4 ] [84])
+(insn 17 16 18 4 (set (reg:SI 0 ax [orig:84 _4 ] [84])
(sign_extend:SI (reg:HI 0 ax [orig:86 _6 ] [86]))) "t.c":9:15 158
{exte
ndhisi2}
(nil))
-(insn 32 17 18 4 (const_int 0 [0]) "t.c":9:15 928 {nop}
- (nil))
-(code_label 18 32 19 5 3 (nil) [1 uses])
-(note 19 18 48 5 [bb 5] NOTE_INSN_BASIC_BLOCK)
-(note 48 19 20 5 0x7ffff63501e0 NOTE_INSN_BLOCK_END)
-(insn 20 48 49 5 (set (mem/c:SI (symbol_ref:DI ("c") [flags 0x2] <var_decl
0x7
ffff6523d80 c>) [2 c+0 S4 A32])
+(code_label 18 17 19 5 3 (nil) [1 uses])
+(note 19 18 20 5 [bb 5] NOTE_INSN_BASIC_BLOCK)
+(insn 20 19 21 5 (set (mem/c:SI (symbol_ref:DI ("c") [flags 0x2] <var_decl
0x7
ffff6523d80 c>) [2 c+0 S4 A32])
(reg:SI 0 ax [orig:84 _4 ] [84])) "t.c":7:5 81 {*movsi_internal}
(nil))
so there's an explicit extra 'nop' and a missing BLOCK_END note.
-gno-statement-frontiers does not fix it.
More information about the Gcc-bugs
mailing list