aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-03-18 13:21:02 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-03-18 13:21:02 +0100
commit8119fc93077ce835232c711273cd8f3b097f17f4 (patch)
treecefe0df94ad8e0d6712d5f82009935b5d05d0634 /libgomp/testsuite
parent9e7759638ae59400bcd321db6404962c5f0ba29a (diff)
downloadgcc-8119fc93077ce835232c711273cd8f3b097f17f4.zip
gcc-8119fc93077ce835232c711273cd8f3b097f17f4.tar.gz
gcc-8119fc93077ce835232c711273cd8f3b097f17f4.tar.bz2
re PR middle-end/35611 (FAIL: libgomp.c/omp-nested-1.c execution test)
PR middle-end/35611 * gimplify.c (gimplify_expr): Gimplify second operand of OMP_ATOMIC_LOAD. * testsuite/libgomp.c/atomic-4.c: New test. From-SVN: r133309
Diffstat (limited to 'libgomp/testsuite')
-rw-r--r--libgomp/testsuite/libgomp.c/atomic-4.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/atomic-4.c b/libgomp/testsuite/libgomp.c/atomic-4.c
new file mode 100644
index 0000000..10f8197
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/atomic-4.c
@@ -0,0 +1,18 @@
+/* PR middle-end/35611 */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+int
+main (void)
+{
+ long double d = .0L;
+ int i;
+ #pragma omp parallel for shared (d)
+ for (i = 0; i < 1000; i++)
+ #pragma omp atomic
+ d += 1.0L;
+ if (d != 1000.0L)
+ abort ();
+ return 0;
+}