summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/goacc/reduction-5.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/c-c++-common/goacc/reduction-5.c')
-rw-r--r--gcc/testsuite/c-c++-common/goacc/reduction-5.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/goacc/reduction-5.c b/gcc/testsuite/c-c++-common/goacc/reduction-5.c
new file mode 100644
index 0000000000..74daad35a5
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/reduction-5.c
@@ -0,0 +1,16 @@
+/* Integer reductions. */
+
+#define n 1000
+
+int
+main(void)
+{
+ int v1;
+
+#pragma acc parallel reduction(+:v1) private(v1) /* { dg-error "appears more than once in data clauses" } */
+ ;
+#pragma acc parallel reduction(+:v1) firstprivate(v1) /* { dg-error "appears more than once in data clauses" } */
+ ;
+
+ return 0;
+}