]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
openmp: Bump Version from 4.5 to 5.2 (2/4)
authorsupers1ngular <supers1ngular@baylibre.com>
Thu, 11 Dec 2025 15:45:04 +0000 (07:45 -0800)
committersupers1ngular <supers1ngular@baylibre.com>
Thu, 11 Dec 2025 15:47:44 +0000 (07:47 -0800)
Implements the OpenMP 5.2 C and C++ deprecations. Uses the warning
established in patch 1/4, -Wdeprecated-openmp, for said deprecations.
Not implemented is 'uses_allocators', since the base is not yet in
mainline, along with the relaxing of constraints for the interop
construct, since this is not a deprecation. Additionally does not
deprecate 'destroy' with no arguments on depobj construct, since
this was undeprecated in OpenMP 6.0. Adds new tests.

gcc/c/ChangeLog:

* c-parser.cc (c_parser_omp_clause_reduction): Deprecate '-'
operator for reductions.
(c_parser_omp_clause_linear): Deprecate modifiers with parens.
(c_parser_omp_clause_depend): Deprecate 'sink' and 'source'
modifiers for 'depend' clause.
(c_parser_omp_clause_map): Map clause modifiers comma-separated.
(c_parser_omp_declare_target): Deprecate synonymous omp declare
target for omp begin declare target. Deprecate 'to' clause.
(c_parser_omp_metadirective): Deprecate default clause on
metadirectives.

gcc/cp/ChangeLog:

* parser.cc (cp_parser_omp_clause_reduction): Deprecate '-'
operator.
(cp_parser_omp_clause_linear): Deprecate modifiers with parens.
(cp_parser_omp_clause_depend): Deprecate sink and source.
(cp_parser_omp_clause_map): Map clause modifiers
comma-separated.
(cp_parser_omp_declare_target): Deprecate synonymous omp declare
target for omp begin declare target. Deprecate to clause.
(cp_parser_omp_metadirective): Deprecate default clause on
metadirectives.

libgomp/ChangeLog:

* testsuite/libgomp.c++/declare_target-1.C: Suppress warnings.
* testsuite/libgomp.c++/depobj-1.C: Ditto.
* testsuite/libgomp.c++/doacross-1.C: Ditto.
* testsuite/libgomp.c++/for-15.C: Ditto.
* testsuite/libgomp.c++/for-24.C: Ditto.
* testsuite/libgomp.c++/pr101544-1-O0.C: Ditto.
* testsuite/libgomp.c++/pr101544-1.C: Ditto.
* testsuite/libgomp.c++/pr96835-1-O0.C: Ditto.
* testsuite/libgomp.c++/pr96835-1.C: Ditto.
* testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C: Ditto.
* testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C: Ditto.
* testsuite/libgomp.c++/static-aggr-constructor-destructor-3.C: Ditto.
* testsuite/libgomp.c++/target-13.C: Ditto.
* testsuite/libgomp.c++/target-cdtor-1.C: Ditto.
* testsuite/libgomp.c++/target-cdtor-2.C: Ditto.
* testsuite/libgomp.c++/target-std__array-concurrent-usm.C: Ditto.
* testsuite/libgomp.c++/target-std__array-concurrent.C: Ditto.
* testsuite/libgomp.c++/target-std__cmath.C: Ditto.
* testsuite/libgomp.c++/target-std__complex.C: Ditto.
* testsuite/libgomp.c++/target-std__deque-concurrent-usm.C: Ditto.
* testsuite/libgomp.c++/target-std__deque-concurrent.C: Ditto.
* testsuite/libgomp.c++/target-std__forward_list-concurrent-usm.C: Ditto.
* testsuite/libgomp.c++/target-std__forward_list-concurrent.C: Ditto.
* testsuite/libgomp.c++/target-std__list-concurrent-usm.C: Ditto.
* testsuite/libgomp.c++/target-std__list-concurrent.C: Ditto.
* testsuite/libgomp.c++/target-std__numbers.C: Ditto.
* testsuite/libgomp.c++/target-std__span-concurrent-usm.C: Ditto.
* testsuite/libgomp.c++/target-std__span-concurrent.C: Ditto.
* testsuite/libgomp.c++/target-std__valarray-1.C: Ditto.
* testsuite/libgomp.c++/target-std__valarray-concurrent-usm.C: Ditto.
* testsuite/libgomp.c++/target-std__valarray-concurrent.C: Ditto.
* testsuite/libgomp.c++/target-std__vector-concurrent-usm.C: Ditto.
* testsuite/libgomp.c++/target-std__vector-concurrent.C: Ditto.
* testsuite/libgomp.c-c++-common/declare_target-1.c: Ditto.
* testsuite/libgomp.c-c++-common/depend-2.c: Ditto.
* testsuite/libgomp.c-c++-common/depobj-1.c: Ditto.
* testsuite/libgomp.c-c++-common/for-11.c: Ditto.
* testsuite/libgomp.c-c++-common/for-12.c: Ditto.
* testsuite/libgomp.c-c++-common/for-16.c: Ditto.
* testsuite/libgomp.c-c++-common/for-3.c: Ditto.
* testsuite/libgomp.c-c++-common/for-5.c: Ditto.
* testsuite/libgomp.c-c++-common/for-6.c: Ditto.
* testsuite/libgomp.c-c++-common/for-9.c: Ditto.
* testsuite/libgomp.c-c++-common/function-not-offloaded.c: Ditto.
* testsuite/libgomp.c-c++-common/metadirective-1.c: Ditto.
* testsuite/libgomp.c-c++-common/metadirective-2.c: Ditto.
* testsuite/libgomp.c-c++-common/metadirective-3.c: Ditto.
* testsuite/libgomp.c-c++-common/metadirective-5.c: Ditto.
* testsuite/libgomp.c-c++-common/monotonic-1.c: Ditto.
* testsuite/libgomp.c-c++-common/monotonic-2.c: Ditto.
* testsuite/libgomp.c-c++-common/pr100059-1.c: Ditto.
* testsuite/libgomp.c-c++-common/pr66199-2.c: Ditto.
* testsuite/libgomp.c-c++-common/pr66199-4.c: Ditto.
* testsuite/libgomp.c-c++-common/pr66199-5.c: Ditto.
* testsuite/libgomp.c-c++-common/pr66199-6.c: Ditto.
* testsuite/libgomp.c-c++-common/pr66199-7.c: Ditto.
* testsuite/libgomp.c-c++-common/pr66199-8.c: Ditto.
* testsuite/libgomp.c-c++-common/pr66199-9.c: Ditto.
* testsuite/libgomp.c-c++-common/ptr-attach-1.c: Ditto.
* testsuite/libgomp.c-c++-common/reverse-offload-1.c: Ditto.
* testsuite/libgomp.c-c++-common/target-1.c: Ditto.
* testsuite/libgomp.c-c++-common/target-10.c: Ditto.
* testsuite/libgomp.c-c++-common/target-40.c: Ditto.
* testsuite/libgomp.c-c++-common/target-abi-struct-1-O0.c: Ditto.
* testsuite/libgomp.c-c++-common/target-abi-struct-1.c: Ditto.
* testsuite/libgomp.c-c++-common/target-cdtor-1.c: Ditto.
* testsuite/libgomp.c-c++-common/target-same-name-1.c: Ditto.
* testsuite/libgomp.c-c++-common/task-reduction-14.c: Ditto.
* testsuite/libgomp.c-c++-common/variable-not-offloaded.c: Ditto.
* testsuite/libgomp.c/declare-variant-3.c: Ditto.
* testsuite/libgomp.c/declare-variant-4.c: Ditto.
* testsuite/libgomp.c/doacross-1.c: Ditto.
* testsuite/libgomp.c/doacross-2.c: Ditto.
* testsuite/libgomp.c/doacross-3.c: Ditto.
* testsuite/libgomp.c/examples-4/async_target-1.c: Ditto.
* testsuite/libgomp.c/examples-4/declare_target-1.c: Ditto.
* testsuite/libgomp.c/examples-4/declare_target-3.c: Ditto.
* testsuite/libgomp.c/examples-4/declare_target-4.c: Ditto.
* testsuite/libgomp.c/examples-4/declare_target-5.c: Ditto.
* testsuite/libgomp.c/max_vf-1.c: Ditto.
* testsuite/libgomp.c/pr81778.c: Ditto.
* testsuite/libgomp.c/pr86660.c: Ditto.
* testsuite/libgomp.c/reduction-4.c: Ditto.
* testsuite/libgomp.c/switch-conversion.c: Ditto.
* testsuite/libgomp.c/target-26.c: Ditto.
* testsuite/libgomp.c/target-28.c: Ditto.
* testsuite/libgomp.c/target-30.c: Ditto.
* testsuite/libgomp.c/target-32.c: Ditto.
* testsuite/libgomp.c/target-35.c: Ditto.
* testsuite/libgomp.c/target-38.c: Ditto.
* testsuite/libgomp.c/target-39.c: Ditto.
* testsuite/libgomp.c/target-9.c: Ditto.
* testsuite/libgomp.c/target-link-1.c: Ditto.
* testsuite/libgomp.c/target-teams-1.c: Ditto.
* testsuite/libgomp.c/thread-limit-2.c: Ditto.
* testsuite/libgomp.oacc-c-c++-common/vred2d-128.c: Ditto.

gcc/testsuite/ChangeLog:

* c-c++-common/gomp/Wparentheses-2.c: Suppress warnings.
* c-c++-common/gomp/attrs-metadirective-1.c: Ditto.
* c-c++-common/gomp/attrs-metadirective-2.c: Ditto.
* c-c++-common/gomp/attrs-metadirective-3.c: Ditto.
* c-c++-common/gomp/attrs-metadirective-4.c: Ditto.
* c-c++-common/gomp/attrs-metadirective-5.c: Ditto.
* c-c++-common/gomp/attrs-metadirective-8.c: Ditto.
* c-c++-common/gomp/begin-declare-target-1.c: Ditto.
* c-c++-common/gomp/begin-declare-target-2.c: Ditto.
* c-c++-common/gomp/clauses-3.c: Ditto.
* c-c++-common/gomp/declare-target-1.c: Ditto.
* c-c++-common/gomp/declare-target-2.c: Ditto.
* c-c++-common/gomp/declare-target-3.c: Ditto.
* c-c++-common/gomp/declare-target-4.c: Ditto.
* c-c++-common/gomp/declare-target-5.c: Ditto.
* c-c++-common/gomp/declare-target-7.c: Ditto.
* c-c++-common/gomp/declare-target-indirect-1.c: Ditto.
* c-c++-common/gomp/declare-target-indirect-2.c: Ditto.
* c-c++-common/gomp/declare-variant-10.c: Ditto.
* c-c++-common/gomp/declare-variant-8.c: Ditto.
* c-c++-common/gomp/defaultmap-2.c: Ditto.
* c-c++-common/gomp/defaultmap-3.c: Ditto.
* c-c++-common/gomp/depend-iterator-2.c: Ditto.
* c-c++-common/gomp/depobj-1.c: Ditto.
* c-c++-common/gomp/directive-1.c: Ditto.
* c-c++-common/gomp/distribute-1.c: Ditto.
* c-c++-common/gomp/doacross-1.c: Ditto.
* c-c++-common/gomp/doacross-2.c: Ditto.
* c-c++-common/gomp/doacross-3.c: Ditto.
* c-c++-common/gomp/doacross-4.c: Ditto.
* c-c++-common/gomp/doacross-8.c: Ditto.
* c-c++-common/gomp/linear-1.c: Ditto.
* c-c++-common/gomp/linear-2.c: Ditto.
* c-c++-common/gomp/linear-3.c: Ditto.
* c-c++-common/gomp/loop-6.c: Ditto.
* c-c++-common/gomp/map-1.c: Ditto.
* c-c++-common/gomp/map-3.c: Ditto.
* c-c++-common/gomp/map-6.c: Ditto.
* c-c++-common/gomp/metadirective-1.c: Ditto.
* c-c++-common/gomp/metadirective-2.c: Ditto.
* c-c++-common/gomp/metadirective-3.c: Ditto.
* c-c++-common/gomp/metadirective-4.c: Ditto.
* c-c++-common/gomp/metadirective-5.c: Ditto.
* c-c++-common/gomp/metadirective-8.c: Ditto.
* c-c++-common/gomp/metadirective-construct.c: Ditto.
* c-c++-common/gomp/metadirective-device.c: Ditto.
* c-c++-common/gomp/metadirective-target-device-1.c: Ditto.
* c-c++-common/gomp/metadirective-target-device-2.c: Ditto.
* c-c++-common/gomp/order-2.c: Ditto.
* c-c++-common/gomp/ordered-3.c: Ditto.
* c-c++-common/gomp/ordered-5.c: Ditto.
* c-c++-common/gomp/pr102640.c: Ditto.
* c-c++-common/gomp/pr106836.c: Ditto.
* c-c++-common/gomp/pr120180-1.c: Ditto.
* c-c++-common/gomp/pr88203-1.c: Ditto.
* c-c++-common/gomp/pr88203-2.c: Ditto.
* c-c++-common/gomp/pr88203-3.c: Ditto.
* c-c++-common/gomp/pr91401-2.c: Ditto.
* c-c++-common/gomp/pr91987.c: Ditto.
* c-c++-common/gomp/reverse-offload-1.c: Ditto.
* c-c++-common/gomp/schedule-modifiers-1.c: Ditto.
* c-c++-common/gomp/sink-1.c: Ditto.
* c-c++-common/gomp/sink-2.c: Ditto.
* c-c++-common/gomp/sink-3.c: Ditto.
* c-c++-common/gomp/sink-4.c: Ditto.
* c-c++-common/gomp/sink-5.c: Ditto.
* c-c++-common/gomp/target-teams-1.c: Ditto.
* g++.dg/gomp/attrs-12.C: Ditto.
* g++.dg/gomp/attrs-5.C: Ditto.
* g++.dg/gomp/attrs-9.C: Ditto.
* g++.dg/gomp/clause-3.C: Ditto.
* g++.dg/gomp/declare-simd-3.C: Ditto.
* g++.dg/gomp/declare-simd-4.C: Ditto.
* g++.dg/gomp/declare-simd-6.C: Ditto.
* g++.dg/gomp/declare-simd-7.C: Ditto.
* g++.dg/gomp/declare-simd-8.C: Ditto.
* g++.dg/gomp/declare-target-1.C: Ditto.
* g++.dg/gomp/declare-target-2.C: Ditto.
* g++.dg/gomp/declare-target-3.C: Ditto.
* g++.dg/gomp/declare-target-indirect-1.C: Ditto.
* g++.dg/gomp/depend-iterator-2.C: Ditto.
* g++.dg/gomp/depobj-1.C: Ditto.
* g++.dg/gomp/doacross-2.C: Ditto.
* g++.dg/gomp/linear-1.C: Ditto.
* g++.dg/gomp/linear-2.C: Ditto.
* g++.dg/gomp/linear-3.C: Ditto.
* g++.dg/gomp/linear-5.C: Ditto.
* g++.dg/gomp/map-1.C: Ditto.
* g++.dg/gomp/pr118876.C: Ditto.
* g++.dg/gomp/pr119370.C: Ditto.
* g++.dg/gomp/sink-1.C: Ditto.
* g++.dg/gomp/sink-2.C: Ditto.
* g++.dg/gomp/sink-3.C: Ditto.
* g++.dg/gomp/target-simd-clone-1.C: Ditto.
* g++.dg/gomp/target-simd-clone-2.C: Ditto.
* g++.dg/gomp/target-teams-1.C: Ditto.
* g++.dg/gomp/udr-5.C: Ditto.
* gcc.dg/gomp/attrs-12.c: Ditto.
* gcc.dg/gomp/attrs-5.c: Ditto.
* gcc.dg/gomp/attrs-9.c: Ditto.
* gcc.dg/gomp/clause-1.c: Ditto.
* gcc.dg/gomp/declare-simd-3.c: Ditto.
* gcc.dg/gomp/linear-1.c: Ditto.
* gcc.dg/gomp/metadirective-1.c: Ditto.
* gcc.dg/gomp/pr104757.c: Ditto.
* gcc.dg/gomp/sink-fold-1.c: Ditto.
* gcc.dg/gomp/sink-fold-2.c: Ditto.
* gcc.dg/gomp/sink-fold-3.c: Ditto.
* gcc.dg/gomp/target-simd-clone-1.c: Ditto.
* gcc.dg/gomp/target-simd-clone-2.c: Ditto.
* gcc.dg/gomp/target-simd-clone-3.c: Ditto.
* gcc.dg/gomp/target-simd-clone-4.c: Ditto.
* gcc.dg/gomp/target-simd-clone-5.c: Ditto.
* gcc.dg/gomp/target-simd-clone-6.c: Ditto.
* gcc.dg/gomp/target-simd-clone-7.c: Ditto.
* gcc.dg/gomp/target-simd-clone-8.c: Ditto.
* gcc.dg/gomp/workshare-reduction-55.c: Ditto.
* gcc.dg/gomp/workshare-reduction-56.c: Ditto.
* gcc.dg/gomp/workshare-reduction-57.c: Ditto.
* gcc.dg/gomp/workshare-reduction-58.c: Ditto.
* c-c++-common/gomp/52-deps.c: New test.
* g++.dg/gomp/map-csm-dep.C: New test.
* gcc.dg/gomp/map-csm-dep.c: New test.

