2260d19d4b
gcc/ * omp-low.c (lower_lastprivate_clauses): Correct handling of linear and lastprivate clauses in SIMT case. libgomp/ * testsuite/libgomp.c/target-36.c: New testcase. From-SVN: r247029
19 lines
295 B
C
19 lines
295 B
C
int
|
|
main ()
|
|
{
|
|
int ah, bh, n = 1024;
|
|
#pragma omp target map(from: ah, bh)
|
|
{
|
|
int a, b;
|
|
#pragma omp simd lastprivate(b)
|
|
for (a = 0; a < n; a++)
|
|
{
|
|
b = a + n + 1;
|
|
asm volatile ("" : "+r"(b));
|
|
}
|
|
ah = a, bh = b;
|
|
}
|
|
if (ah != n || bh != 2 * n)
|
|
__builtin_abort ();
|
|
}
|