[Bug target/91927] -mstrict-align doesn't prevent unaligned accesses at -O2 and -O3 on AARCH64 targets

wilco at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 30 16:56:00 GMT 2019


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

Wilco <wilco at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wilco at gcc dot gnu.org

--- Comment #8 from Wilco <wilco at gcc dot gnu.org> ---
Note gcc.target/aarch64/pr71727.c fails when compiled with -mstrict-align
-fno-common -O3:

        adrp    x2, .LC0
        adrp    x3, .LC1
        adrp    x1, xarray
        add     x0, x1, :lo12:xarray
        ldr     q1, [x2, #:lo12:.LC0]
        mov     x2, 5
        ldr     q0, [x3, #:lo12:.LC1]
        str     x2, [x0, 32]
        str     q1, [x1, #:lo12:xarray]
        str     q0, [x0, 16]
        ret

        .bss
        .align  4
        .type   xarray, %object
        .size   xarray, 5120
xarray:
        .zero   5120


More information about the Gcc-bugs mailing list