]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add tests for implied copy of variables in reduction clause.
authorHafiz Abid Qadeer <abidh@codesourcery.com>
Wed, 20 Dec 2023 14:48:29 +0000 (14:48 +0000)
committerThomas Schwinge <tschwinge@baylibre.com>
Tue, 28 Jan 2025 09:02:37 +0000 (10:02 +0100)
commit115255589cba449f1b10464f47646bda69c768fb
treed8c33a44188b25252663c60dc65cb1fad07f5d7f
parentfc1f7177eafe5a3cf59560b8b8655e150fc3a578
Add tests for implied copy of variables in reduction clause.

The OpenACC reduction clause on compute construct implies a copy clause
for each reduction variable [1]. This patch adds tests to check if the
implied copy is being generated. The check covers various types and
operators as described in the specification.

[1] OpenACC 2.7 Specification section 2.5.13

gcc/testsuite/ChangeLog:

* c-c++-common/goacc/implied-copy-1.c: New test.
* c-c++-common/goacc/implied-copy-2.c: New test.
* g++.dg/goacc/implied-copy.C: New test.
* gcc.dg/goacc/implied-copy.c: New test.
* gfortran.dg/goacc/implied-copy-1.f90: New test.
* gfortran.dg/goacc/implied-copy-2.f90: New test.
gcc/testsuite/c-c++-common/goacc/implied-copy-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/goacc/implied-copy-2.c [new file with mode: 0644]
gcc/testsuite/g++.dg/goacc/implied-copy.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/goacc/implied-copy.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/implied-copy-1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/implied-copy-2.f90 [new file with mode: 0644]