221 files changed:
gcc/c/c-parser.cc
gcc/cp/parser.cc
gcc/testsuite/c-c++-common/gomp/52-deps.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/Wparentheses-2.c
gcc/testsuite/c-c++-common/gomp/attrs-metadirective-1.c
gcc/testsuite/c-c++-common/gomp/attrs-metadirective-2.c
gcc/testsuite/c-c++-common/gomp/attrs-metadirective-3.c
gcc/testsuite/c-c++-common/gomp/attrs-metadirective-4.c
gcc/testsuite/c-c++-common/gomp/attrs-metadirective-5.c
gcc/testsuite/c-c++-common/gomp/attrs-metadirective-8.c
gcc/testsuite/c-c++-common/gomp/begin-declare-target-1.c
gcc/testsuite/c-c++-common/gomp/begin-declare-target-2.c
gcc/testsuite/c-c++-common/gomp/clauses-3.c
gcc/testsuite/c-c++-common/gomp/declare-target-1.c
gcc/testsuite/c-c++-common/gomp/declare-target-2.c
gcc/testsuite/c-c++-common/gomp/declare-target-3.c
gcc/testsuite/c-c++-common/gomp/declare-target-4.c
gcc/testsuite/c-c++-common/gomp/declare-target-5.c
gcc/testsuite/c-c++-common/gomp/declare-target-7.c
gcc/testsuite/c-c++-common/gomp/declare-target-indirect-1.c
gcc/testsuite/c-c++-common/gomp/declare-target-indirect-2.c
gcc/testsuite/c-c++-common/gomp/declare-variant-10.c
gcc/testsuite/c-c++-common/gomp/declare-variant-8.c
gcc/testsuite/c-c++-common/gomp/defaultmap-2.c
gcc/testsuite/c-c++-common/gomp/defaultmap-3.c
gcc/testsuite/c-c++-common/gomp/depend-iterator-2.c
gcc/testsuite/c-c++-common/gomp/depobj-1.c
gcc/testsuite/c-c++-common/gomp/directive-1.c
gcc/testsuite/c-c++-common/gomp/distribute-1.c
gcc/testsuite/c-c++-common/gomp/doacross-1.c
gcc/testsuite/c-c++-common/gomp/doacross-2.c
gcc/testsuite/c-c++-common/gomp/doacross-3.c
gcc/testsuite/c-c++-common/gomp/doacross-4.c
gcc/testsuite/c-c++-common/gomp/doacross-8.c
gcc/testsuite/c-c++-common/gomp/linear-1.c
gcc/testsuite/c-c++-common/gomp/linear-2.c
gcc/testsuite/c-c++-common/gomp/linear-3.c
gcc/testsuite/c-c++-common/gomp/loop-6.c
gcc/testsuite/c-c++-common/gomp/map-1.c
gcc/testsuite/c-c++-common/gomp/map-3.c
gcc/testsuite/c-c++-common/gomp/map-6.c
gcc/testsuite/c-c++-common/gomp/metadirective-1.c
gcc/testsuite/c-c++-common/gomp/metadirective-2.c
gcc/testsuite/c-c++-common/gomp/metadirective-3.c
gcc/testsuite/c-c++-common/gomp/metadirective-4.c
gcc/testsuite/c-c++-common/gomp/metadirective-5.c
gcc/testsuite/c-c++-common/gomp/metadirective-8.c
gcc/testsuite/c-c++-common/gomp/metadirective-construct.c
gcc/testsuite/c-c++-common/gomp/metadirective-device.c
gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c
gcc/testsuite/c-c++-common/gomp/metadirective-target-device-2.c
gcc/testsuite/c-c++-common/gomp/order-2.c
gcc/testsuite/c-c++-common/gomp/ordered-3.c
gcc/testsuite/c-c++-common/gomp/ordered-5.c
gcc/testsuite/c-c++-common/gomp/pr102640.c
gcc/testsuite/c-c++-common/gomp/pr106836.c
gcc/testsuite/c-c++-common/gomp/pr120180-1.c
gcc/testsuite/c-c++-common/gomp/pr88203-1.c
gcc/testsuite/c-c++-common/gomp/pr88203-2.c
gcc/testsuite/c-c++-common/gomp/pr88203-3.c
gcc/testsuite/c-c++-common/gomp/pr91401-2.c
gcc/testsuite/c-c++-common/gomp/pr91987.c
gcc/testsuite/c-c++-common/gomp/reverse-offload-1.c
gcc/testsuite/c-c++-common/gomp/schedule-modifiers-1.c
gcc/testsuite/c-c++-common/gomp/sink-1.c
gcc/testsuite/c-c++-common/gomp/sink-2.c
gcc/testsuite/c-c++-common/gomp/sink-3.c
gcc/testsuite/c-c++-common/gomp/sink-4.c
gcc/testsuite/c-c++-common/gomp/sink-5.c
gcc/testsuite/c-c++-common/gomp/target-teams-1.c
gcc/testsuite/g++.dg/gomp/attrs-12.C
gcc/testsuite/g++.dg/gomp/attrs-5.C
gcc/testsuite/g++.dg/gomp/attrs-9.C
gcc/testsuite/g++.dg/gomp/clause-3.C
gcc/testsuite/g++.dg/gomp/declare-simd-3.C
gcc/testsuite/g++.dg/gomp/declare-simd-4.C
gcc/testsuite/g++.dg/gomp/declare-simd-6.C
gcc/testsuite/g++.dg/gomp/declare-simd-7.C
gcc/testsuite/g++.dg/gomp/declare-simd-8.C
gcc/testsuite/g++.dg/gomp/declare-target-1.C
gcc/testsuite/g++.dg/gomp/declare-target-2.C
gcc/testsuite/g++.dg/gomp/declare-target-3.C
gcc/testsuite/g++.dg/gomp/declare-target-indirect-1.C
gcc/testsuite/g++.dg/gomp/depend-iterator-2.C
gcc/testsuite/g++.dg/gomp/depobj-1.C
gcc/testsuite/g++.dg/gomp/doacross-2.C
gcc/testsuite/g++.dg/gomp/linear-1.C
gcc/testsuite/g++.dg/gomp/linear-2.C
gcc/testsuite/g++.dg/gomp/linear-3.C
gcc/testsuite/g++.dg/gomp/linear-5.C
gcc/testsuite/g++.dg/gomp/map-1.C
gcc/testsuite/g++.dg/gomp/map-csm-dep.C [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/pr118876.C
gcc/testsuite/g++.dg/gomp/pr119370.C
gcc/testsuite/g++.dg/gomp/sink-1.C
gcc/testsuite/g++.dg/gomp/sink-2.C
gcc/testsuite/g++.dg/gomp/sink-3.C
gcc/testsuite/g++.dg/gomp/target-simd-clone-1.C
gcc/testsuite/g++.dg/gomp/target-simd-clone-2.C
gcc/testsuite/g++.dg/gomp/target-teams-1.C
gcc/testsuite/g++.dg/gomp/udr-5.C
gcc/testsuite/gcc.dg/gomp/attrs-12.c
gcc/testsuite/gcc.dg/gomp/attrs-5.c
gcc/testsuite/gcc.dg/gomp/attrs-9.c
gcc/testsuite/gcc.dg/gomp/clause-1.c
gcc/testsuite/gcc.dg/gomp/declare-simd-3.c
gcc/testsuite/gcc.dg/gomp/linear-1.c
gcc/testsuite/gcc.dg/gomp/map-csm-dep.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/gomp/metadirective-1.c
gcc/testsuite/gcc.dg/gomp/pr104757.c
gcc/testsuite/gcc.dg/gomp/sink-fold-1.c
gcc/testsuite/gcc.dg/gomp/sink-fold-2.c
gcc/testsuite/gcc.dg/gomp/sink-fold-3.c
gcc/testsuite/gcc.dg/gomp/target-simd-clone-1.c
gcc/testsuite/gcc.dg/gomp/target-simd-clone-2.c
gcc/testsuite/gcc.dg/gomp/target-simd-clone-3.c
gcc/testsuite/gcc.dg/gomp/target-simd-clone-4.c
gcc/testsuite/gcc.dg/gomp/target-simd-clone-5.c
gcc/testsuite/gcc.dg/gomp/target-simd-clone-6.c
gcc/testsuite/gcc.dg/gomp/target-simd-clone-7.c
gcc/testsuite/gcc.dg/gomp/target-simd-clone-8.c
gcc/testsuite/gcc.dg/gomp/workshare-reduction-55.c
gcc/testsuite/gcc.dg/gomp/workshare-reduction-56.c
gcc/testsuite/gcc.dg/gomp/workshare-reduction-57.c
gcc/testsuite/gcc.dg/gomp/workshare-reduction-58.c
libgomp/testsuite/libgomp.c++/declare_target-1.C
libgomp/testsuite/libgomp.c++/depobj-1.C
libgomp/testsuite/libgomp.c++/doacross-1.C
libgomp/testsuite/libgomp.c++/for-15.C
libgomp/testsuite/libgomp.c++/for-24.C
libgomp/testsuite/libgomp.c++/pr101544-1-O0.C
libgomp/testsuite/libgomp.c++/pr101544-1.C
libgomp/testsuite/libgomp.c++/pr96835-1-O0.C
libgomp/testsuite/libgomp.c++/pr96835-1.C
libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C
libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C
libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-3.C
libgomp/testsuite/libgomp.c++/target-13.C
libgomp/testsuite/libgomp.c++/target-cdtor-1.C
libgomp/testsuite/libgomp.c++/target-cdtor-2.C
libgomp/testsuite/libgomp.c++/target-std__array-concurrent-usm.C
libgomp/testsuite/libgomp.c++/target-std__array-concurrent.C
libgomp/testsuite/libgomp.c++/target-std__cmath.C
libgomp/testsuite/libgomp.c++/target-std__complex.C
libgomp/testsuite/libgomp.c++/target-std__deque-concurrent-usm.C
libgomp/testsuite/libgomp.c++/target-std__deque-concurrent.C
libgomp/testsuite/libgomp.c++/target-std__forward_list-concurrent-usm.C
libgomp/testsuite/libgomp.c++/target-std__forward_list-concurrent.C
libgomp/testsuite/libgomp.c++/target-std__list-concurrent-usm.C
libgomp/testsuite/libgomp.c++/target-std__list-concurrent.C
libgomp/testsuite/libgomp.c++/target-std__numbers.C
libgomp/testsuite/libgomp.c++/target-std__span-concurrent-usm.C
libgomp/testsuite/libgomp.c++/target-std__span-concurrent.C
libgomp/testsuite/libgomp.c++/target-std__valarray-1.C
libgomp/testsuite/libgomp.c++/target-std__valarray-concurrent-usm.C
libgomp/testsuite/libgomp.c++/target-std__valarray-concurrent.C
libgomp/testsuite/libgomp.c++/target-std__vector-concurrent-usm.C
libgomp/testsuite/libgomp.c++/target-std__vector-concurrent.C
libgomp/testsuite/libgomp.c-c++-common/declare_target-1.c
libgomp/testsuite/libgomp.c-c++-common/depend-2.c
libgomp/testsuite/libgomp.c-c++-common/depobj-1.c
libgomp/testsuite/libgomp.c-c++-common/for-11.c
libgomp/testsuite/libgomp.c-c++-common/for-12.c
libgomp/testsuite/libgomp.c-c++-common/for-16.c
libgomp/testsuite/libgomp.c-c++-common/for-3.c
libgomp/testsuite/libgomp.c-c++-common/for-5.c
libgomp/testsuite/libgomp.c-c++-common/for-6.c
libgomp/testsuite/libgomp.c-c++-common/for-9.c
libgomp/testsuite/libgomp.c-c++-common/function-not-offloaded.c
libgomp/testsuite/libgomp.c-c++-common/metadirective-1.c
libgomp/testsuite/libgomp.c-c++-common/metadirective-2.c
libgomp/testsuite/libgomp.c-c++-common/metadirective-3.c
libgomp/testsuite/libgomp.c-c++-common/metadirective-5.c
libgomp/testsuite/libgomp.c-c++-common/monotonic-1.c
libgomp/testsuite/libgomp.c-c++-common/monotonic-2.c
libgomp/testsuite/libgomp.c-c++-common/pr100059-1.c
libgomp/testsuite/libgomp.c-c++-common/pr66199-2.c
libgomp/testsuite/libgomp.c-c++-common/pr66199-4.c
libgomp/testsuite/libgomp.c-c++-common/pr66199-5.c
libgomp/testsuite/libgomp.c-c++-common/pr66199-6.c
libgomp/testsuite/libgomp.c-c++-common/pr66199-7.c
libgomp/testsuite/libgomp.c-c++-common/pr66199-8.c
libgomp/testsuite/libgomp.c-c++-common/pr66199-9.c
libgomp/testsuite/libgomp.c-c++-common/ptr-attach-1.c
libgomp/testsuite/libgomp.c-c++-common/reverse-offload-1.c
libgomp/testsuite/libgomp.c-c++-common/target-1.c
libgomp/testsuite/libgomp.c-c++-common/target-10.c
libgomp/testsuite/libgomp.c-c++-common/target-40.c
libgomp/testsuite/libgomp.c-c++-common/target-abi-struct-1-O0.c
libgomp/testsuite/libgomp.c-c++-common/target-abi-struct-1.c
libgomp/testsuite/libgomp.c-c++-common/target-cdtor-1.c
libgomp/testsuite/libgomp.c-c++-common/target-same-name-1.c
libgomp/testsuite/libgomp.c-c++-common/task-reduction-14.c
libgomp/testsuite/libgomp.c-c++-common/variable-not-offloaded.c
libgomp/testsuite/libgomp.c/declare-variant-3.c
libgomp/testsuite/libgomp.c/declare-variant-4.c
libgomp/testsuite/libgomp.c/doacross-1.c
libgomp/testsuite/libgomp.c/doacross-2.c
libgomp/testsuite/libgomp.c/doacross-3.c
libgomp/testsuite/libgomp.c/examples-4/async_target-1.c
libgomp/testsuite/libgomp.c/examples-4/declare_target-1.c
libgomp/testsuite/libgomp.c/examples-4/declare_target-3.c
libgomp/testsuite/libgomp.c/examples-4/declare_target-4.c
libgomp/testsuite/libgomp.c/examples-4/declare_target-5.c
libgomp/testsuite/libgomp.c/max_vf-1.c
libgomp/testsuite/libgomp.c/pr81778.c
libgomp/testsuite/libgomp.c/pr86660.c
libgomp/testsuite/libgomp.c/reduction-4.c
libgomp/testsuite/libgomp.c/switch-conversion.c
libgomp/testsuite/libgomp.c/target-26.c
libgomp/testsuite/libgomp.c/target-28.c
libgomp/testsuite/libgomp.c/target-30.c
libgomp/testsuite/libgomp.c/target-32.c
libgomp/testsuite/libgomp.c/target-35.c
libgomp/testsuite/libgomp.c/target-38.c
libgomp/testsuite/libgomp.c/target-39.c
libgomp/testsuite/libgomp.c/target-9.c
libgomp/testsuite/libgomp.c/target-link-1.c
libgomp/testsuite/libgomp.c/target-teams-1.c
libgomp/testsuite/libgomp.c/thread-limit-2.c
libgomp/testsuite/libgomp.oacc-c-c++-common/vred2d-128.c

index c81243d2ad215ea2e0ad94cef89054d4cc873f73..f97b294f98eed0362b6ef8df83725ae86c3e3683 100644 (file)
@@ -18849,6 +18849,9 @@ c_parser_omp_clause_reduction (c_parser *parser, enum omp_clause_code kind,
          code = MULT_EXPR;
          break;
        case CPP_MINUS:
+         warning_at (c_parser_peek_token (parser)->location,
+           OPT_Wdeprecated_openmp,
+           "%<-%> operator for reductions deprecated in OpenMP 5.2");
          code = MINUS_EXPR;
          break;
        case CPP_AND:
@@ -19597,6 +19600,9 @@ c_parser_omp_clause_linear (c_parser *parser, tree list)
        kind = OMP_CLAUSE_LINEAR_DEFAULT;
       if (kind != OMP_CLAUSE_LINEAR_DEFAULT)
        {
+         warning_at (clause_loc, OPT_Wdeprecated_openmp,
+           "specifying the list items as arguments to the modifiers is "
+           "deprecated since OpenMP 5.2");
          old_linear_modifier = true;
          c_parser_consume_token (parser);
          c_parser_consume_token (parser);
@@ -20133,9 +20139,19 @@ c_parser_omp_clause_depend (c_parser *parser, tree list)
       else if (strcmp ("depobj", p) == 0)
        kind = OMP_CLAUSE_DEPEND_DEPOBJ;
       else if (strcmp ("sink", p) == 0)
-       dkind = OMP_CLAUSE_DOACROSS_SINK;
+       {
+         warning_at (clause_loc, OPT_Wdeprecated_openmp,
+           "%<sink%> modifier with %<depend%> clause deprecated since "
+           "OpenMP 5.2, use with %<doacross%>");
+         dkind = OMP_CLAUSE_DOACROSS_SINK;
+       }
       else if (strcmp ("source", p) == 0)
-       dkind = OMP_CLAUSE_DOACROSS_SOURCE;
+       {
+         warning_at (clause_loc, OPT_Wdeprecated_openmp,
+           "%<source%> modifier with %<depend%> clause deprecated since "
+           "OpenMP 5.2, use with %<doacross%>");
+         dkind = OMP_CLAUSE_DOACROSS_SOURCE;
+       }
       else
        goto invalid_kind;
       break;
@@ -20435,6 +20451,8 @@ c_parser_omp_clause_map (c_parser *parser, tree list, bool declare_mapper_p)
   int close_modifier = 0;
   int present_modifier = 0;
   int mapper_modifier = 0;
+  int num_commas = 0;
+  int num_identifiers = 0;
   tree mapper_name = NULL_TREE;
   tree iterators = NULL_TREE;
   for (int pos = 1; pos < map_kind_pos; ++pos)
@@ -20443,6 +20461,9 @@ c_parser_omp_clause_map (c_parser *parser, tree list, bool declare_mapper_p)
 
       if (tok->type == CPP_COMMA)
        {
+         ++num_commas;
+         if (num_commas > num_identifiers)
+           c_parser_error (parser, "illegal comma");
          c_parser_consume_token (parser);
          continue;
        }
@@ -20559,6 +20580,11 @@ c_parser_omp_clause_map (c_parser *parser, tree list, bool declare_mapper_p)
          parens.skip_until_found_close (parser);
          return list;
        }
+      ++num_identifiers;
+      if (num_identifiers - 1 != num_commas)
+       warning_at (clause_loc, OPT_Wdeprecated_openmp,
+         "%<map%> clause modifiers without comma separation is deprecated "
+         "since OpenMP 5.2");
     }
 
   if (c_parser_next_token_is (parser, CPP_NAME)
@@ -28357,6 +28383,10 @@ c_parser_omp_declare_target (c_parser *parser)
     }
   else
     {
+      warning_at (c_parser_peek_token (parser)->location,
+       OPT_Wdeprecated_openmp,
+       "use of %<omp declare target%> as a synonym for %<omp begin declare "
+       "target%> has been deprecated since OpenMP 5.2");
       bool attr_syntax = parser->in_omp_attribute_pragma != NULL;
       c_parser_skip_to_pragma_eol (parser);
       c_omp_declare_target_attr attr = { attr_syntax, -1, 0 };
@@ -28365,6 +28395,10 @@ c_parser_omp_declare_target (c_parser *parser)
     }
   for (tree c = clauses; c; c = OMP_CLAUSE_CHAIN (c))
     {
+      if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_ENTER && OMP_CLAUSE_ENTER_TO (c))
+       warning_at (c_parser_peek_token (parser)->location,
+         OPT_Wdeprecated_openmp, "%<to%> clause with %<declare target%> "
+         "deprecated since OpenMP 5.2, use %<enter%>");
       if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_DEVICE_TYPE)
        device_type |= OMP_CLAUSE_DEVICE_TYPE_KIND (c);
       if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_INDIRECT)
