https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104407
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |10.4 Keywords| |needs-bisection Last reconfirmed| |2022-02-06 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Known to fail| |10.3.0, 11.1.0 Known to work| |10.2.0 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, the alignment with -g is 64 for the load but 128 without -g. -g: (insn 9 8 10 (set (reg/f:DI 83) (symbol_ref:DI ("a") [flags 0x2] <var_decl 0x7f642e3a7cf0 a>)) "/app/example.cpp":4:6 -1 (nil)) (insn 10 9 11 (set (reg:TI 84) (mem/c:TI (reg/f:DI 83) [1 a+0 S16 A64])) "/app/example.cpp":4:6 -1 (nil)) vs: (insn 6 5 7 (set (reg/f:DI 83) (symbol_ref:DI ("a") [flags 0x2] <var_decl 0x7f69102a2cf0 a>)) "/app/example.cpp":4:6 -1 (nil)) (insn 7 6 8 (set (reg:TI 84) (mem/c:TI (reg/f:DI 83) [1 a+0 S16 A128])) "/app/example.cpp":4:6 -1 (nil)) The alignment in the assembly is 16 (128) for both: .align 16 .type a, @object .size a, 24 a: .zero 24 It not obvious what is causing the issue though. Here is a C++98 testcase that does not depend on C++17 features.