public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/30730] -Wunsafe-loop-optimizations gives too many warnings
Date: Thu, 08 Feb 2007 09:34:00 -0000 [thread overview]
Message-ID: <20070208093414.25725.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30730-5650@http.gcc.gnu.org/bugzilla/>
------- 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
next prev parent reply other threads:[~2007-02-08 9:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-07 20:25 [Bug c/30730] New: " roland dot illig at gmx dot de
2007-02-08 9:34 ` rguenth at gcc dot gnu dot org [this message]
2007-02-08 9:38 ` [Bug tree-optimization/30730] " rakdver at gcc dot gnu dot org
2007-03-14 0:39 ` rakdver at gcc dot gnu dot org
2007-07-10 8:31 ` spop at gcc dot gnu dot org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070208093414.25725.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).