6be5c241bb
2015-08-24 Tom de Vries <tom@codesourcery.com> PR tree-optimization/65468 * omp-low.c (expand_omp_for_static_chunk): Remove inner loop if chunk_size is one. * gcc.dg/gomp/static-chunk-size-one.c: New test. * testsuite/libgomp.c/static-chunk-size-one.c: New test. From-SVN: r227124
24 lines
275 B
C
24 lines
275 B
C
extern void abort ();
|
|
|
|
int
|
|
bar ()
|
|
{
|
|
int a = 0, i;
|
|
|
|
#pragma omp parallel for num_threads (3) reduction (+:a) schedule(static, 1)
|
|
for (i = 0; i < 10; i++)
|
|
a += i;
|
|
|
|
return a;
|
|
}
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
int res;
|
|
res = bar ();
|
|
if (res != 45)
|
|
abort ();
|
|
return 0;
|
|
}
|