@@ -30170,6 +30204,10 @@ c_parser_omp_metadirective (c_parser *parser, bool *if_p)
 
       location_t match_loc = c_parser_peek_token (parser)->location;
       const char *p = IDENTIFIER_POINTER (c_parser_peek_token (parser)->value);
+      if (strcmp (p, "default") == 0)
+       warning_at (pragma_loc, OPT_Wdeprecated_openmp,
+         "%<default%> clause on metadirectives deprecated since "
+         "OpenMP 5.2, use %<otherwise%>");
       c_parser_consume_token (parser);
       bool default_p
        = strcmp (p, "default") == 0 || strcmp (p, "otherwise") == 0;
index 866708a7e46c3acbb80554e1f0453107e73632bc..5525213c0347a61b54af9c954a82d06a12d2e6b6 100644 (file)
@@ -42164,7 +42164,12 @@ cp_parser_omp_clause_reduction (cp_parser *parser, enum omp_clause_code kind,
     {
     case CPP_PLUS: code = PLUS_EXPR; break;
     case CPP_MULT: code = MULT_EXPR; break;
-    case CPP_MINUS: code = MINUS_EXPR; break;
+    case CPP_MINUS:
+      warning_at (cp_lexer_peek_token (parser->lexer)->location,
+       OPT_Wdeprecated_openmp,
+       "%<-%> operator for reductions deprecated in OpenMP 5.2");
+      code = MINUS_EXPR;
+      break;
     case CPP_AND: code = BIT_AND_EXPR; break;
     case CPP_XOR: code = BIT_XOR_EXPR; break;
     case CPP_OR: code = BIT_IOR_EXPR; break;
@@ -42860,6 +42865,10 @@ cp_parser_omp_clause_linear (cp_parser *parser, tree list,
        {
          cp_lexer_consume_token (parser->lexer);
          old_linear_modifier = true;
+         warning_at (cp_lexer_peek_token (parser->lexer)->location,
+           OPT_Wdeprecated_openmp,
+           "specifying the list items as arguments to the modifiers is "
+           "deprecated since OpenMP 5.2");
        }
       else
        kind = OMP_CLAUSE_LINEAR_DEFAULT;
@@ -43469,9 +43478,19 @@ cp_parser_omp_clause_depend (cp_parser *parser, tree list, location_t loc)
       else if (strcmp ("depobj", p) == 0)
        kind = OMP_CLAUSE_DEPEND_DEPOBJ;
       else if (strcmp ("sink", p) == 0)
-       dkind = OMP_CLAUSE_DOACROSS_SINK;
+       {
+         warning_at (loc, OPT_Wdeprecated_openmp,
+           "%<sink%> modifier with %<depend%> clause deprecated since "
+           "OpenMP 5.2, use with %<doacross%>");
+         dkind = OMP_CLAUSE_DOACROSS_SINK;
+       }
       else if (strcmp ("source", p) == 0)
-       dkind = OMP_CLAUSE_DOACROSS_SOURCE;
+       {
+         warning_at (loc, OPT_Wdeprecated_openmp,
+           "%<source%> modifier with %<depend%> clause deprecated since "
+           "OpenMP 5.2, use with %<doacross%>");
+         dkind = OMP_CLAUSE_DOACROSS_SOURCE;
+       }
       else
        goto invalid_kind;
       break;
@@ -43852,6 +43871,7 @@ cp_parser_omp_clause_dyn_groupprivate (cp_parser *parser, tree list,
 static tree
 cp_parser_omp_clause_map (cp_parser *parser, tree list, bool declare_mapper_p)
 {
+  location_t clause_loc = cp_lexer_peek_token (parser->lexer)->location;
   tree nlist, c;
   enum gomp_map_kind kind = declare_mapper_p ? GOMP_MAP_UNSET : GOMP_MAP_TOFROM;
 
@@ -43899,6 +43919,8 @@ cp_parser_omp_clause_map (cp_parser *parser, tree list, bool declare_mapper_p)
   bool close_modifier = false;
   bool present_modifier = false;
   bool mapper_modifier = false;
+  int num_commas = 0;
+  int num_identifiers = 0;
   tree mapper_name = NULL_TREE;
   tree iterators = NULL_TREE;
   for (int pos = 1; pos < map_kind_pos; ++pos)
@@ -43906,6 +43928,9 @@ cp_parser_omp_clause_map (cp_parser *parser, tree list, bool declare_mapper_p)
       cp_token *tok = cp_lexer_peek_token (parser->lexer);
       if (tok->type == CPP_COMMA)
        {
+         ++num_commas;
+         if (num_commas > num_identifiers)
+           cp_parser_error (parser, "illegal comma");
          cp_lexer_consume_token (parser->lexer);
          continue;
        }
@@ -44049,6 +44074,11 @@ cp_parser_omp_clause_map (cp_parser *parser, tree list, bool declare_mapper_p)
                                                 /*consume_paren=*/true);
          return list;
        }
+      ++num_identifiers;
+      if (num_identifiers - 1 != num_commas)
+       warning_at (clause_loc, OPT_Wdeprecated_openmp,
+         "%<map%> clause modifiers without comma separation is "
+         "deprecated since OpenMP 5.2");
     }
 
   if (cp_lexer_next_token_is (parser->lexer, CPP_NAME)
@@ -52748,6 +52778,10 @@ cp_parser_omp_declare_target (cp_parser *parser, cp_token *pragma_tok)
     }
   else
     {
+      warning_at (cp_lexer_peek_token (parser->lexer)->location,
+       OPT_Wdeprecated_openmp,
+       "use of %<omp declare target%> as a synonym for %<omp begin declare "
+       "target%> has been deprecated since OpenMP 5.2");
       cp_omp_declare_target_attr a
        = { parser->lexer->in_omp_attribute_pragma, -1, false };
       vec_safe_push (scope_chain->omp_declare_target_attribute, a);
@@ -52756,6 +52790,10 @@ cp_parser_omp_declare_target (cp_parser *parser, cp_token *pragma_tok)
     }
   for (tree c = clauses; c; c = OMP_CLAUSE_CHAIN (c))
     {
+      if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_ENTER && OMP_CLAUSE_ENTER_TO (c))
+       warning_at (OMP_CLAUSE_LOCATION (c), OPT_Wdeprecated_openmp,
+         "%<to%> clause with %<declare target%> deprecated since "
+         "OpenMP 5.2, use %<enter%>");
       if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_DEVICE_TYPE)
        device_type |= OMP_CLAUSE_DEVICE_TYPE_KIND (c);
       if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_INDIRECT)
