* c-c++-common/Wrestrict.c (test_strcpy_range): Revert latest change.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / data-clauses.h
blobd557befba354d05fc71bc3aeb371e2bd3d17b1d0
1 int i;
3 int main(void)
5 int j, v;
7 i = -1;
8 j = -2;
9 v = 0;
10 #pragma acc CONSTRUCT /* copyout */ present_or_copyout (v) copyin (i, j)
12 if (i != -1 || j != -2)
13 __builtin_abort ();
14 i = 2;
15 j = 1;
16 if (i != 2 || j != 1)
17 __builtin_abort ();
18 v = 1;
20 #if ACC_MEM_SHARED
21 if (v != 1 || i != 2 || j != 1)
22 __builtin_abort ();
23 #else
24 if (v != 1 || i != -1 || j != -2)
25 __builtin_abort ();
26 #endif
28 i = -1;
29 j = -2;
30 v = 0;
31 #pragma acc CONSTRUCT /* copyout */ present_or_copyout (v) copyout (i, j)
33 i = 2;
34 j = 1;
35 if (i != 2 || j != 1)
36 __builtin_abort ();
37 v = 1;
39 if (v != 1 || i != 2 || j != 1)
40 __builtin_abort ();
42 i = -1;
43 j = -2;
44 v = 0;
45 #pragma acc CONSTRUCT /* copyout */ present_or_copyout (v) copy (i, j)
47 if (i != -1 || j != -2)
48 __builtin_abort ();
49 i = 2;
50 j = 1;
51 if (i != 2 || j != 1)
52 __builtin_abort ();
53 v = 1;
55 if (v != 1 || i != 2 || j != 1)
56 __builtin_abort ();
58 i = -1;
59 j = -2;
60 v = 0;
61 #pragma acc CONSTRUCT /* copyout */ present_or_copyout (v) create (i, j)
63 i = 2;
64 j = 1;
65 if (i != 2 || j != 1)
66 __builtin_abort ();
67 v = 1;
69 #if ACC_MEM_SHARED
70 if (v != 1 || i != 2 || j != 1)
71 __builtin_abort ();
72 #else
73 if (v != 1 || i != -1 || j != -2)
74 __builtin_abort ();
75 #endif
77 i = -1;
78 j = -2;
79 v = 0;
80 #pragma acc CONSTRUCT /* copyout */ present_or_copyout (v) present_or_copyin (i, j)
82 if (i != -1 || j != -2)
83 __builtin_abort ();
84 i = 2;
85 j = 1;
86 if (i != 2 || j != 1)
87 __builtin_abort ();
88 v = 1;
90 if (v != 1)
91 __builtin_abort ();
92 #if ACC_MEM_SHARED
93 if (v != 1 || i != 2 || j != 1)
94 __builtin_abort ();
95 #else
96 if (v != 1 || i != -1 || j != -2)
97 __builtin_abort ();
98 #endif
100 i = -1;
101 j = -2;
102 v = 0;
103 #pragma acc CONSTRUCT /* copyout */ present_or_copyout (v) present_or_copyout (i, j)
105 i = 2;
106 j = 1;
107 if (i != 2 || j != 1)
108 __builtin_abort ();
109 v = 1;
111 if (v != 1 || i != 2 || j != 1)
112 __builtin_abort ();
114 i = -1;
115 j = -2;
116 v = 0;
117 #pragma acc CONSTRUCT /* copyout */ present_or_copyout (v) present_or_copy (i, j)
119 if (i != -1 || j != -2)
120 __builtin_abort ();
121 i = 2;
122 j = 1;
123 if (i != 2 || j != 1)
124 __builtin_abort ();
125 v = 1;
127 if (v != 1 || i != 2 || j != 1)
128 __builtin_abort ();
130 i = -1;
131 j = -2;
132 v = 0;
133 #pragma acc CONSTRUCT /* copyout */ present_or_copyout (v) present_or_create (i, j)
135 i = 2;
136 j = 1;
137 if (i != 2 || j != 1)
138 __builtin_abort ();
139 v = 1;
141 if (v != 1)
142 __builtin_abort ();
143 #if ACC_MEM_SHARED
144 if (v != 1 || i != 2 || j != 1)
145 __builtin_abort ();
146 #else
147 if (v != 1 || i != -1 || j != -2)
148 __builtin_abort ();
149 #endif
151 i = -1;
152 j = -2;
153 v = 0;
155 #pragma acc data copyin (i, j)
157 #pragma acc CONSTRUCT /* copyout */ present_or_copyout (v) present (i, j)
159 if (i != -1 || j != -2)
160 __builtin_abort ();
161 i = 2;
162 j = 1;
163 if (i != 2 || j != 1)
164 __builtin_abort ();
165 v = 1;
168 #if ACC_MEM_SHARED
169 if (v != 1 || i != 2 || j != 1)
170 __builtin_abort ();
171 #else
172 if (v != 1 || i != -1 || j != -2)
173 __builtin_abort ();
174 #endif
176 i = -1;
177 j = -2;
178 v = 0;
180 #pragma acc data copyin(i, j)
182 #pragma acc CONSTRUCT /* copyout */ present_or_copyout (v)
184 if (i != -1 || j != -2)
185 __builtin_abort ();
186 i = 2;
187 j = 1;
188 if (i != 2 || j != 1)
189 __builtin_abort ();
190 v = 1;
193 #if ACC_MEM_SHARED
194 if (v != 1 || i != 2 || j != 1)
195 __builtin_abort ();
196 #else
197 if (v != 1 || i != -1 || j != -2)
198 __builtin_abort ();
199 #endif
201 return 0;