[Bug tree-optimization/90668] loop invariant moving a dependent store out of a loop
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 29 16:00:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90668
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> If the size of int and void* are the same, I would say there is an issue.
> Otherwise there is undefined behavior going on.
>
> The reason for the difference in sizes matter is because you write via void*
> and then read the second half via int.
I mean when n is non-1.
Note your testcase is also dependent on the endian order of the target if
sizeof(void*)!=sizeof(int).
More information about the Gcc-bugs
mailing list