This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/88433] wrong code for printf after a pointer cast from a pointer to an adjacent object
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 11 Dec 2018 00:50:09 +0000
- Subject: [Bug target/88433] wrong code for printf after a pointer cast from a pointer to an adjacent object
- Auto-submitted: auto-generated
- References: <bug-88433-4@http.gcc.gnu.org/bugzilla/>
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.