https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98582
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- That testcase is invalid C, violates the aliasing rules, so either you need -fno-strict-aliasing, or use typedef uint16_t alias_int16_t __attribute__((may_alias)); and change hdr type to be const alias_int16_t *.