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:46:12 +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
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to anders.blomdell from comment #5)
> No, but my users insists on using Matlab/Simulink, and the testcase is a
> heavily downsized version of what is done in their S-functions.
I mean - seriously storing a pointer as FP values of the upper/lower word
of the pointer? So I suppose this is what Matlab/Simulink generate internally
and what gets compiled - thus this is machine generated?
A workaround is to use -fno-tree-pta btw (for 64bit pointers the out-of-bound
write still occurs, but that may be due to your simplification?).