mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-11 03:52:59 +00:00
26 lines
303 B
C
26 lines
303 B
C
/* { dg-do run } */
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
#define I 5
|
|
#define N 32
|
|
#define A 8
|
|
|
|
int a = A;
|
|
int s = I;
|
|
|
|
#pragma acc parallel vector_length(N) copy(s)
|
|
{
|
|
int i;
|
|
#pragma acc loop reduction(+:s)
|
|
for (i = 0; i < N; ++i)
|
|
s += a;
|
|
}
|
|
|
|
if (s != I + N * A)
|
|
__builtin_abort();
|
|
|
|
return 0;
|
|
}
|