gcc/libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c

51 lines
757 B
C
Raw Normal View History

/* { dg-do run } */
Remove dg-options -O2 in libgomp.c 2015-06-15 Tom de Vries <tom@codesourcery.com> * testsuite/libgomp.c/atomic-1.c: Remove dg-options "-O2". Use dg-additional-options for any remaining options. * testsuite/libgomp.c/atomic-2.c: Same. * testsuite/libgomp.c/atomic-4.c: Same. * testsuite/libgomp.c/atomic-5.c: Same. * testsuite/libgomp.c/atomic-6.c: Same. * testsuite/libgomp.c/autopar-1.c: Same. * testsuite/libgomp.c/copyin-1.c: Same. * testsuite/libgomp.c/copyin-2.c: Same. * testsuite/libgomp.c/copyin-3.c: Same. * testsuite/libgomp.c/examples-4/e.53.5.c: Same. * testsuite/libgomp.c/nestedfn-5.c: Same. * testsuite/libgomp.c/parloops-exit-first-loop-alt-2.c: Same. * testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c: Same. * testsuite/libgomp.c/parloops-exit-first-loop-alt-4.c: Same. * testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same. * testsuite/libgomp.c/pr32362-1.c: Same. * testsuite/libgomp.c/pr32362-2.c: Same. * testsuite/libgomp.c/pr32362-3.c: Same. * testsuite/libgomp.c/pr39591-1.c: Same. * testsuite/libgomp.c/pr39591-2.c: Same. * testsuite/libgomp.c/pr39591-3.c: Same. * testsuite/libgomp.c/pr58392.c: Same. * testsuite/libgomp.c/pr58756.c: Same. * testsuite/libgomp.c/simd-1.c: Same. * testsuite/libgomp.c/simd-10.c: Same. * testsuite/libgomp.c/simd-11.c: Same. * testsuite/libgomp.c/simd-12.c: Same. * testsuite/libgomp.c/simd-13.c: Same. * testsuite/libgomp.c/simd-14.c: Same. * testsuite/libgomp.c/simd-15.c: Same. * testsuite/libgomp.c/simd-2.c: Same. * testsuite/libgomp.c/simd-3.c: Same. * testsuite/libgomp.c/simd-4.c: Same. * testsuite/libgomp.c/simd-5.c: Same. * testsuite/libgomp.c/simd-6.c: Same. * testsuite/libgomp.c/simd-7.c: Same. * testsuite/libgomp.c/simd-8.c: Same. * testsuite/libgomp.c/simd-9.c: Same. From-SVN: r224489
2015-06-15 20:10:51 +02:00
/* { dg-additional-options "-ftree-parallelize-loops=2" } */
/* Constant bound, vector addition. */
#include <stdio.h>
#include <stdlib.h>
#define N 1000
unsigned int a[N];
unsigned int b[N];
unsigned int c[N];
void __attribute__((noclone,noinline))
f (void)
{
int i;
for (i = 0; i < N; ++i)
c[i] = a[i] + b[i];
}
int
main (void)
{
int i, j;
/* Complexify loop to inhibit parloops. */
for (j = 0; j < 100; ++j)
for (i = 0; i < 10; i++)
{
int k = i + (10 * j);
a[k] = k;
b[k] = (k * 3) % 7;
c[k] = k * 2;
}
f ();
for (i = 0; i < N; i++)
{
unsigned int actual = c[i];
unsigned int expected = i + ((i * 3) % 7);
if (actual != expected)
abort ();
}
return 0;
}