[Bug tree-optimization/30730] -Wunsafe-loop-optimizations gives too many warnings
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Feb 8 09:34:00 GMT 2007
------- Comment #1 from rguenth at gcc dot gnu dot org 2007-02-08 09:34 -------
Confirmed. The duplicate warnings are annoying. Note that the warning is
emitted because we change n -= 2 to n += 4294967294 (oops).
>From the .original tree dump:
{
goto <D1972>;
<D1971>:;
n = n + 4294967294;
<D1972>:;
if (n > 10) goto <D1971>; else goto <D1973>;
<D1973>:;
}
this is because 2 is easily negatable and the canonical form in this case
is an addition. While we can fix that, the loop optimizer should be fixed
as well to note that this unsigned addition is just a subtraction of two.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org, rakdver at gcc dot gnu
| |dot org
Status|UNCONFIRMED |NEW
Component|c |tree-optimization
Ever Confirmed|0 |1
GCC build triplet|any |
GCC host triplet|any |
GCC target triplet|any |
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2007-02-08 09:34:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30730
More information about the Gcc-bugs
mailing list