public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/56051] Wrong expression evaluation
Date: Sun, 20 Jan 2013 18:09:00 -0000 [thread overview]
Message-ID: <bug-56051-4-v3x8oPcF6f@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56051-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56051
--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> 2013-01-20 18:09:40 UTC ---
(In reply to comment #3)
> Untested fix. As the testcase shows, also a widening conversion can be a
> problem, if it extends from signed integral type to wider unsigned one, because
> then for Y equal to bitsize of the narrower type - 1 we get more than one bit
> set.
I assume this is because of the gcc extension documented as:
"GCC does not use the latitude given in C99 only to treat certain aspects of
signed `<<' as undefined, but this is subject to change."
which prevents from assuming that 1<<n is positive. Maybe that can be changed
at some point, as the documentation suggests? ;-)
PS: sorry for setting it to the middle-end component, I mistakenly believed
that tree-optimization was only for SSA.
next prev parent reply other threads:[~2013-01-20 18:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-20 11:46 [Bug c/56051] New: " olivier.gay at gmail dot com
2013-01-20 12:24 ` [Bug c/56051] " glisse at gcc dot gnu.org
2013-01-20 14:11 ` [Bug middle-end/56051] " mikpe at it dot uu.se
2013-01-20 16:43 ` [Bug tree-optimization/56051] " jakub at gcc dot gnu.org
2013-01-20 16:46 ` jakub at gcc dot gnu.org
2013-01-20 18:09 ` glisse at gcc dot gnu.org [this message]
2013-01-20 18:35 ` jakub at gcc dot gnu.org
2013-01-20 20:17 ` glisse at gcc dot gnu.org
2013-01-21 17:56 ` jakub at gcc dot gnu.org
2013-01-21 18:02 ` jakub at gcc dot gnu.org
2013-02-01 14:12 ` jakub at gcc dot gnu.org
2013-02-01 14:33 ` jakub at gcc dot gnu.org
2013-04-12 16:29 ` jakub at gcc dot gnu.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=bug-56051-4-v3x8oPcF6f@http.gcc.gnu.org/bugzilla/ \
--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).