26 lines
295 B
C
Raw Normal View History

2015-08-28 17:33:40 +02:00
/* { dg-do run } */
int
main(void)
{
#define I 5
#define N 11
#define A 8
int a = A;
int s = I;
#pragma acc parallel vector_length(N)
{
int i;
#pragma acc loop reduction(+:s)
for (i = 0; i < N; ++i)
s += a;
}
if (s != I + N * A)
__builtin_abort();
return 0;
}