https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118900
--- Comment #2 from Anonymous ---
(In reply to Andrew Pinski from comment #1)
> ((&b[1] - (a & ~a)) - a) goes outside of the array bounds of b. so it
> becomes undefined, at the second iteration
>
> But in this case, it just happens the address
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118900
--- Comment #3 from Andrew Pinski ---
The undefinedness in this case is recorded as PR 118721 not being able to
detected by ubsan.
But even then you can still run into issues like this where `&b[2] == &c` at
different optimization levels becaus
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118900
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|UNCONFIRMED