[Bug target/88433] wrong code for printf after a pointer cast from a pointer to an adjacent object

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 11 00:50:00 GMT 2018


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

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Then again, the "problem" would disappear if the middle-end could be made to
understand that memcmp(&p, &q, sizeof p) is the same thing as p == q for any
integer or pointer types p and q.  So maybe it is a middle-end issue because
the back-end doesn't know and can't tell that y is the same as *p.


More information about the Gcc-bugs mailing list