+2020-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ 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 <polacek@redhat.com>
PR c++/94507 - ICE-on-invalid with lambda template.
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'" } */
+ }
+}