aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-02-11 14:40:31 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2015-02-11 14:40:31 +0100
commitfa01ffccc77fd08b566642487b05eea568a28e60 (patch)
treee1632c6ff1de20355a3f4f7074b072de291d3d44 /libgomp
parentc43ade800481f77c8fcd70c6d795b0adee045810 (diff)
downloadgcc-fa01ffccc77fd08b566642487b05eea568a28e60.zip
gcc-fa01ffccc77fd08b566642487b05eea568a28e60.tar.gz
gcc-fa01ffccc77fd08b566642487b05eea568a28e60.tar.bz2
re PR middle-end/64824 (ICE in gimple verification)
PR c/64824 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec check in the POP macro. * testsuite/libgomp.c/atomic-18.c: New test. * testsuite/libgomp.c++/atomic-16.C: New test. From-SVN: r220617
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog6
-rw-r--r--libgomp/testsuite/libgomp.c++/atomic-16.C5
-rw-r--r--libgomp/testsuite/libgomp.c/atomic-18.c61
3 files changed, 72 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 21b42d1..6c24531 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,9 @@
+2015-02-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/64824
+ * testsuite/libgomp.c/atomic-18.c: New test.
+ * testsuite/libgomp.c++/atomic-16.C: New test.
+
2015-02-04 Jakub Jelinek <jakub@redhat.com>
PR c/64824
diff --git a/libgomp/testsuite/libgomp.c++/atomic-16.C b/libgomp/testsuite/libgomp.c++/atomic-16.C
new file mode 100644
index 0000000..afccd52
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/atomic-16.C
@@ -0,0 +1,5 @@
+// PR c/64824
+// { dg-do run }
+// { dg-options "-O2 -fopenmp" }
+
+#include "../libgomp.c/atomic-18.c"
diff --git a/libgomp/testsuite/libgomp.c/atomic-18.c b/libgomp/testsuite/libgomp.c/atomic-18.c
new file mode 100644
index 0000000..bd048c1
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/atomic-18.c
@@ -0,0 +1,61 @@
+/* PR c/64824 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fopenmp" } */
+
+void
+f1 (void)
+{
+ short a;
+ short b = 1;
+ int c = 3;
+#pragma omp atomic capture
+ a = b = c << b;
+ if (b != 6 || a != 6)
+ __builtin_abort ();
+}
+
+void
+f2 (void)
+{
+ short a;
+ short b = 1;
+ int c = 3;
+#pragma omp atomic capture
+ a = b = c + b;
+ if (b != 4 || a != 4)
+ __builtin_abort ();
+}
+
+void
+f3 (void)
+{
+ short a;
+ short b = 1;
+ long long int c = 3;
+#pragma omp atomic capture
+ a = b = c + b;
+ if (b != 4 || a != 4)
+ __builtin_abort ();
+}
+
+void
+f4 (void)
+{
+ char a;
+ char b = 1;
+ long long int c = 3LL;
+#pragma omp atomic capture
+ a = b = c << b;
+ if (b != 6 || a != 6)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ f1 ();
+ f2 ();
+ f3 ();
+ f4 ();
+ return 0;
+}