public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6548] Merge 'c-c++-common/goacc/routine-6.c' into 'c-c++-common/goacc/routine-5.c', and document current C
@ 2022-01-13 12:04 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-01-13 12:04 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:67fdcc8835665b5bc13652205e815e498d65c5a1

commit r12-6548-g67fdcc8835665b5bc13652205e815e498d65c5a1
Author: Thomas Schwinge <thomas@codesourcery.com>
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
+   <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 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 ());


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-13 12:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 12:04 [gcc r12-6548] Merge 'c-c++-common/goacc/routine-6.c' into 'c-c++-common/goacc/routine-5.c', and document current C Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).