https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107339
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The code is broken.
uint32_t here is aligned to 32bits and you access it via that type.
this is the correct fix:
typedef uint32_t uint32_t_ua __attribute__((aligned(1)));
void tttt (misalign_t* t){
printf("%x\n",(*(const uint32_t_ua *)&t->rseq[0]));
printf("%x\n",(*(const uint32_t_ua *)&t->rseq[1]));
}