@@ -53176,6 +53214,10 @@ cp_parser_omp_metadirective (cp_parser *parser, cp_token *pragma_tok,
       location_t match_loc = cp_lexer_peek_token (parser->lexer)->location;
       const char *p
        = IDENTIFIER_POINTER (cp_lexer_peek_token (parser->lexer)->u.value);
+      if (strcmp (p, "default") == 0)
+       warning_at (match_loc, OPT_Wdeprecated_openmp,
+         "%<default%> clause on metadirectives deprecated since "
+         "OpenMP 5.2, use %<otherwise%>");
       cp_lexer_consume_token (parser->lexer);
       bool default_p
        = strcmp (p, "default") == 0 || strcmp (p, "otherwise") == 0;
diff --git a/gcc/testsuite/c-c++-common/gomp/52-deps.c b/gcc/testsuite/c-c++-common/gomp/52-deps.c
new file mode 100644 (file)
index 0000000..35577fa
--- /dev/null
@@ -0,0 +1,32 @@
+// tests for deprecation of 'to' clause with 'declare target' and the '-'
+// operator when used in reductions.
+// { dg-warning "'to' clause with 'declare target' deprecated since OpenMP 5.2, use 'enter' \\\[-Wdeprecated-openmp\\\]" "" { target c } 12 }
+// { dg-warning "'to' clause with 'declare target' deprecated since OpenMP 5.2, use 'enter' \\\[-Wdeprecated-openmp\\\]" "" { target c } 18 }
+// { dg-warning "'to' clause with 'declare target' deprecated since OpenMP 5.2, use 'enter' \\\[-Wdeprecated-openmp\\\]" "" { target c++ } 10 }
+// { dg-warning "'to' clause with 'declare target' deprecated since OpenMP 5.2, use 'enter' \\\[-Wdeprecated-openmp\\\]" "" { target c++ } 16 }
+
+int x = 24;
+
+#pragma omp declare target to(x)
+
+int foo(int x)
+{
+  return x + 1;
+}
+#pragma omp declare target to(foo)
+
+int
+main()
+{
+  int y;
+  int result = 0;
+
+  #pragma omp target map(from:y)
+  y = foo(x);
+
+  #pragma omp parallel for reduction(-: result) // { dg-warning "'-' operator for reductions deprecated in OpenMP 5.2 \\\[-Wdeprecated-openmp\\\]" }
+  for (int i = 0; i < 8; ++i)
+    result -= i;
+
+  return 0;
+}
index 4341b22323669b6972a235201ef6c38f98c72150..c1003d2d991c79a965b797e27b30ff4022b6266b 100644 (file)
@@ -1,5 +1,5 @@
 /* PR c/70436 */
-/* { dg-additional-options "-Wparentheses" } */
+/* { dg-additional-options "-Wparentheses -Wno-deprecated-openmp" } */
 
 int a, b, c;
 void bar (void);
index 275eab165addb023711467fa38b1a9f84fc6d4a0..032674e274de5a76d7d63b5894379ec5ba3621ff 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { c || c++11 } } } */
 /* { dg-options "-fopenmp -std=c23" { target { c } } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 100
 
 void
@@ -26,7 +26,7 @@ f (int a[], int b[], int c[])
       otherwise (teams loop)
       when (device={arch("nvptx")}: parallel loop))]] /* { dg-error "'otherwise' or 'default' clause must appear last" } */
     for (i = 0; i < N; i++) c[i] = a[i] * b[i];
-  
+
   [[omp::directive (metadirective
       when (device={arch("nvptx")} parallel loop) /* { dg-error "expected ':' before 'parallel'" } */
       default (teams loop))]]
index bdb41e1017b751363aafb1df8f780fb2c155a521..36168c13ffa33825329a6bbf0bd8f0b2917917d2 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { c || c++11 } } } */
 /* { dg-options "-fopenmp -std=c23" { target { c } } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 100
 
 int
index 803bf0ad1ebf5ec54f43c6e21609b1fb11164ece..eceec40a0040856018e068bbd607a6b02fdf30be 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile { target { c || c++11 } } } */
 /* { dg-options "-fopenmp -std=c23" { target { c } } } */
 /* { dg-additional-options "-fdump-tree-gimple" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 100
 
 void
@@ -9,7 +9,7 @@ f (int x[], int y[], int z[])
 {
   int i;
 
-  [[omp::sequence (directive (target map(to: x, y) map(from: z)),  /* { dg-bogus "'target' construct with nested 'teams' construct contains directives outside of the 'teams' construct" "PR118694" { xfail offload_nvptx } }  */ 
+  [[omp::sequence (directive (target map(to: x, y) map(from: z)),  /* { dg-bogus "'target' construct with nested 'teams' construct contains directives outside of the 'teams' construct" "PR118694" { xfail offload_nvptx } }  */
                   directive (metadirective
                              when (device={arch("nvptx")}: teams loop)
                              default (parallel loop)))]]
index 5804eb5067a91e117dcb6e85c93f9ee8488b4cf3..76561a3147073c2974307ee318ccf815db5ea23a 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-fopenmp -std=c23" { target { c } } } */
 /* { dg-additional-options "-fdump-tree-original" } */
 /* { dg-additional-options "-fdump-tree-gimple" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 100
 
 #pragma omp declare target
index b24818a0fc71366415d9a93b8b2e9826363dcbc6..daadf0fd9f2a60ca128948acc5d61acfb2e381cc 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile { target { c || c++11 } } } */
 /* { dg-options "-fopenmp -std=c23" { target { c } } } */
 /* { dg-additional-options "-fdump-tree-original" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 100
 
 void
index 43746b669ffd41160276b79e993ca4c11380ef0f..dc3b60f75b5f9c2526b0c7e660fa19cf17677c35 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { c || c++11 } } } */
 /* { dg-options "-fopenmp -std=c23" { target { c } } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 256
 
 void
index fd8cabaef0a73dbcb8033fb0d01bb1088c6746f3..1f9286b19539a81c705d2a801e1aa1fb39abb573 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern int a;
 #pragma omp begin declare target device_type (host)
 int b;
index 2bc72cf4621464ec2f40b83d432fabd32947c8d2..5f701f76ef4a8b0dfeb886dc891098a4906cadee 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern int a;
 #pragma omp begin declare target
 #pragma omp declare target to (a)
index a1f505a3a11da318b70510a7fa09fa2bbee8b54a..4ceae407ee353d277aa47f586f933ab39b94b03a 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 struct T { int a; int *b; };
 struct S { int *s; char u; struct T v; long x; };
 
index 79ad556a9c7320fb104300a5d1e9132ca85bfb04..901f2d06634df8dc1cda8804151247555a847f44 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int foo (void), bar (void);
 extern int a;
 int b;
index 7b47e2b41823e3e9d31e0651e8a7342d1800795b..92cc33a787e3a951026ef94c340af69728b2b211 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern int a;
 #pragma omp declare target
 #pragma omp declare target to (a)
index e76e7a3c5c8519019df2d3d7a1d511a3dca2adb5..e08daf0a219854af0b8cec3e73cd268eb509b4bd 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 int a[] = { 1, 2, 3 };
 extern int b[];                        /* { dg-error "'b' in declare target directive does not have mappable type" } */
index a6bd1286ef17f7739a3a52431d78d03a9357d10d..4f45f32087a2cad2326d5bd0c6734ab65d16515f 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void f1 (void) {}
 void f2 (void);
 #pragma omp declare target to (f1) device_type (any) to (f2)
index b52c9f207a22afc611599ba54cad230ca05fdad8..6086891614e83719a11254394c27c2c683277044 100644 (file)
@@ -1,2 +1,3 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 void foo (void);       /* { dg-error "'#pragma omp declare target' without corresponding '#pragma omp end declare target'" } */
index e37b4652050b3d42841f1203b18196736d49de31..f918df4b9b0077af0c9d96b6cd9ec63ac37dd8a0 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target device_type (any)           /* { dg-error "directive with only 'device_type' or 'indirect' clauses" } */
 
 void f1 (void) {}
index 0fcbb2d04e4d052553c1d2f40a730614485f6194..4dac1fc0bfaeca954c1e4b36d824e2f7df5ba8ce 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern int a, b;
 #define X 1
 #define Y 0
index 75a205feb957020d9398129f09e03b4d8acdb9f3..28def93bfce8426a4a4e159bae063b0f3bbb274d 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp -fdump-tree-gimple" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp begin declare target indirect
 void fn1 (void) { }
 #pragma omp end declare target
index e77693430d1a41f9e0c90c45e58567df8a03d31f..71543dbb5fa79ceb5661a370fbd94db90364c3b3 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-foffload=disable -fdump-tree-gimple" } */
 /* { dg-additional-options "-mavx512bw" { target { i?86-*-* x86_64-*-* } } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #undef i386
 void f01 (void);
 #pragma omp declare variant (f01) match (device={isa(avx512f,avx512bw)})
index 9cd706e896f9724f1e9cb24b30be361848000441..01d798a353166f310aa54a9af68ba3893361941b 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-fdump-tree-gimple" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void f01 (void);
 #pragma omp declare variant (f01) match (user={condition(6 == 7)},implementation={vendor(gnu)})
 void f02 (void);
index 75dca2308624e967acf25fd6152592c8edd67a8b..8cebdec27abad9c5e8856090fc571acd844ad4c2 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-fdump-tree-gimple" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 struct S { int s; };
 void foo (char *);
 void bar (int, char *, struct S, int *);
index 8be23fd1473581f71c1291c4d440664456dc9ee7..3330ff4a21c61de5b602dd9d1ddc04fde1f17eac 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 struct S { int s; };
 void foo (char *);
 void bar (int, char *, struct S, int *);
index fff32a4761fb4ffcda48afbed969948e99d7e098..df36425d74bee297c94bcb6047cc67fa6882bf36 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int a, b[64];
 struct S { int c; } *d, *e;
 struct T;
index 77fd97159aa61464b9cc99b1aa6e95d3b70acc7e..9c47d5b413069102a7c03ba321c70336ddf52ef0 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 typedef struct __attribute__((__aligned__ (sizeof (void *)))) omp_depend_t {
   char __omp_depend_t__[2 * sizeof (void *)];
 } omp_depend_t;
index 21ca319b9f90b94f60bbd63666a8f1651ed03b50..34194865d10ea75425cd701e66b40468125d8659 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int thr;
 #pragma omp threadprivate, (thr)               /* { dg-error "expected '\\\(' before ',' token" } */
                                                /* { dg-error "expected end of line before ',' token" "" { target c++ } .-1 } */
index e5e4bc2669d80cf2251c86567b3ffdbec2f91621..2cc4a7db05683474ff75795db943e6024f79e800 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int s1, s2, s3, s4, s5, s6, s7, s8;
 #pragma omp declare target (s1, s2, s3, s4, s5, s6, s7, s8)
 
