summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/goacc/loop-private-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/c-c++-common/goacc/loop-private-1.c')
-rw-r--r--gcc/testsuite/c-c++-common/goacc/loop-private-1.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/goacc/loop-private-1.c b/gcc/testsuite/c-c++-common/goacc/loop-private-1.c
new file mode 100644
index 00000000000..a54edb2c05f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/loop-private-1.c
@@ -0,0 +1,14 @@
+/* { dg-additional-options "-fdump-tree-gimple" } */
+
+void
+f (int i, int j)
+{
+#pragma acc kernels
+#pragma acc loop collapse(2)
+ for (i = 0; i < 20; ++i)
+ for (j = 0; j < 25; ++j)
+ ;
+}
+
+/* { dg-final { scan-tree-dump-times "#pragma acc loop collapse\\(2\\) private\\(j\\) private\\(i\\)" 1 "gimple" } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */