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/pr30494.c1
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr34610.c1
-rw-r--r--gcc/testsuite/gcc.dg/gomp/static-chunk-size-one.c18
-rw-r--r--gcc/testsuite/gcc.dg/gomp/vla-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/gomp/vla-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/gomp/vla-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/gomp/vla-5.c1
7 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/pr30494.c b/gcc/testsuite/gcc.dg/gomp/pr30494.c
index 6a042ce6974..fa6d7ffc696 100644
--- a/gcc/testsuite/gcc.dg/gomp/pr30494.c
+++ b/gcc/testsuite/gcc.dg/gomp/pr30494.c
@@ -1,5 +1,6 @@
/* PR middle-end/30494 */
/* { dg-do compile } */
+/* { dg-require-effective-target alloca } */
int
foo (int n)
diff --git a/gcc/testsuite/gcc.dg/gomp/pr34610.c b/gcc/testsuite/gcc.dg/gomp/pr34610.c
index 85db164b529..232fa18323b 100644
--- a/gcc/testsuite/gcc.dg/gomp/pr34610.c
+++ b/gcc/testsuite/gcc.dg/gomp/pr34610.c
@@ -1,6 +1,7 @@
/* PR gcov-profile/34610 */
/* { dg-do compile } */
/* { dg-options "-O2 -fprofile-arcs -fopenmp" } */
+/* { dg-require-profiling "-fprofile-generate" } */
extern void bar (int);
extern void baz (int) __attribute__((noreturn));
diff --git a/gcc/testsuite/gcc.dg/gomp/static-chunk-size-one.c b/gcc/testsuite/gcc.dg/gomp/static-chunk-size-one.c
new file mode 100644
index 00000000000..e82de772deb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/static-chunk-size-one.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp -O2 -fdump-tree-optimized -fno-tree-pre" } */
+
+int
+bar ()
+{
+ int a = 0, i;
+
+#pragma omp parallel for num_threads (3) reduction (+:a) schedule(static, 1)
+ for (i = 0; i < 10; i++)
+ a += i;
+
+ return a;
+}
+
+/* Two phis for reduction, one in loop header, one in loop exit. One phi for iv
+ in loop header. */
+/* { dg-final { scan-tree-dump-times "PHI" 3 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/gomp/vla-2.c b/gcc/testsuite/gcc.dg/gomp/vla-2.c
index fc18ffc5743..ea7c652553a 100644
--- a/gcc/testsuite/gcc.dg/gomp/vla-2.c
+++ b/gcc/testsuite/gcc.dg/gomp/vla-2.c
@@ -1,4 +1,5 @@
// { dg-do compile }
+/* { dg-require-effective-target alloca } */
void foo(int n, int i)
{
diff --git a/gcc/testsuite/gcc.dg/gomp/vla-3.c b/gcc/testsuite/gcc.dg/gomp/vla-3.c
index b1677b833ef..5070907f1e7 100644
--- a/gcc/testsuite/gcc.dg/gomp/vla-3.c
+++ b/gcc/testsuite/gcc.dg/gomp/vla-3.c
@@ -1,4 +1,5 @@
// { dg-do compile }
+/* { dg-require-effective-target alloca } */
void foo(int n, int i)
{
diff --git a/gcc/testsuite/gcc.dg/gomp/vla-4.c b/gcc/testsuite/gcc.dg/gomp/vla-4.c
index 2c3c0aa43b7..e784c74058c 100644
--- a/gcc/testsuite/gcc.dg/gomp/vla-4.c
+++ b/gcc/testsuite/gcc.dg/gomp/vla-4.c
@@ -1,4 +1,5 @@
// { dg-do compile }
+/* { dg-require-effective-target alloca } */
void foo(int n, int i)
{
diff --git a/gcc/testsuite/gcc.dg/gomp/vla-5.c b/gcc/testsuite/gcc.dg/gomp/vla-5.c
index 6c6d5517af8..20be204a5e1 100644
--- a/gcc/testsuite/gcc.dg/gomp/vla-5.c
+++ b/gcc/testsuite/gcc.dg/gomp/vla-5.c
@@ -1,4 +1,5 @@
// { dg-do compile }
+/* { dg-require-effective-target alloca } */
void foo(int n, int i)
{