http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
vries at gcc dot gnu.org changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
--- Comment #12 from vries at gcc dot gnu.org 2012-09-07 09:21:31 UTC ---
Author: vries
Date: Fri Sep 7 09:21:21 2012
New Revision: 191058
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191058
Log:
2012-09-07 Tom de Vries
PR tree-o
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
--- Comment #11 from vries at gcc dot gnu.org 2012-09-07 09:21:18 UTC ---
Author: vries
Date: Fri Sep 7 09:21:11 2012
New Revision: 191057
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191057
Log:
2012-09-07 Tom de Vries
PR tree-o
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
--- Comment #11 from vries at gcc dot gnu.org 2012-09-07 09:21:18 UTC ---
Author: vries
Date: Fri Sep 7 09:21:11 2012
New Revision: 191057
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191057
Log:
2012-09-07 Tom de Vries
PR tree-o
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
--- Comment #10 from vries at gcc dot gnu.org 2012-08-06 08:37:51 UTC ---
> This tentative patch fixes the problem. I'm currently testing it, let's see if
> I run into any trouble.
Committed in r190168.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
--- Comment #9 from vries at gcc dot gnu.org 2012-08-05 18:16:21 UTC ---
test-case for LSHIFT_EXPR vrp:
...
extern void link_error (void);
void
f3 (int s, int b)
{
if (s >> 3 == -2)
/* s in range [-16, -9]. */
{
s += 17;
/*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
--- Comment #8 from vries at gcc dot gnu.org 2012-08-05 15:31:39 UTC ---
Created attachment 27944
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27944
tree-switch-conversion-fix-undefined-overflow-introduction.patch, tentative
patch
> Anyway,
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
--- Comment #7 from stevenb.gcc at gmail dot com
2012-08-05 13:53:30 UTC ---
On Sun, Aug 5, 2012 at 3:32 PM, vries at gcc dot gnu.org
wrote:
> I think you forgot the cast to unsigned after the add that represents the
> currently generated code:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
--- Comment #6 from vries at gcc dot gnu.org 2012-08-05 13:32:15 UTC ---
> s_1 (u)s_1 s_1+16 ((u)s_1)+16 T T
> -16 4294967280 0 00 0
> -12 4294967284 4 40
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
--- Comment #5 from Steven Bosscher 2012-08-05
11:35:40 UTC ---
Just to illustrate:
$ cat t.c
#include
int
main (void)
{
int cases[] = { -16, -12, -9, -17 };
int i, v;
printf ("Show why cast must happen after add. T==1 iff (D.1732_8 != 0)\
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
--- Comment #4 from Steven Bosscher 2012-08-05
11:05:56 UTC ---
(In reply to comment #3)
> I think we should cast to unsigned first, then add.
No, see what happens to "case -12" if you use ((unsigned)s_1+16).
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
vries at gcc dot gnu.org changed:
What|Removed |Added
Keywords||wrong-code
CC|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
--- Comment #2 from vries at gcc dot gnu.org 2012-07-23 06:29:51 UTC ---
> Btw, if the switch is not converted to a bit-test the path to link_error is
> also not removed by vrp, because it doesn't handle anti-ranges for switches
submitted patch fo
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53986
Richard Guenther changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
14 matches
Mail list logo