summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authoramonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-20 17:59:25 +0000
committeramonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-20 17:59:25 +0000
commitafe8fc0f80594d86d9cd93feb70d10008428d276 (patch)
treef58513e3bcc6ccd76454ffd989ac904e777b3a7a /libgomp
parent6125c940f74ccf71f8b69e58539ae838877978fb (diff)
omp-low: fix lastprivate/linear lowering for SIMT
Backport from mainline r247029 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@247032 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog7
-rw-r--r--libgomp/testsuite/libgomp.c/target-36.c18
2 files changed, 25 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 5ab1b2a90665..806986654a9d 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,10 @@
+2017-04-20 Alexander Monakov <amonakov@ispras.ru>
+
+ Backport from mainline
+ 2017-04-20 Alexander Monakov <amonakov@ispras.ru>
+
+ * testsuite/libgomp.c/target-36.c: New testcase.
+
2017-04-13 Jakub Jelinek <jakub@redhat.com>
* plugin/plugin-nvptx.c (cuda_lib_inited): Use signed char type
diff --git a/libgomp/testsuite/libgomp.c/target-36.c b/libgomp/testsuite/libgomp.c/target-36.c
new file mode 100644
index 000000000000..6925a2a63dee
--- /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 ();
+}