This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/43089] Optimizer ignores type in a conversion
- From: "0xe2 dot 0x9a dot 0x9b at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Feb 2010 10:59:29 -0000
- Subject: [Bug tree-optimization/43089] Optimizer ignores type in a conversion
- References: <bug-43089-18793@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from 0xe2 dot 0x9a dot 0x9b at gmail dot com 2010-02-16 10:59 -------
(In reply to comment #1)
> 0x7fffffff + 1 overflows. Signed overflow invokes undefined behavior.
Like so what? Is this your way of saying "I am not going to fix it"? Do you
find it convenient to hide your laziness behind the words "undefined behavior".
If I were to modify the test case like this:
int i = ab.b;
b2 = i + i;
I would be ALSO triggering undefined behavior. But the modified test-case would
succeed at any optimization level.
I don't think you understand what I am demanding here: I demand the compiler to
have CONSISTENT BEHAVIOR in cases which are not defined by the standard. The
modified code does clearly the SAME thing as the code in the test-case, only
the intermediate conversion to the integer is now more explicit.
--
0xe2 dot 0x9a dot 0x9b at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43089