index eacaeaef80a467ddbcda3ddb00aae87c5279b0e3..92de39e9cf86d8fd467dba574d60d1a92900ccb7 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void
 foo (void)
 {
index 44c5c212c89762893ae717aae54620295111cc75..760420a3d8576e69b9088b6be78c33158b7df0ae 100644 (file)
@@ -1,5 +1,5 @@
 /* PR middle-end/87649 */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void
 foo (void)
 {
index 6d7517271f69258473f0d656f8063ffaf6a3124b..107278cae03c8fc4b953cff89261060269048aa9 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void
 foo (void)
 {
index a1182e3ce9816f48ee1c0ab7822bb01f92c81b99..63b569f2a310ade8de5394363928ae2ac3c94543 100644 (file)
@@ -1,5 +1,5 @@
 /* PR middle-end/98205 */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void baz (int) __attribute__((noreturn));
 
 void
index 6de06341af785abf6b084db8ed463e3c2b30497a..584b3a8183a4f8462d3040776d0d36b3b7fbc9f1 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/108685 */
 /* { dg-do compile } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void
 foo (int a)
 {
index 4557e22cb4f704fea9a84596c8dc969aaac54bd7..891debf2e17877eaf1555e5d96c8663b64dcb62d 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int i;
 
 #pragma omp declare simd linear (val (x) : 1) linear (y : 2)
index 545b7e5f01d4565c8d945907c8e4db620e945ae8..06daa531b5fb4dfde40da7be1c45117ba73e3ddd 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int i;
 
 #pragma omp declare simd linear (x : val, step (1)) linear (y : step (2))
index 32fa0bc7a92285bdf6527a16356b6ed2a133d847..6b35ba599b01c85105d72b01219f12f8abbed103 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int step (int);
 int val;
 #pragma omp declare simd linear (val (x) : step (1))   /* { dg-error "is neither constant nor a parameter" } */
index 24383ff04eaa51189e6227b2cd9de1252a4889ee..cb5166fbb7959a71be7063f695389e060856c562 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int bar (int);
 int baz (int *);
 
index f7003d3384b60d1f844b79ff79f4d1648f0e5018..1501bf94ec62fd8a055861a9dc5e35b736d0f700 100644 (file)
@@ -3,7 +3,7 @@
 /* See also corresponding OpenMP C++ variant: '../../g++.dg/gomp/map-1.C'.  */
 
 /* See also corresponding OpenACC variant: '../goacc/data-clause-1.c'.  */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern int a[][10], a2[][10];
 int b[10], c[10][2], d[10], e[10], f[10];
 int b2[10], c2[10][2], d2[10], e2[10], f2[10];
index 8a14b9c888e8c76603af39cb1bfcc02c2acf9e07..6d8f45e3d560b952d863819f0806667464567de9 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 struct S { int i : 1; int j : 4; long long k : 25; };
 void bar (struct S, int);
 #pragma omp declare target to (bar)
index d76f9aef5aa9b494919c0ec7e16dd4b480c0300b..c1f3d1079b4b7e1d2ca3464d8644aec63f308fd8 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-fdump-tree-original" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void
 foo (void)
 {
@@ -29,13 +29,13 @@ foo (void)
   ; /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'iterator', 'mapper' or 'present' before 'a'" "" { target c } .-1 }  */
 
 
-  #pragma omp target map (close a) /* { dg-error "'close' undeclared" "" { target c } } */ 
-  /* { dg-error "'close' was not declared in this scope" "" { target c++ } .-1 } */ 
+  #pragma omp target map (close a) /* { dg-error "'close' undeclared" "" { target c } } */
+  /* { dg-error "'close' was not declared in this scope" "" { target c++ } .-1 } */
   /* { dg-error "expected '\\)' before 'a'" "" { target *-*-* } .-2 } */
   ;
 
   #pragma omp target map (always a) /* { dg-error "'always' undeclared" "" { target c } } */
-  /* { dg-error "'always' was not declared in this scope" "" { target c++ } .-1 } */ 
+  /* { dg-error "'always' was not declared in this scope" "" { target c++ } .-1 } */
   /* { dg-error "expected '\\)' before 'a'" "" { target *-*-* } .-2 } */
   ;
 
@@ -141,10 +141,10 @@ foo (void)
   #pragma omp target exit data map(present,always,close,delete: a) map(close,present,always,release:b) map(always close present,from:b1)
 
   int close = 0;
-  #pragma omp target map (close) 
+  #pragma omp target map (close)
   ;
 
-  #pragma omp target map (close a) /* { dg-error "expected '\\)' before 'a'" } */ 
+  #pragma omp target map (close a) /* { dg-error "expected '\\)' before 'a'" } */
   ;
 
   int always = 0;
index b2bfe950818becdb1b37e6c8e51240ee6f6d2a25..0b0228dd6e2bd7299ba38661eb7a6447a0454a05 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 100
 
 void
@@ -35,7 +35,7 @@ f (int a[], int b[], int c[])
       otherwise (teams loop) \
       when (device={arch("nvptx")}: parallel loop) /* { dg-error "'otherwise' or 'default' clause must appear last" } */
     for (i = 0; i < N; i++) c[i] = a[i] * b[i];
-    
+
   #pragma omp metadirective \
       when (device={arch("nvptx")} parallel loop) /* { dg-error "expected ':' before 'parallel'" } */ \
       default (teams loop)
index 9f8169a8b02f6eae5940f6f779873adb9e74fee6..2caabf08720c9b95c6c1ddfd3271a47fd30f93c7 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 100
 
 int
index b6c1601f7b1004d7a44ef34628033dec30a6e33d..d8a4d435e4c4abc9612a8f816ab3187b02a8031b 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-additional-options "-fdump-tree-gimple" } */
+/* { dg-additional-options "-fdump-tree-gimple -Wno-deprecated-openmp" } */
 
 #define N 100
 
@@ -8,7 +8,7 @@ f (int x[], int y[], int z[])
 {
   int i;
 
-  #pragma omp target map(to: x, y) map(from: z)  /* { dg-bogus "'target' construct with nested 'teams' construct contains directives outside of the 'teams' construct" "PR118694" { xfail offload_nvptx } }  */ 
+  #pragma omp target map(to: x, y) map(from: z)  /* { dg-bogus "'target' construct with nested 'teams' construct contains directives outside of the 'teams' construct" "PR118694" { xfail offload_nvptx } }  */
     #pragma omp metadirective \
        when (device={arch("nvptx")}: teams loop) \
        default (parallel loop)
index 5cf3dbd63b71ca7e3dd9f46b8971825d8faabb95..5ee7d68fbcc70305675965ccf5780587bbfb3371 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-fdump-tree-original" } */
 /* { dg-additional-options "-fdump-tree-gimple" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 100
 
 #pragma omp declare target
index 63ce4498cd1438096ad414d1bb96c258081636ac..895b00563fffbac8ac01147e4a9c8c9054556515 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-fdump-tree-original" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 100
 
 void
index 0cab9620cd9cc0524a77bb643073f6324ad797cb..50daec6290522c463c5b15a9467d1b7e679f3cbf 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 256
 
 void
index 3103656d71f23abbbd3d2484d6cd1b8036b36b0a..315970418322bf508dbb32684eb8af522735a3d3 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-foffload=disable -fdump-tree-optimized" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 
 static void
@@ -27,13 +27,13 @@ static void doit (transform_fn *f, int n, double *a, double s)
   check (n, a, s);
 }
 
-/* Check various combinations for enforcing correct ordering of 
+/* Check various combinations for enforcing correct ordering of
    construct matches.  */
 static void
 f1 (int n, double* a, double s)
 {
 #pragma omp target teams
-#pragma omp parallel  
+#pragma omp parallel
 #pragma omp metadirective                                      \
   when (construct={target}                                     \
        : for)                                                  \
index d7f736d70b3ee6d3b9c8bfcee19fdd1c7a141ebf..7b4083048fea2ff772cdf01a20ed4f9df5a2d5cd 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile }  */
 /* { dg-additional-options "-foffload=disable -fdump-tree-optimized" } */
 /* { dg-additional-options "-DDEVICE_ARCH=x86_64 -DDEVICE_ISA=sse -msse" { target { x86 && lp64 } } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 
 static void
@@ -53,7 +53,7 @@ f2 (int n, double* a, double s)
     a[i] = a[i] * s;
 }
 
-/* Check arch.  Either DEVICE_ARCH is defined by command-line option, 
+/* Check arch.  Either DEVICE_ARCH is defined by command-line option,
    or we know it is not x86_64.  */
 #ifdef DEVICE_ARCH
 static void
index 284f35f6d84739a2dad5dc5c633e36f59fd9bdb0..e7e2c82fcd40c02f912815a5b207ffab43d784b4 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile }  */
 /* { dg-additional-options "-fdump-tree-optimized" } */
 /* { dg-additional-options "-DDEVICE_ARCH=x86_64 -DDEVICE_ISA=mmx -mmmx" { target { x86 && lp64 } } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 
 static void
@@ -53,7 +53,7 @@ f2 (int n, double* a, double s)
     a[i] = a[i] * s;
 }
 
-/* Check arch.  Either DEVICE_ARCH is defined by command-line option, 
+/* Check arch.  Either DEVICE_ARCH is defined by command-line option,
    or we know it is not x86_64.  */
 #ifdef DEVICE_ARCH
 static void
index 4de192177f8d488bee6aa6f70f70a005c3539e81..4125297952926dc0987ea7c0fa0bb1c342a93776 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* In configurations without offloading configured, we can resolve many
    instances of the target_device context selector at gimplification time
    instead of waiting until late resolution.  */
index 5e044dc65c6052b608800da8eb9bffcb0c8cb305..1b30d7ef9af568d9b21f6b847f156a1e0dcbd36e 100644 (file)
@@ -1,4 +1,5 @@
-void
+// { dg-additional-options "-Wno-deprecated-openmp" }
+  void
 f1 (int *a)
 {
   int i;
index b007ca7982a367dd275656e11539dba29158f28c..9d004fe6e10c7602a79f41b1c1377f7761fc6f3b 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void
 foo (void)
 {
index ee798f4dd1b641f997794cbbecc02b2c1f6155d9..9e7e5caf500f7890a7cf22d6653ecbf2ac653083 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void
 foo (void)
 {
index 00ebab9c628fee6d4a1506512f3ade02d0e92d12..6327c40c8e849fa237bb62f7b776210a80d4fb20 100644 (file)
@@ -6,7 +6,7 @@
 /* { dg-final { scan-tree-dump-not "firstprivate\\\(var\[123]\\\)" "gimple" } } */
 /* { dg-final { scan-tree-dump-not ".omp_data_arr.\[0-9]*.var" "omplower" } } */
 /* { dg-final { scan-tree-dump-not ".omp_data_i->var" "omplower" } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void
 foo (void)
 {
index 6df8250f81c3b3698640e7ea786421bac6197623..4e11230684f657ee3a998c51b8f71863e6f5b38e 100644 (file)
@@ -1,5 +1,5 @@
 /* PR c/106836 */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void
 foo (void)
 {
index b563d5f0ebfd04275f44992cae31d4b9ff88d59a..9b16cc8cffb6295f0949c86a9288ffa099dc2e9f 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* This test case checks that the inner metadirective is accepted as intervening
    code since it resolves to 'omp nothing'.  */
 
index 54a686487c98001a469db5bb9cedd933348b1441..25220d3d5e1ce1ac4d03fb518f103601a387ac0e 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-std=c99" { target c } } */
 /* { dg-additional-options "-std=c++11" { target c++ } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void foo (const char *);
 #pragma omp declare target to (foo)
 
index 90c4a720774aff18e9f3864501d54abb8947d576..55758b1a0741223f96fcb9ffd882333f8f33be7b 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-std=gnu99" { target c } } */
 /* { dg-additional-options "-std=gnu++11" { target c++ } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void foo (const char *, const char *);
 #pragma omp declare target to (foo)
 
index 6a9585d3281720367cf54055a61320b698539f12..d5e248b4f43d3b6d7b6e087b05cb536e8752a9e7 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-std=c99" { target c } } */
 /* { dg-additional-options "-std=c++11" { target c++ } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void foo (const char *);
 #pragma omp declare target to (foo)
 
index f537e66e27c509013b31c0f4d6e68d7f119dc1f5..061882ec9a1977ca0829ab9233c04e577ea43254 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 void f0 (void);
 
index 516bb8091fdef92e8eadae4d421a982ef6e0af7a..46f41f836a0d93a996c924878d4548d3c0bef835 100644 (file)
@@ -1,5 +1,5 @@
 /* PR c++/91987 */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int bar (void);
 void baz (int *);
 #pragma omp declare target to (baz)
index 8d319058ce110f703efcad3794da540668390bc7..134b85861c3d2b48074da19493db79200a7bbe28 100644 (file)
@@ -5,7 +5,7 @@
 /* { dg-final { scan-tree-dump-times "__attribute__\\(\\(omp declare target\\)\\)\[\n\r\]*int called_in_target1" 1 "omplower" } }  */
 /* { dg-final { scan-tree-dump-times "__attribute__\\(\\(omp declare target\\)\\)\[\n\r\]*int called_in_target2" 1 "omplower" } }  */
 /* { dg-final { scan-tree-dump-times "__attribute__\\(\\(omp declare target\\)\\)\[\n\r\]*void tg_fn" 1 "omplower" } }  */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp requires reverse_offload
 
 extern int add_3 (int);
index 82ab25722e741a79b4cc33d97ecfa1c63373a4b7..119980e33c7e03eacd2dcc91be53a35351036143 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void
 foo (void)
 {
index 5ee562bfbf78fa058b4e435718736a13b986eabd..8fbe50d4b77300429949701873389c5a78527721 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp -Wunknown-pragmas -Werror" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern void bark (void);
 int i,j,k;
 int array[555];
index e781a6fd9459e700e55e352b1cf7ae942f02eda7..5acd2fd2fe4509ae0afedf42c041f2105a0044ff 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void bar (int *);
 
 void
index 7cb16ed0f76005024f8ba070bf51ff97568c32b9..d5a055956243e7e999ab4d553c0603a0df05a68b 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* Test that we can handle multiple undeclared sink variables
    gracefully.  */
 
index 11b6d9973c9dff5c6f7830c4838a5de69fe41094..60f4cd573777581a0927bc75967a8f1c08950a6e 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp -fdump-tree-omplower" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* Test that we adjust pointer offsets for sink variables
    correctly.  */
 
index 4fbaa8a03cb06aa6d7c46be23bde6e11d971b5c8..fad40c88630645a4401113786d8360a34706f4a0 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void bar (int);
 
 void
index 74d60e1066e7ffd0bec194b24186fa5d0ee0471f..ea3985879270b8179b0fe5c76ade1447989166f7 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-fdump-tree-gimple" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int v = 6;
 void bar (int);
 void bar2 (int, long *, long *);
index b613872952e6df89b336b8fd94e56b03a7288733..a5fdc3e7f3c5be538e1e4d7132bdd7c08bc46279 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++11 } }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 #pragma omp declare target
 [[omp::directive (declare target)]];
index f6d24b9540c600b3d71b3a1031f4e7c20f406b60..f0d2db6b61d41b077e8de8bfb905e4d939a09cb3 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++11 } }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 typedef struct __attribute__((__aligned__ (sizeof (void *)))) omp_depend_t {
   char __omp_depend_t__[2 * sizeof (void *)];
 } omp_depend_t;
index cf7cef46b7073df1df43dc37960188c67f39529c..1ed1abf0f92a9d5c88496453f642902bf4d98894 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++11 } }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int n1 = 0, n2 = 42;
 [[omp::sequence (directive (requires, atomic_default_mem_order (seq_cst)))]];
 [[omp::directive (declare reduction (plus: int: omp_out += omp_in) initializer (omp_priv = 0))]];
index aad97d6ad62a957df09a3bffe71c547039abaebe..74a60f9d9b94a32e4976026f261bdf59496b518c 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-require-effective-target tls }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define p parallel
 
 extern void bar (void);
index d89d9a7cf6b5aca4d69d819abbd975a7773ab824..9bda32d5ad39371f545ca89c5f6394eeb04f8e55 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-options "-fopenmp -ffat-lto-objects" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare simd uniform(b) linear(c, d) linear(uval(e)) linear(ref(f))
 int f1 (int a, int b, int c, int &d, int &e, int &f)
 {
index 0b76d922f3e15f996763de76940d368e516c16f7..a61119eaf875c13b73d438385cc06ac956d71c00 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare simd linear(p:1) linear(q:-1) linear(s:-3)
 int
 f1 (int *p, int *q, short *s)
index 09137ee5b98f4e9c579e87304b7add36c982b1db..6a5b272d984a2e0afe7389a482e9455f25e2dc75 100644 (file)
@@ -1,7 +1,7 @@
 // PR c++/71257
 // { dg-do compile }
 // { dg-options "-fopenmp-simd" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 struct S { int a; };
 #pragma omp declare simd linear(val(a):2)
 int f1 (int &a);
index 52e9f182da35c920d78e64da8ee56cfdabaea541..625333c8dc45189763101bf323ae8bc1bac0e92e 100644 (file)
@@ -1,7 +1,7 @@
 // PR middle-end/78025
 // { dg-do compile }
 // { dg-additional-options "-O2" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 struct S { S (); ~S (); };
 
 int bar1 (int, int, float &, S &, int *, int, int &, int &, int &, int &, int &);
index 01c91e890914315ccd50e11cbeb5ff7581491a7d..5e23f9fafe1a7b7cd076bc5f8c29b420c8914ead 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/100872
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 template <int N, typename T>
 struct S {
   #pragma omp declare simd aligned(a : N * 2) aligned(b) linear(ref(b): N)
index 7b270cdddb70654045a9a523e88428fdef3cfab5..e1f642b88a6b7cb4f2e51e316d1f5567ec17f298 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-options "-fopenmp" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 void f1 (int);
 void f1 (double);
index e080ca6bfb5b6dffbb4599b888bb30d2175477f0..d607f8c3697a3f263ddf5ac48dee3a4e485972b2 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-options "-fopenmp" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 template <typename T>
 struct S { T a; };
index b0a90d8d31f50029fd06fa4c621ccdb94188edaa..54d60bedb0301c4caae3b476c7181333ae6abdc1 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-additional-options "-fdump-tree-gimple" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 // Test implicit marking of declare target to.
 
 int foo () { return 1; }
index 1d66ec9f74180d57e97e79e6ff588692275c3386..48b7457b77537d7f8b842ee6614806ed700232c3 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-skip-if "c++98 does not support attributes" { c++98_only } }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 [[omp::decl (declare target, indirect(1))]] // { dg-error "directive with only 'device_type' or 'indirect' clause" }
 int f (void) { return 5; }
 
index a0119ebc6940e6fdcd6119195eea95bc3555f51a..bd1470ff1e782b0ccc409ebff4d39fcdc78dcb05 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int a, b[64];
 struct S { int c; } *d, *e;
 struct T;
index cb091a1da2cb7b2129232f5ba75a69ec82d9fcd7..7bd6f98b2ea81d394da6e9f025f17acec1a030c4 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 typedef struct __attribute__((__aligned__ (sizeof (void *)))) omp_depend_t {
   char __omp_depend_t__[2 * sizeof (void *)];
 } omp_depend_t;
index 1fd63570f4a21b734a7831376a4f6b9b7bec4d80..56daccc960b8d9d2ca1c176e05fbb0fc81750f96 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/100957
 // { dg-do compile }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 struct S {
   S ()
   {
index 68d58fee59f8d95869c762928bbc3c786ff01b08..9a8f71f5d755e5e6f00f10e13d4ee2a00c5fbc52 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-options "-fopenmp" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int i;
 
 #pragma omp declare simd linear (ref (x) : 1) linear (uval (y) : 2)
index eed982276e7f2f0966261636ee8c2202030fed3a..4cb5a2e7c9bfabe6a06eda2e9dfd7d4801310581 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-options "-fopenmp" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 
 int i, j;
index 0936cf89155a9800c8fd2e4953f4ad09280d3a55..8184633e52986c0b7a35cf55ebaf0bc28e731818 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-options "-fopenmp" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int i;
 
 #pragma omp declare simd linear (x : ref, step (1)) linear (y : step (2), uval)
index fbc193edeb6e21706027285736f5d430315fc977..141451d26be9a7fae1d0468299aa21f357a242af 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile { target c++11 } } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 constexpr int step (int x) { return x; }
 constexpr int val = 1;
 constexpr int ref = 2;
index 4416ce99cdc1511a169d098694e2046de22665ac..a2ec9fb849c3eef66abad25cd91fffaf258ed6a4 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* Test 'map' clause diagnostics.  */
 
 /* See also corresponding OpenMP C/C++ variant: '../../c-c++-common/gomp/map-1.c'.  */
diff --git a/gcc/testsuite/g++.dg/gomp/map-csm-dep.C b/gcc/testsuite/g++.dg/gomp/map-csm-dep.C
new file mode 100644 (file)
index 0000000..d40ea8c
--- /dev/null
@@ -0,0 +1,40 @@
+// can't manage to elicit the "illegal comma" but it seems that we're already getting errors for improper syntax.
+// otherwise, though, the deprecation works as intended.
+int
+main()
+  {
+    float B[8];
+    float C[8];
+    // this should be completely fine
+    #pragma omp target teams map(to: B[0:8], C[0:8])
+    {}
+    // this should give us a deprecation warning
+    #pragma omp target teams map(close always present to: B[0:8], C[0:8]) // { dg-warning "'map' clause modifiers without comma separation is deprecated since OpenMP 5.2 \\\[-Wdeprecated-openmp\\\]" }
+    {}
+    // this should be completely fine
+    #pragma omp target teams map(close, always, present, to: B[0:8], C[0:8])
+    {}
+
+    #pragma omp target teams map(close always,, present, to: B[0:8], C[0:8])
+    {}
+    // { dg-error "'close' was not declared in this scope" "" { target *-*-* } 18 }
+    // { dg-error "expected '\\)' before 'always'" "" { target *-*-* } 18 }
+    // { dg-error "expected primary-expression before ',' token" "" { target *-*-* } 18 }
+    // { dg-error "'present' was not declared in this scope" "" { target *-*-* } 18 }
+    // { dg-error "found ':' in nested-name-specifier, expected '::'" "" { target *-*-* } 18 }
+    // { dg-error "'to' has not been declared; did you mean 'auto'?" "" { target *-*-* } 18 }
+
+    #pragma omp target teams map(,close to: B[0:8], C[0:8]) 
+    {}
+    // { dg-error "expected primary-expression before ',' token" "" { target *-*-* } 27 }
+    // { dg-error "'close' was not declared in this scope" "" { target *-*-* } 27 }
+    // { dg-error "expected '\\)' before 'to'" "" { target *-*-* } 27 }
+    
+    #pragma omp target teams map(close,,always to: B[0:8] C[0:8])
+    {}
+    // { dg-error "expected primary-expression before ',' token" "" { target *-*-* } 33 }
+    // { dg-error "'close' was not declared in this scope" "" { target *-*-* } 33 }
+    // { dg-error "'always' was not declared in this scope" "" { target *-*-* } 33 }
+    // { dg-error "expected '\\)' before 'to'" "" { target *-*-* } 33 }
+    return 0;
+  }
index 242a396bbb630e244b49fc26ae19ebffc86846a8..406fd40c7784d7f2a96d59bac566a99d06377124 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/118876
 // { dg-do compile }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 struct A { ~A () {} } a[2];
 #pragma omp end declare target
index 9ecc9b73db84f47c2a270044fa158671e074ccc7..3ec42bf673116a796cf6bedf2bfe985959f556e6 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/119370
 // { dg-do compile }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 struct S {
   int s;
index 982d36c7aa06b6acd606221649499d729c944c8a..6533735545e2d7973744887e1976a36aa129b5ce 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 void bar (int, int, int);
 
 template<typename T>
index 26669ef588e71dc83f1453179918c586c2f9f735..489ac07dc1b3570ee2ceef271c741a5bd94a90f5 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* Tests iterators are allowed in ordered loops and that we keep track
    of the original iterator DECL for diagnostic purposes.  */
 
index 4271d66faefa65856dba1197964c61a597f3de7b..48755c7887cabf0327c318ee8b0b46a5b0e4797c 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp -fdump-tree-gimple" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* Test that we adjust pointer offsets for sink variables
    correctly.  */
 
index b96473642bbe53392dd5a08f6823bf6b939b794d..3c09e809a4bbe47ac1e3de1ed3d7d072256a39ee 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-options "-fopenmp -O2" } */
 /* { dg-additional-options "-fopenmp-target-simd-clone=any -fdump-ipa-simdclone-details -fdump-ipa-cgraph" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* Test that simd clones are generated for functions with "declare target".  */
 
 #pragma omp declare target
index 08c0539dc638e5b507a79c512df1ec520e5d3a03..85d72ddd1b7f9d06e9448b2cdbf9671c98542f75 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-options "-fopenmp -O2" } */
 /* { dg-additional-options "-fopenmp-target-simd-clone=any -fdump-ipa-simdclone-details" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* Test that simd clones are not generated for "declare target"
    functions that throw.  */
 
