https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112573

--- Comment #2 from Julius Werner <jwerner at chromium dot org> ---
Sorry, I don't really know what reassociation means in this context. Are you
saying that the behavior is WAI?

Note that the problem also exists when you write the accesses in h() as:

        *(a + (y + 3)) = (char)x;

so I don't really think this is just an order-of-operations / overflow thing
(also, how would that explain why it only occurs with -fdata-sections?).
According to my understanding of C, `*(a + (y + 3))` and `a[y + 3]` are
different notations for exactly the same expression, so they shouldn't generate
different code.

Reply via email to