This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/65077] memcpy generates incorrect code with floating point numbers and -O1
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Feb 2015 13:36:54 +0000
- Subject: [Bug c/65077] memcpy generates incorrect code with floating point numbers and -O1
- Auto-submitted: auto-generated
- References: <bug-65077-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65077
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Last reconfirmed| |2015-02-16
CC| |rguenth at gcc dot gnu.org
Resolution|INVALID |---
Ever confirmed|0 |1
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah, the issue is actually that we simply disregard passing pointers through
floating point values in points-to analysis:
if (FLOAT_TYPE_P (TREE_TYPE (lhsop)))
/* If the operation produces a floating point result then
assume the value is not produced to transfer a pointer. */
;
which results in
# PT =
s_13 = MEM[(char * {ref-all})&intSptr];
and DSE removing the store to
# .MEM_15 = VDEF <.MEM_11>
s_13->u.f1 = p_6;
we have similar handling for
else if (truth_value_p (code))
/* Truth value results are not pointer (parts). Or at least
very very unreasonable obfuscation of a part. */
;
so if you insist on writing rediculous testcases...