index 29e55970e452cea1e283dc26ea121372c25c56ff..db22e04e1c648ee22721bb49b9fec4b9c2253922 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-additional-options "-fdump-tree-gimple" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int v = 6;
 void bar (int);
 void bar2 (int, long *, long *);
index e20afd6f8100d108f283fe8c45378dfae06628c0..096219323a83fbf3ccc57566592eed36fc2255aa 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 struct S
 {
   int s;
index ed4c0416d9babf317df15cb9aad8f3942bb829df..1a593f9678a04a687ebb1cb28ce3375283b30681 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp -std=c23" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 #pragma omp declare target
 [[omp::directive (declare target)]];
index bbf91f6d171d512e1943da8b92e58579be0e2cf8..4e67783562e18c576a60c25c5a1783aafc2064f9 100644 (file)
@@ -1,4 +1,4 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp -std=c23" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include "../../g++.dg/gomp/attrs-5.C"
index 1d2207e6a7610b8a9763eeaaaf5962eef5ed1227..2e0f6f59a64cf8c3fcf288930da2de509791b440 100644 (file)
@@ -1,4 +1,4 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp -std=c23" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include "../../g++.dg/gomp/attrs-9.C"
index 8e7cc950d22a939407c03db3c404914fdeacd242..3770fbf6a87dc8c225894732e88b113c38559fe4 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target tls } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define p parallel
 
 extern void bar (void);
index ba8e71008b5b2c6ef04bee31961a20ed7998708f..09e5e8d03f9474f5c372a961a4336f94936d5670 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare simd linear(p:1) linear(val(q):-1) linear(s:-3)
 int
 f1 (int *p, int *q, short *s)
index f906e3991bb6405b27c90c5fbf29a9075344d3b3..8b0a4f3385fdee4f4ef77c2fb9fb9216676f5499 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int i, j;
 
 void
diff --git a/gcc/testsuite/gcc.dg/gomp/map-csm-dep.c b/gcc/testsuite/gcc.dg/gomp/map-csm-dep.c
new file mode 100644 (file)
index 0000000..16f3652
--- /dev/null
@@ -0,0 +1,30 @@
+// can't manage to elicit the "illegal comma" but it seems that we're already getting errors for improper syntax.
+// otherwise, though, the deprecation works as intended.
+int
+main()
+  {
+    float B[8];
+    float C[8];
+    // this should be completely fine
+    #pragma omp target teams map(to: B[0:8], C[0:8])
+    {}
+    // this should give us a deprecation warning
+    #pragma omp target teams map(close always present to: B[0:8], C[0:8]) // { dg-warning "'map' clause modifiers without comma separation is deprecated since OpenMP 5.2 \\\[-Wdeprecated-openmp\\\]" }
+    {}
+    // this should be completely fine
+    #pragma omp target teams map(close, always, present, to: B[0:8], C[0:8])
+    {}
+    // this should be raising illegal comma.
+    // { dg-error "'close' undeclared" "" { target *-*-* } 19 }
+    #pragma omp target teams map(close always,, present, to: B[0:8], C[0:8])
+    {}
+    // { dg-error "expected '\\)' before 'always'" "" { target *-*-* } 19 }
+
+
+    #pragma omp target teams map(,close to: B[0:8], C[0:8]) // { dg-error "expected expression before ',' token" }
+    {}
+    // { dg-error "'always' undeclared" "" { target *-*-* } 27 }
+    #pragma omp target teams map(close,,always to: B[0:8] C[0:8]) // { dg-error "expected expression before ',' token" }
+    {}
+    return 0;
+  }
index 2ac81bfde753d96ce915491a0ed0e9a5047efa88..8d354e4037da9004b05346269bfb3cc71cd71a45 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int main (void)
 {
   int x, y;
index 738396523af7769c64a8e64bff33ce2c1dd8ba38..f8672cad28c4f49ed9ad65c41988dc81cd13a9b3 100644 (file)
@@ -1,7 +1,7 @@
 /* PR middle-end/104757 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -fopenmp" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 void
 foo (int x, int y, int *z)
index d166dac950b2b641230f3c9b483f94270cc00781..56498066679aff210af25afadc2668d1b7917eca 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp -fdump-tree-omplower" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* Test depend(sink) clause folding.  */
 
 int i,j,k, N;
index f3cdaee19008c2ea54766621b37ef4b2cd784c04..d2b15f3f2e2aa631980e2ed6f50d23bb5e7a5e6b 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int i,j, N;
 
 extern void bar();
index d3af18e17e7fa4d82e91ae8b689a29e08edc445e..2b93c77ce9179e985e77a693f76df900831bb1b3 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp -fdump-tree-omplower" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* Test that we fold sink offsets correctly while taking into account
    pointer sizes.  */
 
index 0d74aa971f93dff49499a54e6f1fbe966f4f10de..48acde09b2f59c7cdb26725cc09df056ca1a9f15 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-options "-fopenmp -O2" } */
 /* { dg-additional-options "-fopenmp-target-simd-clone=any -fdump-ipa-simdclone-details -fdump-ipa-cgraph" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* Test that simd clones are generated for functions with "declare target".  */
 
 #pragma omp declare target
index acdc241db46cee87a981243b93959e456ef068b5..16928afc945196e764f2d37116f6703b774d0891 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-options "-fopenmp -O2" } */
 /* { dg-additional-options "-fdump-ipa-simdclone-details" } */
-
-/* Test that host simd clones are not generated for functions with 
+// { dg-additional-options "-Wno-deprecated-openmp" }
+/* Test that host simd clones are not generated for functions with
    "declare target" by default at -O2.  */
 
 #pragma omp declare target
index e90d49ce7f2c90eea39b9ca1ff5ea3f63d907c0e..e5db3b4c38114f61f5cc4db0b0d741f8f53b11f4 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-options "-fopenmp -O2" } */
 /* { dg-additional-options "-fopenmp-target-simd-clone=any -fdump-ipa-simdclone-details" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* Test that host simd clones are not generated for functions with the nohost
    "declare target" clause.  */
 
index 141097bdce8fd3c1dce0e1e6fb2363d964bf78a1..f115c97765e32f8471a925f8a6aad336778115c3 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-options "-fopenmp -O2" } */
 /* { dg-additional-options "-fopenmp-target-simd-clone=any -fdump-ipa-simdclone-details" } */
-
-/* Test that simd clones are not generated for functions with 
+// { dg-additional-options "-Wno-deprecated-openmp" }
+/* Test that simd clones are not generated for functions with
    "declare target" but that write memory in the body.  */
 
 extern int save;
index 93f9774f83190f7a1f234cc38d2f5aa487195be6..5355cc99c1d78195556c5e7d6437062289d2e267 100644 (file)
@@ -1,14 +1,14 @@
 /* { dg-options "-fopenmp -O2" } */
 /* { dg-additional-options "-fopenmp-target-simd-clone=any -fdump-ipa-simdclone-details" } */
 
-/* Test that simd clones are not generated for functions with 
+/* Test that simd clones are not generated for functions with
    "declare target" but unsuitable arguments.  */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 struct s {
   int a;
   int b;
 };
-  
+
 #pragma omp declare target
 __attribute__ ((__noinline__)) int addit (struct s x)
 {
index 4c34967af95f083902f060612a2b4c07a34344d5..f2cf513492d67de7cd310bac4259c1f0e21ec004 100644 (file)
@@ -1,8 +1,8 @@
 /* { dg-options "-fopenmp -O2" } */
 /* { dg-additional-options "-fopenmp-target-simd-clone=any -fdump-ipa-simdclone-details" } */
-
-/* Test that simd clones are not generated for functions with 
-   "declare target" but that call possibly side-effecting functions 
+// { dg-additional-options "-Wno-deprecated-openmp" }
+/* Test that simd clones are not generated for functions with
+   "declare target" but that call possibly side-effecting functions
    in the body.  */
 
 extern int f (int);
index 78c60f9f6bcd34dee9d714452a8c056f96e8bf20..3631145904fdd8ff3a1a0e7083233a3355248656 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-options "-fopenmp -O2" } */
 /* { dg-additional-options "-fopenmp-target-simd-clone=any -fdump-ipa-simdclone-details" } */
-
-/* Test that simd clones are not generated for functions with 
+// { dg-additional-options "-Wno-deprecated-openmp" }
+/* Test that simd clones are not generated for functions with
    "declare target" that have no callers in the same compilation unit.  */
 
 #pragma omp declare target
index 561766cb128d37094738f1c8c5eb140e7e13cc99..d06b640ae5ffbc7f58944763926cff1d948975c3 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-options "-fopenmp -O2" } */
 /* { dg-additional-options "-fopenmp-target-simd-clone=any -fdump-ipa-simdclone-details" } */
-
-/* Test that simd clones are not generated for functions with 
+// { dg-additional-options "-Wno-deprecated-openmp" }
+/* Test that simd clones are not generated for functions with
    "declare target" but that read volatile memory in the body.  */
 
 extern volatile int save;
index 6b9a7ecd5a14606a700efd748fe2bf53d5a04ff5..ca865d07f81cbc02fb1f6933186d309a16f1da2c 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_doacross_start \[^\n\r]*, (?:2147483648|-2147483648), 0, " 1 "optimized" } } */
 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_doacross_post " 1 "optimized" } } */
