https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107339
--- Comment #5 from Andrew Pinski ---
That is because with the non pointer case gcc can figure out the alignment
without having to assume via pointers.
Note the original code is also undefined by the c standard even the non pointer
case you gav
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107339
--- Comment #4 from yy ---
It works to use "uint32_t_ua", but it still works to use "uint32_t" and just
change the function parameter from the structure pointer to the structure. "The
following is the assembly code
0: 00154703
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107339
--- Comment #3 from Andrew Pinski ---
Again, the problem is the access via uint32_t which says it is an aligned
access.
This is why you need uint32_t_ua there.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107339
--- Comment #2 from yy ---
(In reply to Andrew Pinski from comment #1)
> 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 __attribu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107339
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|UNCONFIRMED