summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp')
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr34610.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/pr34610.c b/gcc/testsuite/gcc.dg/gomp/pr34610.c
new file mode 100644
index 00000000000..95353a5625e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr34610.c
@@ -0,0 +1,30 @@
+/* PR gcov-profile/34610 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fprofile-arcs -fopenmp" } */
+
+extern void bar (int);
+extern void baz (int) __attribute__((noreturn));
+
+void
+foo (int k)
+{
+ int i;
+#pragma omp for schedule(dynamic)
+ for (i = 0; i < 10; ++i)
+ bar (i);
+#pragma omp parallel for schedule(static)
+ for (i = 0; i < 10; ++i)
+ bar (i);
+#pragma omp parallel for schedule(static, 4)
+ for (i = 0; i < 10; ++i)
+ bar (i);
+ if (k)
+ #pragma omp for schedule(dynamic)
+ for (i = 0; i < 10; ++i)
+ baz (i);
+#pragma omp parallel
+ for (i = 0; i < 10; ++i)
+ bar (i);
+}
+
+/* { dg-final { cleanup-coverage-files } } */