On Thu, 16 Oct 2014, Jakub Jelinek wrote: > On Thu, Oct 16, 2014 at 03:44:50PM +0200, Richard Biener wrote: > > --- gcc/testsuite/gcc.dg/tree-ssa/loop-42.c (revision 0) > > +++ gcc/testsuite/gcc.dg/tree-ssa/loop-42.c (working copy) > > @@ -0,0 +1,19 @@ > > +/* { dg-do run } */ > > +/* { dg-options "-O2 -fdump-tree-cunroll-details" } */ > > + > > +extern void abort (void); > > +int a = -1; > > +int n = sizeof (int); > > +int main() > > +{ > > + char *p; > > + int i; > > + for (i = 0, p = (char *)&a; i < n; ++i) > > + *p++ = 0; > > + if (a != 0) > > + abort (); > > + return 0; > > +} > > + > > +/* { dg-final { scan-tree-dump "loop with 4 iterations completely > > unrolled" "cunroll" } } */ > > This will fail on all targets where sizeof (int) is not 4 :(. > So, I think you need to guard this scan-tree-dump with { target int32 }.
I'll adjust the testcase to scan for "loop with . iterations" instead. Richard.