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

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
There's no compiler bug here.

Cortex-M7 implements the ARMv7em version of the architecture, which supports
unaligned accesses.  If this is faulting then it's because you're trying to use
the operation on something like device memory without informing the compiler
about this.  You need to mark your pointers as volatile in this case.

The alternative is to compile with -mno-unaligned-access, but I wouldn't
recommend this as that will disable other optimizations where this might be
safe and useful.

Reply via email to