index 955c6d4eef88e03e70a61369dfe6a1397b375a91..c894edabf87216fcd7185377e24f0eaa74af0ac6 100644 (file)
@@ -7,7 +7,7 @@
 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_static_next " 1 "optimized" } } */
 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_workshare_task_reduction_unregister \\(0\\)" 1 "optimized" } } */
 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel " 1 "optimized" } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 unsigned long long int j;
 void bar (unsigned long long int *);
 
index 9019886665a334a426e310acd00168158a337052..274ed370155455589f08550c4d84ba98d9002032 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_ull_doacross_start \[^\n\r]*, (?:2147483650|-2147483646), 1, " 1 "optimized" } } */
 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_doacross_ull_post " 1 "optimized" } } */
index 7907aba5ee0c8c35ea9b2a6b0e4a98a1b9818564..d0bbd5930f564ebcda45516645f097a8e5604251 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fopenmp -fdump-tree-optimized" } */
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_doacross_start \[^\n\r]*, (?:2147483651|-2147483645), 1, " 1 "optimized" } } */
 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_loop_end " 1 "optimized" } } */
 /* { dg-final { scan-tree-dump-times "__builtin_GOMP_doacross_post " 1 "optimized" } } */
index 4394bb1405dfaf7a773ae4c3380c05b2e289e0fb..2c6a2de49f3b7ed22a82a50c2aadc6072f7b15d9 100644 (file)
@@ -1,6 +1,7 @@
 // { dg-do run }
 // { dg-require-effective-target offload_device_shared_as }
-
+// { dg-additional-options "-Wno-deprecated-declarations" }
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 
 struct typeX
index 91edf8cc34b11209a1637b77b4fe6454d3503308..6fd00df272eb69759d4c1b49f691c8826792508c 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 #include <omp.h>
 
index bc53ee6e8a2b7702aa7c35b74af59fb52ac06f82..dbed1045915049cd118df8089144073e261e5e85 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do run }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 typedef __PTRDIFF_TYPE__ ptrdiff_t;
 extern "C" void abort ();
 
index ddb9ce629dd89c6b3926e2a8211af9bb3fd27ab0..9aaf6c29fb441c8942ecb7cbf0cdf673ba18be4c 100644 (file)
@@ -1,7 +1,7 @@
 // PR c++/86443
 // { dg-do run }
 // { dg-additional-options "-std=c++17" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 typedef __PTRDIFF_TYPE__ ptrdiff_t;
 extern "C" void abort ();
 
index 99f74e469114e0deb4c115a3bc957c484a1fdf34..0a5d8baa2544551f214fa497355faf8f0a0cc3e9 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do run }
 // { dg-additional-options "-std=c++17" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 typedef __PTRDIFF_TYPE__ ptrdiff_t;
 extern "C" void abort ();
 
index c8a73dcfa19f8c8b4109a3cc04480c45df2aac91..314f4a6a0f5860d4b57925e6a869423d4b939479 100644 (file)
@@ -1,3 +1,3 @@
 // { dg-additional-options -O0 }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include "pr101544-1.C"
index 22c81aa5f860720f6d40beb3be75985fb40090c2..ae25ca39a6cfddec34844e96857d0cd319365def 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 // See also '../libgomp.oacc-c++/pr101544-1.C'.
 #ifndef ALWAYS_INLINE
 # define ALWAYS_INLINE
index 85e42909e29ffce5e95d8af4b807af203b7657ab..3a8dd39d10e243397549e567363cfd251822d497 100644 (file)
@@ -1,3 +1,3 @@
 // { dg-additional-options -O0 }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include "pr96835-1.C"
index c9f6475eeb911d090976b752020cdec4b2771905..863ff7b8b0bbd8935b47dbccecb80ed36835395f 100644 (file)
@@ -1,4 +1,5 @@
 // See also '../libgomp.oacc-c++/pr96835-1.C'.
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #ifndef ALWAYS_INLINE
 # define ALWAYS_INLINE
 #endif
index a704e39411dabec78373e4ea343927d4422fe4c7..2da754879f02768db448a0fc1aa98b5d03ed5b78 100644 (file)
@@ -26,7 +26,7 @@
 // { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "v1\\._x = 5;" "optimized" { target offload_target_amdgcn } } }
 // { dg-final { only_for_offload_target nvptx-none scan-offload-tree-dump-not "omp_initial_device;" "optimized" { target offload_target_nvptx } } }
 // { dg-final { only_for_offload_target nvptx-none scan-offload-tree-dump "v1\\._x = 5;" "optimized" { target offload_target_nvptx } } }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <cassert>
 #include <omp.h>
 
index de481aadd34eb15ee583b394b327460872842d33..1aab931920f2c6d1cdafdca80ac429af20743f73 100644 (file)
@@ -27,7 +27,7 @@
 // { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "v1\\._x = 5;" "optimized" { target offload_target_amdgcn } } }
 // { dg-final { only_for_offload_target nvptx-none scan-offload-tree-dump-not "omp_initial_device;" "optimized" { target offload_target_nvptx } } }
 // { dg-final { only_for_offload_target nvptx-none scan-offload-tree-dump "v1\\._x = 5;" "optimized" { target offload_target_nvptx } } }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 
 #include <cassert>
 
index 8d4aff21cd793a010eabeeba8e8fc533459e840f..51e14211392b5914c7be611abb3afb45d4ee8538 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do run }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <cassert>
 
 #pragma omp declare target
index 5279ac026840098c23fa8d587f369a9b3c4934a9..536fe4d0dde9029680a0f11b725f8f3ab8b40a28 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern "C" void abort (void);
 
 int g;
index 7e8cc582e94e60e2c8a66b9cf3ef64f13d0baa56..a6be4a046018b398762d060512832219bed319b6 100644 (file)
@@ -2,7 +2,7 @@
 
 /* { dg-additional-options -fdump-tree-optimized-raw-asmname }
    { dg-additional-options -foffload-options=-fdump-tree-optimized-raw-asmname } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <omp.h>
 #include <vector>
 
index 9c8512245b131c8938c32c01ee06383d7a71e9aa..a673ddb6898c5d8a9f0bf80573c7c56052d3fa20 100644 (file)
@@ -4,7 +4,7 @@
 
 /* { dg-additional-options -fdump-tree-optimized-raw-asmname }
    { dg-additional-options -foffload-options=-fdump-tree-optimized-raw-asmname } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <omp.h>
 #include <vector>
 
index aa36f7109e93a282a4a159ddb79a1d5bb383d67d..c98d8559b9778ef776ce9dfa458b81917d52f9af 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target omp_usm } */
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp requires unified_shared_memory self_maps
 
 #define MEM_SHARED
index ee5e094c6943d1e488428c569d034f52045eb068..d40fe1044ffa4443c00870cf1ca43f3118648cd2 100644 (file)
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } }
+// { dg-additional-options "-Wno-deprecated-openmp" }
 
 #include <stdlib.h>
 #include <time.h>
index aaf715237a403eeaa5378c38f49789e366419ed1..73f50bbcf2e40dec2a3a009fbd41af9c5bca2804 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do run }
 // { dg-additional-options "-std=c++20" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <cmath>
 #include <numbers>
 
index e392d17a3039c0ad0bfa188ba28f330a3a11e7d5..db6c66b70e24a27e494d0166591c3020cbd7c54a 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do run }
 // { dg-additional-options "-std=c++20" }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <cmath>
 #include <complex>
 #include <numbers>
index b30ade4f08652199530fb9a2a53f555bfa446fc8..aaa6acc6312819ec8554d40d6ac7e532b4a7e241 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target omp_usm } */
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp requires unified_shared_memory self_maps
 
 #define MEM_SHARED
index d8c929997a545e55e165930ad7585e47c51b3884..e89c2557c917a64fabd840108bb05a1ce44a3fda 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do run }
 // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 #include <time.h>
 #include <deque>
index 65004b25510b4c8d7711f28e639f0647b5841e21..2c28ed815805f4f59d8c72644c86b314c5dfce32 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target omp_usm } */
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp requires unified_shared_memory self_maps
 
 #define MEM_SHARED
index 4a98e4734fbb72dfc1c298420d05f3ad45cad2be..93f9147671282db4e0e1ff5cc46de66d142da263 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do run }
 // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 #include <time.h>
 #include <omp.h>
index 3cdd44db427725180e5017a0df6e1485a65d3564..dec92d2639d2c62c0ed11802c082bb0a639aa352 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target omp_usm } */
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp requires unified_shared_memory self_maps
 
 #define MEM_SHARED
index bede83920350fb237352870dd39edc12f6d7c64b..6b3f8c512314958a25a738acf245a4df85df5c27 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do run }
 // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 #include <time.h>
 #include <omp.h>
index a6b3665663b2e6952b391b5818903602e841efc8..8ce0c251dbde692b791cf1563c452feaae123c7f 100644 (file)
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-additional-options "-std=c++20" }
+// { dg-additional-options "-Wno-deprecated-openmp" }
 
 #include <cmath>
 #include <numbers>
index 09f98790b3cba39068f43e89d3e62492ba7f9521..09af5c2dd214a9263e6cbcb1395b3869205973e9 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-additional-options "-std=c++20" }
 /* { dg-require-effective-target omp_usm } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp requires unified_shared_memory self_maps
 
 #define MEM_SHARED
index d6186f76ac57b76fa30215757de2ec74e225faea..761abc357e705003f64addbf79ec7009e9ef1740 100644 (file)
@@ -1,7 +1,7 @@
 // { dg-do run }
 // { dg-additional-options "-std=c++20" }
 // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 #include <time.h>
 #include <span>
index 9a77fb256bf4fbd7666f0c45ccdc1664a8697591..f15ba7ec005b3e90ea9e006be9df430acc1cb375 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-additional-options -std=c++20 }
 // { dg-output-file target-std__valarray-1.output }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <valarray>
 #include <ostream>
 #include <sstream>
index 828b67c39306dafe4a48bd2c9b94efaddfbe3e0a..9a0485ce77a491cd2b284be23cc2f1a65e9379d0 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target omp_usm } */
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp requires unified_shared_memory self_maps
 
 #define MEM_SHARED
index 81eebe83e0378f5a2b198f24ed8629e706331293..15ca0f999b4ed2d9e538b35b5911ae1663b71b00 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do run }
 // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 #include <time.h>
 #include <valarray>
index 835f6d5287eb09fe5af68faf8ab73ab04358ca7b..c9f42838327575c96037b39868ab7f1a94064768 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target omp_usm } */
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp requires unified_shared_memory self_maps
 
 #define MEM_SHARED
index d728194eb68aa2539ddbf502552cdf620870d7b7..ae2696301076c5dc4097ba99c3d85cb902d91074 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do run }
 // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } }
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 #include <time.h>
 #include <vector>
index c5670dfb7db73408a39e1fd8b52f9961a7153fb6..bd57477e9599b60f0aea0bbab1385df417c598b1 100644 (file)
@@ -1,6 +1,5 @@
 /* PR c++/99509  */
-
-#pragma omp declare target
+#pragma omp declare target // { dg-warning "use of 'omp declare target' as a synonym for 'omp begin declare target' has been deprecated since OpenMP 5.2 \\\[-Wdeprecated-openmp\\\]" }
 int data[] = {5};
 #pragma omp end declare target
 
