From 67fdcc8835665b5bc13652205e815e498d65c5a1 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 22 Nov 2021 16:09:09 +0100 Subject: [PATCH] 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. --- gcc/testsuite/c-c++-common/goacc/routine-5.c | 8 ++++++++ gcc/testsuite/c-c++-common/goacc/routine-6.c | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 gcc/testsuite/c-c++-common/goacc/routine-6.c 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 + . */ +#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 ()); -- 2.7.4