From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id CF5323857C7C; Thu, 13 Jan 2022 12:04:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF5323857C7C MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-6548] Merge 'c-c++-common/goacc/routine-6.c' into 'c-c++-common/goacc/routine-5.c', and document current C X-Act-Checkin: gcc X-Git-Author: Thomas Schwinge X-Git-Refname: refs/heads/master X-Git-Oldrev: 2edbcaed95b8d8cbb05a6af486179db0da6e3245 X-Git-Newrev: 67fdcc8835665b5bc13652205e815e498d65c5a1 Message-Id: <20220113120422.CF5323857C7C@sourceware.org> Date: Thu, 13 Jan 2022 12:04:22 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2022 12:04:22 -0000 https://gcc.gnu.org/g:67fdcc8835665b5bc13652205e815e498d65c5a1 commit r12-6548-g67fdcc8835665b5bc13652205e815e498d65c5a1 Author: Thomas Schwinge Date: Mon Nov 22 16:09:09 2021 +0100 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. Diff: --- 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(-) diff --git a/gcc/testsuite/c-c++-common/goacc/routine-5.c b/gcc/testsuite/c-c++-common/goacc/routine-5.c index e3fbd6573b8..94678f2bf5b 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 0a231a015a7..00000000000 --- 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 ());