[Bug c++/84525] GCC7: generate movaps instruction when assign to unaligned __int128*

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 23 08:05:00 GMT 2018


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That testcase is invalid C, -fsanitize=undefined would even tell you.
__int128 requires 16-byte alignment and you're violating that.
You can use __int128 temp; memcpy (&temp, abc, sizeof (temp)); ... use temp ...
or __int128 in a __attribute__((packed)) structure etc. to read unaligned
objects.


More information about the Gcc-bugs mailing list