From: Thomas Schwinge Date: Mon, 22 Nov 2021 15:09:09 +0000 (+0100) Subject: Merge 'c-c++-common/goacc/routine-6.c' into 'c-c++-common/goacc/routine-5.c', and... X-Git-Tag: upstream/12.2.0~2149 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=67fdcc8835665b5bc13652205e815e498d65c5a1;p=platform%2Fupstream%2Fgcc.git 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 --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 ());