31432e219f
2012-03-08 Richard Guenther <rguenther@suse.de> PR tree-optimization/46886 * tree-flow.h (do_while_loop_p): Declare. * tree-ssa-loop-ch.c (do_while_loop_p): Export. * tree-parloops.c (parallelize_loops): Only parallelize do-while loops. * testsuite/libgomp.c/pr46886.c: New testcase. From-SVN: r184010
29 lines
420 B
C
29 lines
420 B
C
/* { dg-do run } */
|
|
/* { dg-options "-O -ftree-parallelize-loops=4 -fno-tree-ch -fno-tree-dominator-opts" } */
|
|
|
|
void abort(void);
|
|
|
|
int d[1024], e[1024];
|
|
|
|
int foo (void)
|
|
{
|
|
int s = 0;
|
|
int i;
|
|
for (i = 0; i < 1024; i++)
|
|
s += d[i] - e[i];
|
|
return s;
|
|
}
|
|
|
|
int main ()
|
|
{
|
|
int i;
|
|
for (i = 0; i < 1024; i++)
|
|
{
|
|
d[i] = i * 2;
|
|
e[i] = i;
|
|
}
|
|
if (foo () != 1023 * 1024 / 2)
|
|
abort ();
|
|
return 0;
|
|
}
|