[Bug tree-optimization/78428] [5/6/7 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Nov 21 19:18:00 GMT 2016


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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
Before r218818, struct of 12 bytes is aligned at 4 bytes without -Os
and 8 bytes with -Os.  After r218818, it is always aligned at 8 bytes,
which triggers struct store memory leak:

        movq    %rax, b+8(%rip)

Since b is 12 bytes and a is placed next to b, it overrides a.


More information about the Gcc-bugs mailing list