[gcc(refs/vendors/ARM/heads/arm-perf-staging)] Fix declare copyout in libgomp.oacc-c++/declare-pr94120.C

Tamar Christina tnfchris@gcc.gnu.org
Fri Jul 17 14:44:37 GMT 2020


https://gcc.gnu.org/g:85d8c05a02bf7d1b256f806582a11e3fd8970a32

commit 85d8c05a02bf7d1b256f806582a11e3fd8970a32
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Mon Apr 20 12:38:50 2020 +0200

    Fix declare copyout in libgomp.oacc-c++/declare-pr94120.C
    
    Testing on the host does not make sense for 'declare copyout' for
    a same-scope stack-allocated variable. Once the copyout is done,
    the variable is gone. Hence, test the variable on the device. This
    can be revisit after the OpenACC semantic has been fixed; but with
    that fix, the test PASSes again with devices.
    
            PR middle-end/94120
            * testsuite/libgomp.oacc-c++/declare-pr94120.C: Fix 'declare copy(out)'
            test case.

Diff:
---
 libgomp/ChangeLog                                    | 6 ++++++
 libgomp/testsuite/libgomp.oacc-c++/declare-pr94120.C | 1 +
 2 files changed, 7 insertions(+)

diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index ce71ac6e783..b1cf297a0d7 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,9 @@
+2020-04-20  Tobias Burnus  <tobias@codesourcery.com>
+
+	PR middle-end/94120
+	* testsuite/libgomp.oacc-c++/declare-pr94120.C: Fix 'declare copy(out)'
+	test case.
+
 2020-04-17  Tobias Burnus  <tobias@codesourcery.com>
 
 	PR middle-end/94635
diff --git a/libgomp/testsuite/libgomp.oacc-c++/declare-pr94120.C b/libgomp/testsuite/libgomp.oacc-c++/declare-pr94120.C
index 1e1254187ea..ed69359b533 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/declare-pr94120.C
+++ b/libgomp/testsuite/libgomp.oacc-c++/declare-pr94120.C
@@ -35,6 +35,7 @@ f (void)
       C[i] = outer::inner::B[i];
     }
 
+#pragma acc parallel
   for (i = 0; i < N; i++)
     {
       if (C[i] != i + 1)


More information about the Gcc-cvs mailing list