Hi,
The attached patch adds a test for the copyout clause with
the declare directive. The testing of this clause was
overlooked.
Committed to gomp-4_0-branch.
Jim
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-1.c
index 584b921..8fbec4d 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-1.c
@@ -7,6 +7,23 @@
#define N 8
void
+subr2 (int *a)
+{
+ int i;
+ int f[N];
+#pragma acc declare copyout (f)
+
+#pragma acc parallel copy (a[0:N])
+ {
+ for (i = 0; i < N; i++)
+ {
+ f[i] = a[i];
+ a[i] = f[i] + f[i] + f[i];
+ }
+ }
+}
+
+void
subr1 (int *a)
{
int f[N];
@@ -93,5 +110,13 @@ main (int argc, char **argv)
abort ();
}
+ subr2 (&a[0]);
+
+ for (i = 0; i < 1; i++)
+ {
+ if (a[i] != 1234 * 6)
+ abort ();
+ }
+
return 0;
}