aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-06-11 18:40:10 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-06-11 18:40:10 +0200
commitce9c4ec3c5e70023b27e49c2fb45eafaddec9a14 (patch)
tree263460c3e2e396e21941f20240ba4c778b86c656 /libgomp
parentd37c29f94234b8b62334f895b69c992bea6a6f10 (diff)
downloadgcc-ce9c4ec3c5e70023b27e49c2fb45eafaddec9a14.zip
gcc-ce9c4ec3c5e70023b27e49c2fb45eafaddec9a14.tar.gz
gcc-ce9c4ec3c5e70023b27e49c2fb45eafaddec9a14.tar.bz2
re PR target/90811 ([nvptx] ptxas error on OpenMP offloaded code)
PR target/90811 * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Use and.b%d instead of and.u%d. * testsuite/libgomp.c/pr90811.c: New test. From-SVN: r272161
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.c/pr90811.c29
2 files changed, 34 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 2ea937e..3487880 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2019-06-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/90811
+ * testsuite/libgomp.c/pr90811.c: New test.
+
2019-06-05 Jakub Jelinek <jakub@redhat.com>
* testsuite/libgomp.c++/lastprivate-conditional-1.C: New test.
diff --git a/libgomp/testsuite/libgomp.c/pr90811.c b/libgomp/testsuite/libgomp.c/pr90811.c
new file mode 100644
index 0000000..25b7d78
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/pr90811.c
@@ -0,0 +1,29 @@
+/* PR target/90811 */
+
+int
+main ()
+{
+ long long a[100], b[100];
+ int i;
+ for (i = 0; i < 100; i++)
+ {
+ a[i] = i;
+ b[i] = i % 10;
+ }
+ #pragma omp target teams distribute parallel for simd map(tofrom: a[:100], b[:100])
+ for (i = 0; i < 100; i++)
+ {
+ long long c = 0;
+ const long long d[] = { 1, 3, 5, 7, 9 };
+ for (int j = 4; j >= 0; j--)
+ c = d[j] + b[i] * c;
+ a[i] += c;
+ }
+ for (i = 0; i < 100; i++)
+ {
+ const long long r[] = { 1, 26, 229, 976, 2849, 6646, 13381, 24284, 40801, 64594 };
+ if (a[i] != r[i % 10] + (i / 10 * 10))
+ __builtin_abort ();
+ }
+ return 0;
+}