aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2021-11-22 16:09:09 +0100
committerThomas Schwinge <thomas@codesourcery.com>2022-01-13 13:03:57 +0100
commit67fdcc8835665b5bc13652205e815e498d65c5a1 (patch)
tree5a65a87e5f5b466bc66b343d7120c7e786b2a191 /gcc
parent2edbcaed95b8d8cbb05a6af486179db0da6e3245 (diff)
downloadgcc-67fdcc8835665b5bc13652205e815e498d65c5a1.zip
gcc-67fdcc8835665b5bc13652205e815e498d65c5a1.tar.gz
gcc-67fdcc8835665b5bc13652205e815e498d65c5a1.tar.bz2
Merge 'c-c++-common/goacc/routine-6.c' into 'c-c++-common/goacc/routine-5.c', and document current C/C++ difference
gcc/testsuite/ * c-c++-common/goacc/routine-6.c: Merge into... * c-c++-common/goacc/routine-5.c: ... this, and document current C/C++ difference.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/c-c++-common/goacc/routine-5.c8
-rw-r--r--gcc/testsuite/c-c++-common/goacc/routine-6.c4
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/testsuite/c-c++-common/goacc/routine-5.c b/gcc/testsuite/c-c++-common/goacc/routine-5.c
index e3fbd65..94678f2 100644
--- a/gcc/testsuite/c-c++-common/goacc/routine-5.c
+++ b/gcc/testsuite/c-c++-common/goacc/routine-5.c
@@ -94,6 +94,14 @@ typedef struct c_2 c_2;
#pragma acc routine /* { dg-error ".#pragma acc routine. not immediately followed by function declaration or definition" } */
struct d_2 {} d_2;
+/* PR c++/101731 */
+/* Regarding the current C/C++ difference, see
+ <http://mid.mail-archive.com/20211122150231.GP2646553@tucnak>. */
+#pragma acc routine /* { dg-error "not immediately followed by a single function declaration or definition" "" { target c++ } } */
+int pr101731_foo (int pr101731_bar ());
+#pragma acc routine (pr101731_foo) vector /* { dg-error "has already been marked with an OpenACC 'routine' directive" "" { target c } } */
+#pragma acc routine (pr101731_bar) vector /* { dg-error "'pr101731_bar' has not been declared" } */
+
#pragma acc routine /* { dg-error ".#pragma acc routine. not immediately followed by function declaration or definition" } */
#pragma acc routine
int fn4 (void);
diff --git a/gcc/testsuite/c-c++-common/goacc/routine-6.c b/gcc/testsuite/c-c++-common/goacc/routine-6.c
deleted file mode 100644
index 0a231a0..0000000
--- a/gcc/testsuite/c-c++-common/goacc/routine-6.c
+++ /dev/null
@@ -1,4 +0,0 @@
-/* PR c++/101731 */
-
-#pragma acc routine /* { dg-error "not immediately followed by a single function declaration or definition" "" { target c++ } } */
-int foo (int bar ());