gcc/libgomp/testsuite/libgomp.c/target-36.c
Alexander Monakov 2260d19d4b omp-low: fix lastprivate/linear lowering for SIMT
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
2017-04-20 20:21:50 +03:00

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 ();
}