From 08d1e7a5aabcf7eeac48bfd99deb80451b8f9974 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 8 Apr 2020 19:54:35 +0200 Subject: [PATCH] openacc: Fix up declare-pr94120.C testcase [PR94533] This test has been put in a wrong directory, where OpenACC tests aren't tested with -fopenacc, and also contained trailing semicolons. I've moved it where it belongs, added dg-error directives and removed the extra semicolons. 2020-04-08 Jakub Jelinek PR middle-end/94120 PR testsuite/94533 * g++.dg/declare-pr94120.C: Move test to ... * g++.dg/goacc/declare-pr94120.C: ... here. Add dg-error directives. --- gcc/testsuite/ChangeLog | 7 +++++++ .../g++.dg/{ => goacc}/declare-pr94120.C | 16 ++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) rename gcc/testsuite/g++.dg/{ => goacc}/declare-pr94120.C (60%) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6ed51141ac2..dcf552f2a03 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2020-04-08 Jakub Jelinek + + PR middle-end/94120 + PR testsuite/94533 + * g++.dg/declare-pr94120.C: Move test to ... + * g++.dg/goacc/declare-pr94120.C: ... here. Add dg-error directives. + 2020-04-08 Marek Polacek PR c++/94507 - ICE-on-invalid with lambda template. diff --git a/gcc/testsuite/g++.dg/declare-pr94120.C b/gcc/testsuite/g++.dg/goacc/declare-pr94120.C similarity index 60% rename from gcc/testsuite/g++.dg/declare-pr94120.C rename to gcc/testsuite/g++.dg/goacc/declare-pr94120.C index 8515c4ff875..7aa56121e38 100644 --- a/gcc/testsuite/g++.dg/declare-pr94120.C +++ b/gcc/testsuite/g++.dg/goacc/declare-pr94120.C @@ -8,23 +8,23 @@ int b[8]; namespace my { int d[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; #pragma acc declare copyin (d) -}; +} namespace outer { namespace inner { int e[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; #pragma acc declare copyin (e) - }; -}; + } +} int f[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; namespace my { - #pragma acc declare copyin (f) -}; + #pragma acc declare copyin (f) /* { dg-error "'f' must be a variable declared in the same scope as '#pragma acc declare'" } */ +} namespace outer { int g[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; namespace inner { - #pragma acc declare copyin (g) - }; -}; + #pragma acc declare copyin (g) /* { dg-error "'outer::g' must be a variable declared in the same scope as '#pragma acc declare'" } */ + } +} -- 2.30.2