This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/57080] Invalid optimization (-O2) when doing double -> int conversion (on big endian archs(?))
- From: "mikpe at it dot uu.se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 26 Apr 2013 11:49:44 +0000
- Subject: [Bug c/57080] Invalid optimization (-O2) when doing double -> int conversion (on big endian archs(?))
- Auto-submitted: auto-generated
- References: <bug-57080-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57080
--- Comment #3 from Mikael Pettersson <mikpe at it dot uu.se> 2013-04-26 11:49:44 UTC ---
Created attachment 29946
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29946
test case
I can reproduce the issue on m68k: with the attached test case I get 4 on
m68k-linux (big-endian), but 5 on x86_64-linux (little-endian).
I don't see any conversions to char or unsigned, so I don't think PR27394 is
related.
The issue goes away with -ffloat-store on m68k. I haven't analyzed it further.
On the big-endian armv5teb-linux-gnueabi I get 5, but it's soft-fp.