[PATCH] Fix PR66952

Richard Biener rguenther@suse.de
Tue Sep 22 07:54:00 GMT 2015


On Tue, 22 Sep 2015, Christophe Lyon wrote:

> On 23 July 2015 at 13:17, Richard Biener <rguenther@suse.de> wrote:
> > On Thu, 23 Jul 2015, Kyrill Tkachov wrote:
> >
> >>
> >> On 23/07/15 10:02, Andreas Schwab wrote:
> >> > Richard Biener <rguenther@suse.de> writes:
> >> >
> >> > > Index: gcc/testsuite/gcc.dg/torture/pr66952.c
> >> > > ===================================================================
> >> > > --- gcc/testsuite/gcc.dg/torture/pr66952.c        (revision 0)
> >> > > +++ gcc/testsuite/gcc.dg/torture/pr66952.c        (working copy)
> >> > > @@ -0,0 +1,28 @@
> >> > > +/* { dg-do run } */
> >> > > +
> >> > > +int a = 128, b;
> >> > > +
> >> > > +static int
> >> > > +fn1 (char p1, int p2)
> >> > > +{
> >> > > +  return p1 < 0 || p1 > 1 >> p2 ? 0 : p1 << 1;
> >> > This is broken, p1 can never be < 0.
> >>
> >> Just mark the chars as signed chars?
> >> The testcase passes for me with that change.
> >
> > Ah - I always forget to double-check such testcases with both
> > -fsinged-char and -funsigned-char...
> >
> > Will fix.
> >
> 
> Hi Richard,
> 
> I looks like you forgot to backport r226104 too (which forces use of
> signed chars).

Whoops - fixed.

Thanks,
Richard.



More information about the Gcc-patches mailing list