aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2023-10-20 14:07:37 +0200
committerThomas Schwinge <thomas@codesourcery.com>2023-10-25 10:55:22 +0200
commit76cc5463227308c4dd2b70ccfe04d2b5361db0fe (patch)
treeabd31f5cee750944b6b32c837464136890f8df8b
parent3a3596389c2e539cb8fd5dc5784a4e2afe193a2a (diff)
downloadgcc-76cc5463227308c4dd2b70ccfe04d2b5361db0fe.zip
gcc-76cc5463227308c4dd2b70ccfe04d2b5361db0fe.tar.gz
gcc-76cc5463227308c4dd2b70ccfe04d2b5361db0fe.tar.bz2
Enable 'c-c++-common/goacc/{if,self}-clause-1.c' for C++
As discovered via recent commit 3a3596389c2e539cb8fd5dc5784a4e2afe193a2a "OpenACC 2.7: Implement self clause for compute constructs", 'c-c++-common/goacc/if-clause-1.c', which the new 'c-c++-common/goacc/self-clause-1.c' was copied from, was not enabled for C++. gcc/testsuite/ * c-c++-common/goacc/if-clause-1.c: Enable for C++ * c-c++-common/goacc/self-clause-1.c: Likewise.
-rw-r--r--gcc/testsuite/c-c++-common/goacc/if-clause-1.c6
-rw-r--r--gcc/testsuite/c-c++-common/goacc/self-clause-1.c14
2 files changed, 14 insertions, 6 deletions
diff --git a/gcc/testsuite/c-c++-common/goacc/if-clause-1.c b/gcc/testsuite/c-c++-common/goacc/if-clause-1.c
index 85abf165..d78520b 100644
--- a/gcc/testsuite/c-c++-common/goacc/if-clause-1.c
+++ b/gcc/testsuite/c-c++-common/goacc/if-clause-1.c
@@ -1,4 +1,4 @@
-/* { dg-skip-if "not yet" { c++ } } */
+/* See also 'self-clause-1.c'. */
void
f (void)
@@ -6,5 +6,7 @@ f (void)
struct { int i; } *p;
#pragma acc data copyout(p) if(1) if(1) /* { dg-error "too many 'if' clauses" } */
;
-#pragma acc update device(p) if(*p) /* { dg-error "used struct type value where scalar is required" } */
+#pragma acc update device(p) if(*p)
+ /* { dg-error {used struct type value where scalar is required} {} { target c } .-1 }
+ { dg-error {could not convert '\* p' from 'f\(\)::<unnamed struct>' to 'bool'} {} { target c++ } .-2 } */
}
diff --git a/gcc/testsuite/c-c++-common/goacc/self-clause-1.c b/gcc/testsuite/c-c++-common/goacc/self-clause-1.c
index ed5d072..fe892be 100644
--- a/gcc/testsuite/c-c++-common/goacc/self-clause-1.c
+++ b/gcc/testsuite/c-c++-common/goacc/self-clause-1.c
@@ -1,4 +1,4 @@
-/* { dg-skip-if "not yet" { c++ } } */
+/* See also 'if-clause-1.c'. */
void
f (int b)
@@ -7,16 +7,22 @@ f (int b)
#pragma acc parallel self self(b) /* { dg-error "too many 'self' clauses" } */
;
-#pragma acc parallel self(*p) /* { dg-error "used struct type value where scalar is required" } */
+#pragma acc parallel self(*p)
+ /* { dg-error {used struct type value where scalar is required} {} { target c } .-1 }
+ { dg-error {could not convert '\* p' from 'f\(int\)::<unnamed struct>' to 'bool'} {} { target c++ } .-2 } */
;
#pragma acc kernels self self(b) /* { dg-error "too many 'self' clauses" } */
;
-#pragma acc kernels self(*p) /* { dg-error "used struct type value where scalar is required" } */
+#pragma acc kernels self(*p)
+ /* { dg-error {used struct type value where scalar is required} {} { target c } .-1 }
+ { dg-error {could not convert '\* p' from 'f\(int\)::<unnamed struct>' to 'bool'} {} { target c++ } .-2 } */
;
#pragma acc serial self self(b) /* { dg-error "too many 'self' clauses" } */
;
-#pragma acc serial self(*p) /* { dg-error "used struct type value where scalar is required" } */
+#pragma acc serial self(*p)
+ /* { dg-error {used struct type value where scalar is required} {} { target c } .-1 }
+ { dg-error {could not convert '\* p' from 'f\(int\)::<unnamed struct>' to 'bool'} {} { target c++ } .-2 } */
;
}