This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/85616] ARM target using -O2 may cause unaligned access
- From: "denis_second at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 07 May 2018 16:56:30 +0000
- Subject: [Bug target/85616] ARM target using -O2 may cause unaligned access
- Auto-submitted: auto-generated
- References: <bug-85616-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85616
--- Comment #4 from Denis Roux <denis_second at hotmail dot com> ---
I agree that the given example code is breaking the C strict aliasing rule.
However, I do not believe that the issue I'm reporting is related to aliasing.
Further more, adding -fno-strict-aliasing option do not alter the output.
The issue I'm having with the optimized code is that it got optimized from 2
store instructions that do not have alignment restriction into 1 multi-store
instruction the does have alignment restriction. I would have expected that the
optimization would have occurred only if the alignment was guaranteed to be
respected.