index 2fe867e2c83f0aa11f8435c560c1df94506f982e..7b793123e8abeb86d717270cde2fa4fdb4caed67 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <omp.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -7,7 +8,7 @@ test (int ifval)
 {
   int a[8], b[8], i;
   omp_depend_t d1, d2;
-  #pragma omp depobj (d1) depend(inout: omp_all_memory) 
+  #pragma omp depobj (d1) depend(inout: omp_all_memory)
   #pragma omp depobj (d2) depend(out: omp_all_memory)
   for (i = 0; i < 8; i++)
     {
@@ -99,7 +100,7 @@ test (int ifval)
       b[0] = 6 * i + 57;
       for (i = 1; i < 8; ++i)
        {
-         if (b[i] != 4 * i - 7) 
+         if (b[i] != 4 * i - 7)
            abort ();
          b[i] = 6 * i + 57;
        }
index a07a0c889c113a74ebc2c58243ac46b89cbd03ec..744c7da57b29e488953a99a91a3ab959a7322003 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 #include <omp.h>
 
index e46b4dd04c176fa70917ac251b9632a117ac4884..35acbc2ca255b20adf3cd8cf2e3dcaabf7f4e6bd 100644 (file)
@@ -1,4 +1,4 @@
 /* { dg-additional-options "-std=gnu99" {target c } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define CONDNE
 #include "for-5.c"
index e28ba93f8fe6aba1f925020451067212d2f427e7..6d6f3c0f3b9d61700528c5ac76573af97eed2b60 100644 (file)
@@ -1,4 +1,4 @@
 /* { dg-additional-options "-std=gnu99" {target c } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define CONDNE
 #include "for-6.c"
index 5649ba9ee874758ee54d7a44eeb78a1d41271a0c..daa996eaf89a1e82f26d52f0ab70427ab2a47487 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern
 #ifdef __cplusplus
 "C"
index 285f8e9bd4de95153e4af9fcfa26957c1b7dbbe5..eb09039ec18e47b68ef1397ff9e1da7fd25d7103 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-additional-options "-std=gnu99" { target c } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern
 #ifdef __cplusplus
 "C"
index edfbe13ecdaf74c61ab562246e98d79daa72dd8f..79c9d399f62c86eac347aabdc8c460a8484f8203 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-additional-options "-std=gnu99" { target c } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern
 #ifdef __cplusplus
 "C"
index 64a754e51b888c24703bbda010749a7cda81db6b..4a40f018e7b313a5bcd9ffc669f8cd54a9f5ddd7 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-additional-options "-std=gnu99" { target c } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern
 #ifdef __cplusplus
 "C"
index dfd674fee56dca8e22c79f7a0c8380e5a21652e2..059a2778787dce4de3248ad5619cc2dc138f6ac9 100644 (file)
@@ -1,4 +1,4 @@
 /* { dg-additional-options "-std=gnu99" {target c } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define CONDNE
 #include "for-3.c"
index bc1ae68941a0394c4a60086fbd958545cb4af284..072b83d5061e4f00774682f51b4c9d2b3b450192 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do link } */
 /* { dg-excess-errors "unresolved symbol foo, lto1, mkoffload and lto-wrapper fatal errors" { target { offload_target_nvptx || offload_target_amdgcn } } } */
 /* { dg-additional-sources "function-not-offloaded-aux.c" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 int var;
 #pragma omp end declare target
index fbe4ac3a954e00eee98f9a0f566e3d1819da664c..e77fb0579ba05bd282662ae96d5be9efcc71c60c 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do run { target { ! offload_target_nvptx } } } */
 /* { dg-do compile { target offload_target_nvptx } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 100
 
 void
index 9b5e5cf5d9cbab0fbf84b5d90b76099c0cfcc92f..5714a0a3daf45a63f457caff5306da951805953c 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <math.h>
 
 #define N 100
index b6879c924408bd645574dcb8cc223e361d44508f..a91ec781485118b784b329b5176b43de0c6d8676 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 100
 
 int
index e869932de6dba997e680d8858929b463188c2b13..f5040eb78e54a9a9f5e67bffb9057d7072637c37 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 100
 
 #include <stdio.h>
index c3c0100f052d1039095427ab043edc1bb9dac9f2..0e5af829cc99352a4a12ebc1d3a1ff58fecd3925 100644 (file)
@@ -226,14 +226,14 @@ main ()
            n = 1;
            c++;
          }
-       #pragma omp ordered depend(source)
+       #pragma omp ordered depend(source) // { dg-warning "'source' modifier with 'depend' clause deprecated since OpenMP 5.2, use with 'doacross' \\\[-Wdeprecated-openmp\\\]" }
        if (MONOTONIC_UNDEF > 0)
          {
-           #pragma omp ordered depend(sink: i)
+           #pragma omp ordered depend(sink: i) // { dg-warning "'sink' modifier with 'depend' clause deprecated since OpenMP 5.2, use with 'doacross' \\\[-Wdeprecated-openmp\\\]" }
          }
        else
          {
-           #pragma omp ordered depend(sink: i - 1)
+           #pragma omp ordered depend(sink: i - 1) // { dg-warning "'sink' modifier with 'depend' clause deprecated since OpenMP 5.2, use with 'doacross' \\\[-Wdeprecated-openmp\\\]" }
          }
        l = i;
       }
index b886a24c99ade551d415708f04ebce4911375445..815bb892a6ddfd1b1c59136e3a663d7fd5f7629a 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+// { dg-additional-options "-Wno-deprecated-openmp" }
 
 #include <omp.h>
 #include <stdlib.h>
index af12295541a2671f8edc26c2d437abcd1954c155..60dad90decab654e98a66c949ad26af1b580d6aa 100644 (file)
@@ -1,5 +1,5 @@
 /* Based on sollve_vv's tests/5.0/declare_target/test_nested_declare_target.c.  */\r
-\r
+// { dg-additional-options "-Wno-deprecated-openmp" }\r
 #define N 1024\r
 int a[N], b[N], c[N];  \r
 int i = 0;\r
index 2fc9eec529a09753b6057048edd29513361bfa1f..2a21441f800cdef8afc686f2667f0ce920c95810 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
 #pragma omp end declare target
index d6d13676f5498459af70e96c2b4e3c51a4558b2a..28c6f8c4e4154518d21aaa5b54ae8483402f96f2 100644 (file)
@@ -1,7 +1,7 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
 /* { dg-options "-O2" { target c } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
 #pragma omp end declare target
index 7ade43c4c9f10e0582cfdfe21ed501d91f4ee2ee..16f41d0c0fcb721f706a9886ec974435abe6575d 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
 #pragma omp end declare target
index 86467d7c726acaa01d8c1d675b1766fbf148a0f4..5ecabb643ea4d77352f3793276ca9f67a7a54045 100644 (file)
@@ -1,7 +1,7 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
 /* { dg-options "-O2" { target c } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
 #pragma omp end declare target
index 752367e3ac5dbb9f83ac00186303a5dba7cc3e02..d4822a6edc64056d65ccfd65137754afba6b0c32 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
 #pragma omp end declare target
index 102af0691ec8f72df4ac310b4cbe7f812af35a36..79e766f5f77d6c60acccfd0b7cddc934653e99d2 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
 #pragma omp end declare target
index 554a4765b4e328ca551f8e6518778c6f43f6b50e..0dfc9eec7f48d0117a0b33f080fbb1d4b0c1442f 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
 #pragma omp end declare target
index 849dd97e231b1a8ab63d86ccbeef26e1254cfb42..05b712b87519990e46a62d7e0c0fe7a8d2c0672a 100644 (file)
@@ -8,7 +8,7 @@ struct S
 };
 typedef struct S S;
 
-#pragma omp declare target
+#pragma omp declare target // { dg-warning "use of 'omp declare target' as a synonym for 'omp begin declare target' has been deprecated since OpenMP 5.2 \\\[-Wdeprecated-openmp\\\]" }
 int *gp;
 #pragma omp end declare target
 
index 52d828caf1cf0f4c250586116c3bbf19f59b1869..986658fc068e1998129f3abd03362bcef44f7d33 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do run }  */
 /* { dg-additional-options "-foffload-options=nvptx-none=-misa=sm_35" { target { offload_target_nvptx } } } */
 /* { dg-additional-sources reverse-offload-1-aux.c } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* Check that reverse offload works in particular:
    - no code is generated on the device side (i.e. no
      implicit declare target of called functions and no
index c7abb008182ae99cff929741e77711721df3fc60..d558ddaadbf3fd207e0b8f7e685cf96059f1d904 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern
 #ifdef __cplusplus
 "C"
index bc66880b6afc36da460abf36bff5078039121ee7..4ad707c565815100f54837e2f46c127702ae7cd9 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #pragma omp declare target
 extern int v;
 #pragma omp end declare target
index 554860ab088c61b18f27041a79a726ac7cd7c2da..7fe189a4022f5a1de20b3dd8d2a0c08bf78e57ab 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O0" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern
 #ifdef __cplusplus
 "C"
index 9bf949a1f066da8e5399ef6545ddcad414999600..1e0f2a7de770c711edfd95692605244904afb103 100644 (file)
@@ -1,3 +1,3 @@
 /* { dg-additional-options -O0 } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include "target-abi-struct-1.c"
index d9268af55cfe58fe0d9e53b90d516a5936c21c64..475ce653023a2381495caf2585195f5da91d7f72 100644 (file)
@@ -1 +1,2 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include "../libgomp.oacc-c-c++-common/abi-struct-1.c"
index e6099cf23b8800763b35aa8656fd220bb5205817..2b2097607b781e18beeef0916bd2ca4f44d7ea8d 100644 (file)
@@ -1,5 +1,5 @@
 /* Offloaded 'constructor' and 'destructor' functions.  */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <omp.h>
 
 #pragma omp declare target
index b35d8c96ae265b542401a0cb5511d3be65f3adf7..2fbe41ac6e1a6a90cb9f677c9adfde1f349e897a 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* { dg-additional-sources "target-same-name-1-a.c target-same-name-1-b.c" } */
 /* PR middle-end/104285 */
 
index 37c00d4394aaa57690e17a64494f933bdad8a882..5f61b89f25ee5ca84ca994ef987ee58162aeed05 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern
 #ifdef __cplusplus
 "C"
index fe2a8b26242707d28bed8ec155397e9b928e7b6c..fdfa59cf9d848c4bd986e341e0c5a8ba2a4a8555 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do link } */
 /* { dg-excess-errors "lto1, mkoffload and lto-wrapper fatal errors" { target { offload_target_nvptx || offload_target_amdgcn } } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 int var; /* { dg-error "variable 'var' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code" "" { target { offload_target_nvptx || offload_target_amdgcn } } } */
 
 #pragma omp declare target
index 62c1fa766ba3e0fd25ec014e4bcc16d95c2f53de..8eb7b7b5765a175ee5591d354d21b1e583527338 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-additional-options -DOFFLOAD_DEVICE_NVPTX { target offload_device_nvptx } } */
 /* { dg-additional-options {-fdump-tree-optimized -foffload-options=-fdump-tree-optimized} } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include "declare-variant-3.h"
 
 /* { dg-final { scan-tree-dump "= f \\(\\);" "optimized" } }
index 3c8802a6081f29110f135841584ffd7f4fc3d46d..609328d3ee2052b3b0f0f844ff642f15285f7f95 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-additional-options -DOFFLOAD_DEVICE_GCN { target offload_device_gcn } } */
 /* { dg-additional-options {-fdump-tree-optimized -foffload-options=-fdump-tree-optimized} } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include "declare-variant-4.h"
 
 /* { dg-final { scan-tree-dump "= f \\(\\);" "optimized" } }
index 3d12f1cfc02b5990ab1d3caf71385c2a82802abd..b77ab24fc81bc74c5f7e07034ccf31df1cbd1bbd 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern void abort (void);
 
 #define N 256
index 0911dd207d9398e1e0a40a296d629a9a5e076593..8c8cddc62f0b00671d030454a3b9d6347778a00c 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern void abort (void);
 
 #define N 256
index 9a70b108772405d1361ecbd8ec0185b212eb280a..012853c748b1af228f3218cab12613471d53b95a 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern void abort (void);
 
 #define N 256
index b2e1f1feef81a298a343297f6ab86e057735f8fc..9c59b29726e8c8cabd37d813432b8228207ab4a4 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do run } */
 /* { dg-additional-options "-DCHUNKSZ=5000" { target { ! run_expensive_tests } } } */
 /* { dg-additional-options "-DCHUNKSZ=1000" { target run_expensive_tests } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 
 #define EPS 0.00001
index 6d4bc4fac12bf61f495a8555b14847cbd656ca4e..51deb4769988d88a88083982c99b78a22a5a856d 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+// { dg-additional-options "-Wno-deprecated-openmp" }
 
 #include <stdlib.h>
 
index 8025335722a22e7c78ad54b77c203661f3a8c8d9..e61eae43eb8dac68dc72febe763b59c68ebcc14d 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 
 #define EPS 0.000001
index f24143669517578d706602473c07e88753687ee9..57ce99d530e4330275b964575289ba64a16001c5 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-additional-options "-DTESTITERS=20" { target { ! run_expensive_tests } } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 
 #define EPS 0.00001
index 33d6137afd52bba39fc18b8073ea5570a16b8ac8..09c47bac95fc2ebd6d30b9126262960152cb5973 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do run { target vect_simd_clones } } */
 /* { dg-additional-options "-msse2" { target sse2_runtime } } */
 /* { dg-additional-options "-mavx" { target avx_runtime } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 
 #define EPS 0.00001
index 70f6b86c614c678e3fdb67add6ebcd3d617ab1f8..e18424dece0a724b43fcc57f136e91ed38de23ba 100644 (file)
@@ -8,7 +8,7 @@
 
 /* Fix a max_vf size so we can scan for it.
 { dg-additional-options "-msse2 -mno-avx" { target { x86_64-*-* i?86-*-* } } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define N 1024
 int a[N], b[N], c[N];
 
index 571668eb36a96ce8290a677f7d5ae8e4bb5a86db..101e7bf5bf601434523226e81fa2958b532fc671 100644 (file)
@@ -1,5 +1,5 @@
 /* Minimized from for-5.c.  */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdio.h>
 #include <stdlib.h>
 
index bea6b15270bde9ef4e068bbad4ca82cde932084c..274dee2b337f7ee307e60a1f7ad36c166771dbbd 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 /* PR middle-end/86660 */
 
 #pragma omp declare target
index 23e9d6d5bda819eb98887070257112fbf54116f7..e0d913504f4b58b2c4f7b431e0823f654fc97503 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <omp.h>
 #include <stdlib.h>
 
@@ -11,7 +12,7 @@ main (void)
     if (i != 0 || k != 0 || l != 0)
 #pragma omp atomic
       j |= 1;
-  
+
     if (omp_get_num_threads () != 4)
 #pragma omp atomic
       j |= 2;
index 835f54e17acb4befe8d0e37cc9235a5e7987b711..d307b4e7197b37f35f447968fa98848e5198ce4a 100644 (file)
@@ -1,6 +1,6 @@
 /* PR tree-optimization/85063 */
 /* { dg-additional-options "-ftree-switch-conversion" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 
 #pragma omp declare target
index fa6b52598da9b4ba07b5bc992c8c12dc7eed1933..bc338dff749ac30466495e7b89c3afe6f4a39af2 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern void abort (void);
 #pragma omp declare target
 int a[4] = { 2, 3, 4, 5 }, *b;
index 96e9e058a2141c2d5999d30771233e0240165c91..5a7991a8b7e052f76846a7cba70957db5f8c7c02 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern void abort (void);
 
 int g;
index a309f7d1a21ba827a5c458af7087963c277e132f..f1a94e001b0fb268ddb8391c0eb482630756b8e1 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern void abort (void);
 
 #pragma omp declare target
index 1444523615eaf127a913e5b8b5f628d2ce7f41f6..5cfd8320db8ce2e665ee483fb61889aacc458e71 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 #include <unistd.h>
 #include "usleep.h"
index 6da8b2b9a54646e2f637929c158f4bedbb27c65c..7cb0b7564c91390c4c8fec4e76a96aabe01c077f 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <omp.h>
 #include <stdlib.h>
 
index 816997205267dbdcca6f494f3374341787a76203..ea1ad74d4ee63ac45cebb3c21fdde39aae9f5e69 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #define A(n) n##0, n##1, n##2, n##3, n##4, n##5, n##6, n##7, n##8, n##9
 #define B(n) A(n##0), A(n##1), A(n##2), A(n##3), A(n##4), A(n##5), A(n##6), A(n##7), A(n##8), A(n##9)
 
index 4442f43c8efecd596f20b01550d424087e1b233a..8de98b682d8dd71d4e5fc98051d784a3ce998408 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O0" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 extern void abort (void);
 volatile int v;
 #pragma omp declare target to (v)
index 4f3c812afd0d785910e4a4cbf644ad3c1f3415ca..66ae8495552f2b66cb77a1abe8a0ecce061e27b7 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do run } */
 /* { dg-options "-O1 -ftree-parallelize-loops=0" } */
 /* { dg-additional-options "-flto" { target lto } } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 
 #define N 123456
index 681677cc2aa90e48ca30adace57333c144140862..96b5122e3f72ebd9a7dc15da04b12f77fad85374 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-additional-options "-Wno-deprecated-openmp" }
 struct S { int s, t; };
 
 int a = 1, b = 1;
index adbabef82b397705be429b8bb284d553c882cc94..86e428e7ad77e7104b1a81d0b402389ad1f76291 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <omp.h>
 #include <stdlib.h>
 
index 7997a70adc356ae0a50381ca92885f899f71147d..76450138598af0fe6645d3a10d08219cf328114a 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do run } */
 /* { dg-set-target-env-var OMP_THREAD_LIMIT "9" } */
 /* { dg-additional-options "-Wno-deprecated-declarations" } */
-
+// { dg-additional-options "-Wno-deprecated-openmp" }
 #include <stdlib.h>
 #include <unistd.h>
 #include <omp.h>
index 84e6d51670bb051011cf5c9a5f073e0d197ab7ad..b8e44a72d5b998b4bbadc5b071bf9438b083e90e 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-additional-options "-DEXPENSIVE" { target run_expensive_tests } } */
 
 /* { dg-additional-options -Wuninitialized } */
+// { dg-additional-options "-Wno-deprecated-openmp" }
 
 #include <assert.h>