This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53707] compiler generates wrong code
- 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: Tue, 03 Jul 2012 09:56:33 +0000
- Subject: [Bug c++/53707] compiler generates wrong code
- Auto-submitted: auto-generated
- References: <bug-53707-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #15 from Mikael Pettersson <mikpe at it dot uu.se> 2012-07-03 09:56:33 UTC ---
Created attachment 27734
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27734
cleaned up test case
This cleaned up version of the small C test case should be free of any
technical problems, I hope. Gives the same result for -O2 and -O3 with 4.4.7,
4.5.4, 4.7.1, and 4.8.0 (all on x86_64-linux), but with 4.6.4 it returns
different results for -O2 and -O3.
Weirdly enough, changing the comparison operator from ">" to "<" makes 4.6.4
return the same result for both -O2 and -O3.