summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-11 17:15:47 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-11 17:15:47 +0000
commite51b4c73b2c7f6cc7b34df561734378d42d93e38 (patch)
tree1b7c0a6ec56ef768e30e5aefbb8f962556f53a6e /libgomp
parent236594e67223792058724995f3f2d2940691edb7 (diff)
PR libgomp/80394
* omp-low.c (scan_omp_task): Don't optimize away empty tasks if they have any depend clauses. * testsuite/libgomp.c/pr80394.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246849 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.c/pr80394.c22
2 files changed, 27 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 5beaaa7cfba9..67351ae7d11b 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR libgomp/80394
+ * testsuite/libgomp.c/pr80394.c: New test.
+
2017-04-04 Jakub Jelinek <jakub@redhat.com>
PR libgomp/79876
diff --git a/libgomp/testsuite/libgomp.c/pr80394.c b/libgomp/testsuite/libgomp.c/pr80394.c
new file mode 100644
index 000000000000..6c5a74018515
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/pr80394.c
@@ -0,0 +1,22 @@
+/* PR libgomp/80394 */
+
+int
+main ()
+{
+ int x = 0;
+ #pragma omp parallel shared(x)
+ #pragma omp single
+ {
+ #pragma omp task depend(inout: x)
+ {
+ for (int i = 0; i < 100000; i++)
+ asm volatile ("" : : : "memory");
+ x += 5;
+ }
+ #pragma omp task if (0) depend(inout: x)
+ ;
+ if (x != 5)
+ __builtin_abort ();
+ }
+ return 0;
+}