blob: 0ac0cf62e45b5d864b5ba6c537db225765a7d754 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/* { dg-do run } */
/* { dg-xfail-run-if "PR78266" { openacc_nvidia_accel_selected } } */
#include <assert.h>
#define test(type) \
void \
test_##type () \
{ \
signed type b[100]; \
signed type i, j, x = -1, y = -1; \
\
_Pragma("acc parallel loop copyout (b)") \
for (j = 0; j > -5; j--) \
{ \
type c = x+y; \
_Pragma("acc loop vector") \
for (i = 0; i < 20; i++) \
b[-j*20 + i] = c; \
b[5-j] = c; \
} \
\
for (i = 0; i < 100; i++) \
assert (b[i] == -2); \
}
test(char)
test(short)
int
main ()
{
test_char ();
test_short ();
return 0;
}
|