This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28042] optimizer (-O2) changes the semantics of my programs
- From: "tonyg-gccbugzilla at lshift dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2006 09:28:38 -0000
- Subject: [Bug middle-end/28042] optimizer (-O2) changes the semantics of my programs
- References: <bug-28042-12834@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from tonyg-gccbugzilla at lshift dot net 2006-06-16 09:28 -------
Even better, if you remove the redundant parens, so that the program reads
...
if ((integerValue >= 0)
&& (integerValue >= -1073741824) && (integerValue < 1073741824)) {
...
then the optimizer generates code correctly! (How on earth can paren placement
affect code generation???)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28042