diff options
author | Alexander Monakov <amonakov@ispras.ru> | 2017-04-20 20:21:50 +0300 |
---|---|---|
committer | Alexander Monakov <amonakov@gcc.gnu.org> | 2017-04-20 20:21:50 +0300 |
commit | 2260d19d4be6218c0dfffe6f87fc7665a09d5ba5 (patch) | |
tree | d48f636ed59fd051513d237e7f224ac325b3b196 /libgomp/testsuite | |
parent | c3cbcd451736f5257446e927bb880ace569f4a45 (diff) | |
download | gcc-2260d19d4be6218c0dfffe6f87fc7665a09d5ba5.zip gcc-2260d19d4be6218c0dfffe6f87fc7665a09d5ba5.tar.gz gcc-2260d19d4be6218c0dfffe6f87fc7665a09d5ba5.tar.bz2 |
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
Diffstat (limited to 'libgomp/testsuite')
-rw-r--r-- | libgomp/testsuite/libgomp.c/target-36.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/target-36.c b/libgomp/testsuite/libgomp.c/target-36.c new file mode 100644 index 0000000..6925a2a --- /dev/null +++ b/libgomp/testsuite/libgomp.c/target-36.c @@ -0,0 +1,18 @@ +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 (); +} |