This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix missed VRP for unsigned addition


On Fri, 24 Apr 2009, Eric Botcazou wrote:

> > Index: gcc/testsuite/gcc.dg/tree-ssa/vrp48.c
> > ===================================================================
> > *** gcc/testsuite/gcc.dg/tree-ssa/vrp48.c	(revision 0)
> > --- gcc/testsuite/gcc.dg/tree-ssa/vrp48.c	(revision 0)
> > ***************
> > *** 0 ****
> > --- 1,20 ----
> > + extern void link_failure (void);
> > +
> > + static int __attribute__ ((noinline)) foo (int x)
> > + {
> > +   if (x >= 1)
> > +     if (x <= 10)
> > +       {
> > + 	if (x < 1 || x > 10)
> > + 	  link_failure ();
> > + 	x = x + 1;
> > +       }
> > +   return x;
> > + }
> > +
> > + int main (void)
> > + {
> > +   int i = foo (0);
> > +   return 0;
> > + }
> > +
> 
> You need
> 
> /* { dg-do link } */
> /* { dg-options "-O2" } */

Argh.  Of course ;)

I'll fix it momentarily.

Thanks,
Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]