From: supers1ngular Date: Thu, 11 Dec 2025 15:45:04 +0000 (-0800) Subject: openmp: Bump Version from 4.5 to 5.2 (2/4) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=382edf047effcd5b1ce66389742bd1b3e178ac95;p=thirdparty%2Fgcc.git openmp: Bump Version from 4.5 to 5.2 (2/4) 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. --- diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc index c81243d2ad2..f97b294f98e 100644 --- a/gcc/c/c-parser.cc +++ b/gcc/c/c-parser.cc @@ -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, + "% modifier with % clause deprecated since " + "OpenMP 5.2, use with %"); + dkind = OMP_CLAUSE_DOACROSS_SINK; + } else if (strcmp ("source", p) == 0) - dkind = OMP_CLAUSE_DOACROSS_SOURCE; + { + warning_at (clause_loc, OPT_Wdeprecated_openmp, + "% modifier with % clause deprecated since " + "OpenMP 5.2, use with %"); + 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, + "% 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 % as a synonym for % 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, "% clause with % " + "deprecated since OpenMP 5.2, use %"); 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, + "% clause on metadirectives deprecated since " + "OpenMP 5.2, use %"); c_parser_consume_token (parser); bool default_p = strcmp (p, "default") == 0 || strcmp (p, "otherwise") == 0; diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index 866708a7e46..5525213c034 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -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, + "% modifier with % clause deprecated since " + "OpenMP 5.2, use with %"); + dkind = OMP_CLAUSE_DOACROSS_SINK; + } else if (strcmp ("source", p) == 0) - dkind = OMP_CLAUSE_DOACROSS_SOURCE; + { + warning_at (loc, OPT_Wdeprecated_openmp, + "% modifier with % clause deprecated since " + "OpenMP 5.2, use with %"); + 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, + "% 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 % as a synonym for % 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, + "% clause with % deprecated since " + "OpenMP 5.2, use %"); 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, + "% clause on metadirectives deprecated since " + "OpenMP 5.2, use %"); 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 index 00000000000..35577fa53c2 --- /dev/null +++ b/gcc/testsuite/c-c++-common/gomp/52-deps.c @@ -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; +} diff --git a/gcc/testsuite/c-c++-common/gomp/Wparentheses-2.c b/gcc/testsuite/c-c++-common/gomp/Wparentheses-2.c index 4341b223236..c1003d2d991 100644 --- a/gcc/testsuite/c-c++-common/gomp/Wparentheses-2.c +++ b/gcc/testsuite/c-c++-common/gomp/Wparentheses-2.c @@ -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); diff --git a/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-1.c b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-1.c index 275eab165ad..032674e274d 100644 --- a/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-1.c +++ b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-1.c @@ -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))]] diff --git a/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-2.c b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-2.c index bdb41e1017b..36168c13ffa 100644 --- a/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-2.c +++ b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-2.c @@ -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 diff --git a/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-3.c b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-3.c index 803bf0ad1eb..eceec40a004 100644 --- a/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-3.c +++ b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-3.c @@ -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)))]] diff --git a/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-4.c b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-4.c index 5804eb5067a..76561a31470 100644 --- a/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-4.c +++ b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-4.c @@ -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 diff --git a/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-5.c b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-5.c index b24818a0fc7..daadf0fd9f2 100644 --- a/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-5.c +++ b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-5.c @@ -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 diff --git a/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-8.c b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-8.c index 43746b669ff..dc3b60f75b5 100644 --- a/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-8.c +++ b/gcc/testsuite/c-c++-common/gomp/attrs-metadirective-8.c @@ -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 diff --git a/gcc/testsuite/c-c++-common/gomp/begin-declare-target-1.c b/gcc/testsuite/c-c++-common/gomp/begin-declare-target-1.c index fd8cabaef0a..1f9286b1953 100644 --- a/gcc/testsuite/c-c++-common/gomp/begin-declare-target-1.c +++ b/gcc/testsuite/c-c++-common/gomp/begin-declare-target-1.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/begin-declare-target-2.c b/gcc/testsuite/c-c++-common/gomp/begin-declare-target-2.c index 2bc72cf4621..5f701f76ef4 100644 --- a/gcc/testsuite/c-c++-common/gomp/begin-declare-target-2.c +++ b/gcc/testsuite/c-c++-common/gomp/begin-declare-target-2.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/clauses-3.c b/gcc/testsuite/c-c++-common/gomp/clauses-3.c index a1f505a3a11..4ceae407ee3 100644 --- a/gcc/testsuite/c-c++-common/gomp/clauses-3.c +++ b/gcc/testsuite/c-c++-common/gomp/clauses-3.c @@ -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; }; diff --git a/gcc/testsuite/c-c++-common/gomp/declare-target-1.c b/gcc/testsuite/c-c++-common/gomp/declare-target-1.c index 79ad556a9c7..901f2d06634 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-target-1.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-target-1.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/declare-target-2.c b/gcc/testsuite/c-c++-common/gomp/declare-target-2.c index 7b47e2b4182..92cc33a787e 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-target-2.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-target-2.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/declare-target-3.c b/gcc/testsuite/c-c++-common/gomp/declare-target-3.c index e76e7a3c5c8..e08daf0a219 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-target-3.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-target-3.c @@ -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" } */ diff --git a/gcc/testsuite/c-c++-common/gomp/declare-target-4.c b/gcc/testsuite/c-c++-common/gomp/declare-target-4.c index a6bd1286ef1..4f45f32087a 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-target-4.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-target-4.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/declare-target-5.c b/gcc/testsuite/c-c++-common/gomp/declare-target-5.c index b52c9f207a2..6086891614e 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-target-5.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-target-5.c @@ -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'" } */ diff --git a/gcc/testsuite/c-c++-common/gomp/declare-target-7.c b/gcc/testsuite/c-c++-common/gomp/declare-target-7.c index e37b4652050..f918df4b9b0 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-target-7.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-target-7.c @@ -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) {} diff --git a/gcc/testsuite/c-c++-common/gomp/declare-target-indirect-1.c b/gcc/testsuite/c-c++-common/gomp/declare-target-indirect-1.c index 0fcbb2d04e4..4dac1fc0bfa 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-target-indirect-1.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-target-indirect-1.c @@ -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 diff --git a/gcc/testsuite/c-c++-common/gomp/declare-target-indirect-2.c b/gcc/testsuite/c-c++-common/gomp/declare-target-indirect-2.c index 75a205feb95..28def93bfce 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-target-indirect-2.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-target-indirect-2.c @@ -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 diff --git a/gcc/testsuite/c-c++-common/gomp/declare-variant-10.c b/gcc/testsuite/c-c++-common/gomp/declare-variant-10.c index e77693430d1..71543dbb5fa 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-variant-10.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-variant-10.c @@ -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)}) diff --git a/gcc/testsuite/c-c++-common/gomp/declare-variant-8.c b/gcc/testsuite/c-c++-common/gomp/declare-variant-8.c index 9cd706e896f..01d798a3531 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-variant-8.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-variant-8.c @@ -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); diff --git a/gcc/testsuite/c-c++-common/gomp/defaultmap-2.c b/gcc/testsuite/c-c++-common/gomp/defaultmap-2.c index 75dca230862..8cebdec27ab 100644 --- a/gcc/testsuite/c-c++-common/gomp/defaultmap-2.c +++ b/gcc/testsuite/c-c++-common/gomp/defaultmap-2.c @@ -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 *); diff --git a/gcc/testsuite/c-c++-common/gomp/defaultmap-3.c b/gcc/testsuite/c-c++-common/gomp/defaultmap-3.c index 8be23fd1473..3330ff4a21c 100644 --- a/gcc/testsuite/c-c++-common/gomp/defaultmap-3.c +++ b/gcc/testsuite/c-c++-common/gomp/defaultmap-3.c @@ -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 *); diff --git a/gcc/testsuite/c-c++-common/gomp/depend-iterator-2.c b/gcc/testsuite/c-c++-common/gomp/depend-iterator-2.c index fff32a4761f..df36425d74b 100644 --- a/gcc/testsuite/c-c++-common/gomp/depend-iterator-2.c +++ b/gcc/testsuite/c-c++-common/gomp/depend-iterator-2.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } int a, b[64]; struct S { int c; } *d, *e; struct T; diff --git a/gcc/testsuite/c-c++-common/gomp/depobj-1.c b/gcc/testsuite/c-c++-common/gomp/depobj-1.c index 77fd97159aa..9c47d5b4130 100644 --- a/gcc/testsuite/c-c++-common/gomp/depobj-1.c +++ b/gcc/testsuite/c-c++-common/gomp/depobj-1.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/directive-1.c b/gcc/testsuite/c-c++-common/gomp/directive-1.c index 21ca319b9f9..34194865d10 100644 --- a/gcc/testsuite/c-c++-common/gomp/directive-1.c +++ b/gcc/testsuite/c-c++-common/gomp/directive-1.c @@ -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 } */ diff --git a/gcc/testsuite/c-c++-common/gomp/distribute-1.c b/gcc/testsuite/c-c++-common/gomp/distribute-1.c index e5e4bc2669d..2cc4a7db056 100644 --- a/gcc/testsuite/c-c++-common/gomp/distribute-1.c +++ b/gcc/testsuite/c-c++-common/gomp/distribute-1.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/doacross-1.c b/gcc/testsuite/c-c++-common/gomp/doacross-1.c index eacaeaef80a..92de39e9cf8 100644 --- a/gcc/testsuite/c-c++-common/gomp/doacross-1.c +++ b/gcc/testsuite/c-c++-common/gomp/doacross-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fopenmp" } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (void) { diff --git a/gcc/testsuite/c-c++-common/gomp/doacross-2.c b/gcc/testsuite/c-c++-common/gomp/doacross-2.c index 44c5c212c89..760420a3d85 100644 --- a/gcc/testsuite/c-c++-common/gomp/doacross-2.c +++ b/gcc/testsuite/c-c++-common/gomp/doacross-2.c @@ -1,5 +1,5 @@ /* PR middle-end/87649 */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (void) { diff --git a/gcc/testsuite/c-c++-common/gomp/doacross-3.c b/gcc/testsuite/c-c++-common/gomp/doacross-3.c index 6d7517271f6..107278cae03 100644 --- a/gcc/testsuite/c-c++-common/gomp/doacross-3.c +++ b/gcc/testsuite/c-c++-common/gomp/doacross-3.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fopenmp" } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (void) { diff --git a/gcc/testsuite/c-c++-common/gomp/doacross-4.c b/gcc/testsuite/c-c++-common/gomp/doacross-4.c index a1182e3ce98..63b569f2a31 100644 --- a/gcc/testsuite/c-c++-common/gomp/doacross-4.c +++ b/gcc/testsuite/c-c++-common/gomp/doacross-4.c @@ -1,5 +1,5 @@ /* PR middle-end/98205 */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void baz (int) __attribute__((noreturn)); void diff --git a/gcc/testsuite/c-c++-common/gomp/doacross-8.c b/gcc/testsuite/c-c++-common/gomp/doacross-8.c index 6de06341af7..584b3a8183a 100644 --- a/gcc/testsuite/c-c++-common/gomp/doacross-8.c +++ b/gcc/testsuite/c-c++-common/gomp/doacross-8.c @@ -1,6 +1,6 @@ /* PR middle-end/108685 */ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (int a) { diff --git a/gcc/testsuite/c-c++-common/gomp/linear-1.c b/gcc/testsuite/c-c++-common/gomp/linear-1.c index 4557e22cb4f..891debf2e17 100644 --- a/gcc/testsuite/c-c++-common/gomp/linear-1.c +++ b/gcc/testsuite/c-c++-common/gomp/linear-1.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/linear-2.c b/gcc/testsuite/c-c++-common/gomp/linear-2.c index 545b7e5f01d..06daa531b5f 100644 --- a/gcc/testsuite/c-c++-common/gomp/linear-2.c +++ b/gcc/testsuite/c-c++-common/gomp/linear-2.c @@ -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)) diff --git a/gcc/testsuite/c-c++-common/gomp/linear-3.c b/gcc/testsuite/c-c++-common/gomp/linear-3.c index 32fa0bc7a92..6b35ba599b0 100644 --- a/gcc/testsuite/c-c++-common/gomp/linear-3.c +++ b/gcc/testsuite/c-c++-common/gomp/linear-3.c @@ -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" } */ diff --git a/gcc/testsuite/c-c++-common/gomp/loop-6.c b/gcc/testsuite/c-c++-common/gomp/loop-6.c index 24383ff04ea..cb5166fbb79 100644 --- a/gcc/testsuite/c-c++-common/gomp/loop-6.c +++ b/gcc/testsuite/c-c++-common/gomp/loop-6.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } int bar (int); int baz (int *); diff --git a/gcc/testsuite/c-c++-common/gomp/map-1.c b/gcc/testsuite/c-c++-common/gomp/map-1.c index f7003d3384b..1501bf94ec6 100644 --- a/gcc/testsuite/c-c++-common/gomp/map-1.c +++ b/gcc/testsuite/c-c++-common/gomp/map-1.c @@ -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]; diff --git a/gcc/testsuite/c-c++-common/gomp/map-3.c b/gcc/testsuite/c-c++-common/gomp/map-3.c index 8a14b9c888e..6d8f45e3d56 100644 --- a/gcc/testsuite/c-c++-common/gomp/map-3.c +++ b/gcc/testsuite/c-c++-common/gomp/map-3.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/map-6.c b/gcc/testsuite/c-c++-common/gomp/map-6.c index d76f9aef5aa..c1f3d1079b4 100644 --- a/gcc/testsuite/c-c++-common/gomp/map-6.c +++ b/gcc/testsuite/c-c++-common/gomp/map-6.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-1.c b/gcc/testsuite/c-c++-common/gomp/metadirective-1.c index b2bfe950818..0b0228dd6e2 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-1.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-1.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-2.c b/gcc/testsuite/c-c++-common/gomp/metadirective-2.c index 9f8169a8b02..2caabf08720 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-2.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #define N 100 int diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-3.c b/gcc/testsuite/c-c++-common/gomp/metadirective-3.c index b6c1601f7b1..d8a4d435e4c 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-3.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-3.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-4.c b/gcc/testsuite/c-c++-common/gomp/metadirective-4.c index 5cf3dbd63b7..5ee7d68fbcc 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-4.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-4.c @@ -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 diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-5.c b/gcc/testsuite/c-c++-common/gomp/metadirective-5.c index 63ce4498cd1..895b00563ff 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-5.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-5.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-additional-options "-fdump-tree-original" } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #define N 100 void diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-8.c b/gcc/testsuite/c-c++-common/gomp/metadirective-8.c index 0cab9620cd9..50daec62905 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-8.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-8.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #define N 256 void diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-construct.c b/gcc/testsuite/c-c++-common/gomp/metadirective-construct.c index 3103656d71f..31597041832 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-construct.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-construct.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-additional-options "-foffload=disable -fdump-tree-optimized" } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include 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) \ diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-device.c b/gcc/testsuite/c-c++-common/gomp/metadirective-device.c index d7f736d70b3..7b4083048fe 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-device.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-device.c @@ -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 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 diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c b/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c index 284f35f6d84..e7e2c82fcd4 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-1.c @@ -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 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 diff --git a/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-2.c b/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-2.c index 4de192177f8..41252979529 100644 --- a/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-2.c +++ b/gcc/testsuite/c-c++-common/gomp/metadirective-target-device-2.c @@ -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. */ diff --git a/gcc/testsuite/c-c++-common/gomp/order-2.c b/gcc/testsuite/c-c++-common/gomp/order-2.c index 5e044dc65c6..1b30d7ef9af 100644 --- a/gcc/testsuite/c-c++-common/gomp/order-2.c +++ b/gcc/testsuite/c-c++-common/gomp/order-2.c @@ -1,4 +1,5 @@ -void +// { dg-additional-options "-Wno-deprecated-openmp" } + void f1 (int *a) { int i; diff --git a/gcc/testsuite/c-c++-common/gomp/ordered-3.c b/gcc/testsuite/c-c++-common/gomp/ordered-3.c index b007ca7982a..9d004fe6e10 100644 --- a/gcc/testsuite/c-c++-common/gomp/ordered-3.c +++ b/gcc/testsuite/c-c++-common/gomp/ordered-3.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fopenmp" } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (void) { diff --git a/gcc/testsuite/c-c++-common/gomp/ordered-5.c b/gcc/testsuite/c-c++-common/gomp/ordered-5.c index ee798f4dd1b..9e7e5caf500 100644 --- a/gcc/testsuite/c-c++-common/gomp/ordered-5.c +++ b/gcc/testsuite/c-c++-common/gomp/ordered-5.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fopenmp" } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (void) { diff --git a/gcc/testsuite/c-c++-common/gomp/pr102640.c b/gcc/testsuite/c-c++-common/gomp/pr102640.c index 00ebab9c628..6327c40c8e8 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr102640.c +++ b/gcc/testsuite/c-c++-common/gomp/pr102640.c @@ -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) { diff --git a/gcc/testsuite/c-c++-common/gomp/pr106836.c b/gcc/testsuite/c-c++-common/gomp/pr106836.c index 6df8250f81c..4e11230684f 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr106836.c +++ b/gcc/testsuite/c-c++-common/gomp/pr106836.c @@ -1,5 +1,5 @@ /* PR c/106836 */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (void) { diff --git a/gcc/testsuite/c-c++-common/gomp/pr120180-1.c b/gcc/testsuite/c-c++-common/gomp/pr120180-1.c index b563d5f0ebf..9b16cc8cffb 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr120180-1.c +++ b/gcc/testsuite/c-c++-common/gomp/pr120180-1.c @@ -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'. */ diff --git a/gcc/testsuite/c-c++-common/gomp/pr88203-1.c b/gcc/testsuite/c-c++-common/gomp/pr88203-1.c index 54a686487c9..25220d3d5e1 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr88203-1.c +++ b/gcc/testsuite/c-c++-common/gomp/pr88203-1.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/pr88203-2.c b/gcc/testsuite/c-c++-common/gomp/pr88203-2.c index 90c4a720774..55758b1a074 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr88203-2.c +++ b/gcc/testsuite/c-c++-common/gomp/pr88203-2.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/pr88203-3.c b/gcc/testsuite/c-c++-common/gomp/pr88203-3.c index 6a9585d3281..d5e248b4f43 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr88203-3.c +++ b/gcc/testsuite/c-c++-common/gomp/pr88203-3.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/pr91401-2.c b/gcc/testsuite/c-c++-common/gomp/pr91401-2.c index f537e66e27c..061882ec9a1 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr91401-2.c +++ b/gcc/testsuite/c-c++-common/gomp/pr91401-2.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #pragma omp declare target void f0 (void); diff --git a/gcc/testsuite/c-c++-common/gomp/pr91987.c b/gcc/testsuite/c-c++-common/gomp/pr91987.c index 516bb8091fd..46f41f836a0 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr91987.c +++ b/gcc/testsuite/c-c++-common/gomp/pr91987.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/reverse-offload-1.c b/gcc/testsuite/c-c++-common/gomp/reverse-offload-1.c index 8d319058ce1..134b85861c3 100644 --- a/gcc/testsuite/c-c++-common/gomp/reverse-offload-1.c +++ b/gcc/testsuite/c-c++-common/gomp/reverse-offload-1.c @@ -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); diff --git a/gcc/testsuite/c-c++-common/gomp/schedule-modifiers-1.c b/gcc/testsuite/c-c++-common/gomp/schedule-modifiers-1.c index 82ab25722e7..119980e33c7 100644 --- a/gcc/testsuite/c-c++-common/gomp/schedule-modifiers-1.c +++ b/gcc/testsuite/c-c++-common/gomp/schedule-modifiers-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fopenmp" } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (void) { diff --git a/gcc/testsuite/c-c++-common/gomp/sink-1.c b/gcc/testsuite/c-c++-common/gomp/sink-1.c index 5ee562bfbf7..8fbe50d4b77 100644 --- a/gcc/testsuite/c-c++-common/gomp/sink-1.c +++ b/gcc/testsuite/c-c++-common/gomp/sink-1.c @@ -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]; diff --git a/gcc/testsuite/c-c++-common/gomp/sink-2.c b/gcc/testsuite/c-c++-common/gomp/sink-2.c index e781a6fd945..5acd2fd2fe4 100644 --- a/gcc/testsuite/c-c++-common/gomp/sink-2.c +++ b/gcc/testsuite/c-c++-common/gomp/sink-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void bar (int *); void diff --git a/gcc/testsuite/c-c++-common/gomp/sink-3.c b/gcc/testsuite/c-c++-common/gomp/sink-3.c index 7cb16ed0f76..d5a05595624 100644 --- a/gcc/testsuite/c-c++-common/gomp/sink-3.c +++ b/gcc/testsuite/c-c++-common/gomp/sink-3.c @@ -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. */ diff --git a/gcc/testsuite/c-c++-common/gomp/sink-4.c b/gcc/testsuite/c-c++-common/gomp/sink-4.c index 11b6d9973c9..60f4cd57377 100644 --- a/gcc/testsuite/c-c++-common/gomp/sink-4.c +++ b/gcc/testsuite/c-c++-common/gomp/sink-4.c @@ -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. */ diff --git a/gcc/testsuite/c-c++-common/gomp/sink-5.c b/gcc/testsuite/c-c++-common/gomp/sink-5.c index 4fbaa8a03cb..fad40c88630 100644 --- a/gcc/testsuite/c-c++-common/gomp/sink-5.c +++ b/gcc/testsuite/c-c++-common/gomp/sink-5.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void bar (int); void diff --git a/gcc/testsuite/c-c++-common/gomp/target-teams-1.c b/gcc/testsuite/c-c++-common/gomp/target-teams-1.c index 74d60e1066e..ea398587927 100644 --- a/gcc/testsuite/c-c++-common/gomp/target-teams-1.c +++ b/gcc/testsuite/c-c++-common/gomp/target-teams-1.c @@ -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 *); diff --git a/gcc/testsuite/g++.dg/gomp/attrs-12.C b/gcc/testsuite/g++.dg/gomp/attrs-12.C index b613872952e..a5fdc3e7f3c 100644 --- a/gcc/testsuite/g++.dg/gomp/attrs-12.C +++ b/gcc/testsuite/g++.dg/gomp/attrs-12.C @@ -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)]]; diff --git a/gcc/testsuite/g++.dg/gomp/attrs-5.C b/gcc/testsuite/g++.dg/gomp/attrs-5.C index f6d24b9540c..f0d2db6b61d 100644 --- a/gcc/testsuite/g++.dg/gomp/attrs-5.C +++ b/gcc/testsuite/g++.dg/gomp/attrs-5.C @@ -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; diff --git a/gcc/testsuite/g++.dg/gomp/attrs-9.C b/gcc/testsuite/g++.dg/gomp/attrs-9.C index cf7cef46b70..1ed1abf0f92 100644 --- a/gcc/testsuite/g++.dg/gomp/attrs-9.C +++ b/gcc/testsuite/g++.dg/gomp/attrs-9.C @@ -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))]]; diff --git a/gcc/testsuite/g++.dg/gomp/clause-3.C b/gcc/testsuite/g++.dg/gomp/clause-3.C index aad97d6ad62..74a60f9d9b9 100644 --- a/gcc/testsuite/g++.dg/gomp/clause-3.C +++ b/gcc/testsuite/g++.dg/gomp/clause-3.C @@ -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); diff --git a/gcc/testsuite/g++.dg/gomp/declare-simd-3.C b/gcc/testsuite/g++.dg/gomp/declare-simd-3.C index d89d9a7cf6b..9bda32d5ad3 100644 --- a/gcc/testsuite/g++.dg/gomp/declare-simd-3.C +++ b/gcc/testsuite/g++.dg/gomp/declare-simd-3.C @@ -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) { diff --git a/gcc/testsuite/g++.dg/gomp/declare-simd-4.C b/gcc/testsuite/g++.dg/gomp/declare-simd-4.C index 0b76d922f3e..a61119eaf87 100644 --- a/gcc/testsuite/g++.dg/gomp/declare-simd-4.C +++ b/gcc/testsuite/g++.dg/gomp/declare-simd-4.C @@ -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) diff --git a/gcc/testsuite/g++.dg/gomp/declare-simd-6.C b/gcc/testsuite/g++.dg/gomp/declare-simd-6.C index 09137ee5b98..6a5b272d984 100644 --- a/gcc/testsuite/g++.dg/gomp/declare-simd-6.C +++ b/gcc/testsuite/g++.dg/gomp/declare-simd-6.C @@ -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); diff --git a/gcc/testsuite/g++.dg/gomp/declare-simd-7.C b/gcc/testsuite/g++.dg/gomp/declare-simd-7.C index 52e9f182da3..625333c8dc4 100644 --- a/gcc/testsuite/g++.dg/gomp/declare-simd-7.C +++ b/gcc/testsuite/g++.dg/gomp/declare-simd-7.C @@ -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 &); diff --git a/gcc/testsuite/g++.dg/gomp/declare-simd-8.C b/gcc/testsuite/g++.dg/gomp/declare-simd-8.C index 01c91e89091..5e23f9fafe1 100644 --- a/gcc/testsuite/g++.dg/gomp/declare-simd-8.C +++ b/gcc/testsuite/g++.dg/gomp/declare-simd-8.C @@ -1,5 +1,5 @@ // PR c++/100872 - +// { dg-additional-options "-Wno-deprecated-openmp" } template struct S { #pragma omp declare simd aligned(a : N * 2) aligned(b) linear(ref(b): N) diff --git a/gcc/testsuite/g++.dg/gomp/declare-target-1.C b/gcc/testsuite/g++.dg/gomp/declare-target-1.C index 7b270cdddb7..e1f642b88a6 100644 --- a/gcc/testsuite/g++.dg/gomp/declare-target-1.C +++ b/gcc/testsuite/g++.dg/gomp/declare-target-1.C @@ -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); diff --git a/gcc/testsuite/g++.dg/gomp/declare-target-2.C b/gcc/testsuite/g++.dg/gomp/declare-target-2.C index e080ca6bfb5..d607f8c3697 100644 --- a/gcc/testsuite/g++.dg/gomp/declare-target-2.C +++ b/gcc/testsuite/g++.dg/gomp/declare-target-2.C @@ -1,6 +1,6 @@ // { dg-do compile } // { dg-options "-fopenmp" } - +// { dg-additional-options "-Wno-deprecated-openmp" } #pragma omp declare target template struct S { T a; }; diff --git a/gcc/testsuite/g++.dg/gomp/declare-target-3.C b/gcc/testsuite/g++.dg/gomp/declare-target-3.C index b0a90d8d31f..54d60bedb03 100644 --- a/gcc/testsuite/g++.dg/gomp/declare-target-3.C +++ b/gcc/testsuite/g++.dg/gomp/declare-target-3.C @@ -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; } diff --git a/gcc/testsuite/g++.dg/gomp/declare-target-indirect-1.C b/gcc/testsuite/g++.dg/gomp/declare-target-indirect-1.C index 1d66ec9f741..48b7457b775 100644 --- a/gcc/testsuite/g++.dg/gomp/declare-target-indirect-1.C +++ b/gcc/testsuite/g++.dg/gomp/declare-target-indirect-1.C @@ -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; } diff --git a/gcc/testsuite/g++.dg/gomp/depend-iterator-2.C b/gcc/testsuite/g++.dg/gomp/depend-iterator-2.C index a0119ebc694..bd1470ff1e7 100644 --- a/gcc/testsuite/g++.dg/gomp/depend-iterator-2.C +++ b/gcc/testsuite/g++.dg/gomp/depend-iterator-2.C @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } int a, b[64]; struct S { int c; } *d, *e; struct T; diff --git a/gcc/testsuite/g++.dg/gomp/depobj-1.C b/gcc/testsuite/g++.dg/gomp/depobj-1.C index cb091a1da2c..7bd6f98b2ea 100644 --- a/gcc/testsuite/g++.dg/gomp/depobj-1.C +++ b/gcc/testsuite/g++.dg/gomp/depobj-1.C @@ -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; diff --git a/gcc/testsuite/g++.dg/gomp/doacross-2.C b/gcc/testsuite/g++.dg/gomp/doacross-2.C index 1fd63570f4a..56daccc960b 100644 --- a/gcc/testsuite/g++.dg/gomp/doacross-2.C +++ b/gcc/testsuite/g++.dg/gomp/doacross-2.C @@ -1,6 +1,6 @@ // PR c++/100957 // { dg-do compile } - +// { dg-additional-options "-Wno-deprecated-openmp" } struct S { S () { diff --git a/gcc/testsuite/g++.dg/gomp/linear-1.C b/gcc/testsuite/g++.dg/gomp/linear-1.C index 68d58fee59f..9a8f71f5d75 100644 --- a/gcc/testsuite/g++.dg/gomp/linear-1.C +++ b/gcc/testsuite/g++.dg/gomp/linear-1.C @@ -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) diff --git a/gcc/testsuite/g++.dg/gomp/linear-2.C b/gcc/testsuite/g++.dg/gomp/linear-2.C index eed982276e7..4cb5a2e7c9b 100644 --- a/gcc/testsuite/g++.dg/gomp/linear-2.C +++ b/gcc/testsuite/g++.dg/gomp/linear-2.C @@ -1,6 +1,6 @@ // { dg-do compile } // { dg-options "-fopenmp" } - +// { dg-additional-options "-Wno-deprecated-openmp" } #pragma omp declare target int i, j; diff --git a/gcc/testsuite/g++.dg/gomp/linear-3.C b/gcc/testsuite/g++.dg/gomp/linear-3.C index 0936cf89155..8184633e529 100644 --- a/gcc/testsuite/g++.dg/gomp/linear-3.C +++ b/gcc/testsuite/g++.dg/gomp/linear-3.C @@ -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) diff --git a/gcc/testsuite/g++.dg/gomp/linear-5.C b/gcc/testsuite/g++.dg/gomp/linear-5.C index fbc193edeb6..141451d26be 100644 --- a/gcc/testsuite/g++.dg/gomp/linear-5.C +++ b/gcc/testsuite/g++.dg/gomp/linear-5.C @@ -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; diff --git a/gcc/testsuite/g++.dg/gomp/map-1.C b/gcc/testsuite/g++.dg/gomp/map-1.C index 4416ce99cdc..a2ec9fb849c 100644 --- a/gcc/testsuite/g++.dg/gomp/map-1.C +++ b/gcc/testsuite/g++.dg/gomp/map-1.C @@ -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 index 00000000000..d40ea8c5387 --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/map-csm-dep.C @@ -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; + } diff --git a/gcc/testsuite/g++.dg/gomp/pr118876.C b/gcc/testsuite/g++.dg/gomp/pr118876.C index 242a396bbb6..406fd40c778 100644 --- a/gcc/testsuite/g++.dg/gomp/pr118876.C +++ b/gcc/testsuite/g++.dg/gomp/pr118876.C @@ -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 diff --git a/gcc/testsuite/g++.dg/gomp/pr119370.C b/gcc/testsuite/g++.dg/gomp/pr119370.C index 9ecc9b73db8..3ec42bf6731 100644 --- a/gcc/testsuite/g++.dg/gomp/pr119370.C +++ b/gcc/testsuite/g++.dg/gomp/pr119370.C @@ -1,6 +1,6 @@ // PR c++/119370 // { dg-do compile } - +// { dg-additional-options "-Wno-deprecated-openmp" } #pragma omp declare target struct S { int s; diff --git a/gcc/testsuite/g++.dg/gomp/sink-1.C b/gcc/testsuite/g++.dg/gomp/sink-1.C index 982d36c7aa0..6533735545e 100644 --- a/gcc/testsuite/g++.dg/gomp/sink-1.C +++ b/gcc/testsuite/g++.dg/gomp/sink-1.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void bar (int, int, int); template diff --git a/gcc/testsuite/g++.dg/gomp/sink-2.C b/gcc/testsuite/g++.dg/gomp/sink-2.C index 26669ef588e..489ac07dc1b 100644 --- a/gcc/testsuite/g++.dg/gomp/sink-2.C +++ b/gcc/testsuite/g++.dg/gomp/sink-2.C @@ -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. */ diff --git a/gcc/testsuite/g++.dg/gomp/sink-3.C b/gcc/testsuite/g++.dg/gomp/sink-3.C index 4271d66faef..48755c7887c 100644 --- a/gcc/testsuite/g++.dg/gomp/sink-3.C +++ b/gcc/testsuite/g++.dg/gomp/sink-3.C @@ -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. */ diff --git a/gcc/testsuite/g++.dg/gomp/target-simd-clone-1.C b/gcc/testsuite/g++.dg/gomp/target-simd-clone-1.C index b96473642bb..3c09e809a4b 100644 --- a/gcc/testsuite/g++.dg/gomp/target-simd-clone-1.C +++ b/gcc/testsuite/g++.dg/gomp/target-simd-clone-1.C @@ -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 diff --git a/gcc/testsuite/g++.dg/gomp/target-simd-clone-2.C b/gcc/testsuite/g++.dg/gomp/target-simd-clone-2.C index 08c0539dc63..85d72ddd1b7 100644 --- a/gcc/testsuite/g++.dg/gomp/target-simd-clone-2.C +++ b/gcc/testsuite/g++.dg/gomp/target-simd-clone-2.C @@ -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. */ diff --git a/gcc/testsuite/g++.dg/gomp/target-teams-1.C b/gcc/testsuite/g++.dg/gomp/target-teams-1.C index 29e55970e45..db22e04e1c6 100644 --- a/gcc/testsuite/g++.dg/gomp/target-teams-1.C +++ b/gcc/testsuite/g++.dg/gomp/target-teams-1.C @@ -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 *); diff --git a/gcc/testsuite/g++.dg/gomp/udr-5.C b/gcc/testsuite/g++.dg/gomp/udr-5.C index e20afd6f810..096219323a8 100644 --- a/gcc/testsuite/g++.dg/gomp/udr-5.C +++ b/gcc/testsuite/g++.dg/gomp/udr-5.C @@ -1,5 +1,5 @@ // { dg-do compile } - +// { dg-additional-options "-Wno-deprecated-openmp" } struct S { int s; diff --git a/gcc/testsuite/gcc.dg/gomp/attrs-12.c b/gcc/testsuite/gcc.dg/gomp/attrs-12.c index ed4c0416d9b..1a593f9678a 100644 --- a/gcc/testsuite/gcc.dg/gomp/attrs-12.c +++ b/gcc/testsuite/gcc.dg/gomp/attrs-12.c @@ -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)]]; diff --git a/gcc/testsuite/gcc.dg/gomp/attrs-5.c b/gcc/testsuite/gcc.dg/gomp/attrs-5.c index bbf91f6d171..4e67783562e 100644 --- a/gcc/testsuite/gcc.dg/gomp/attrs-5.c +++ b/gcc/testsuite/gcc.dg/gomp/attrs-5.c @@ -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" diff --git a/gcc/testsuite/gcc.dg/gomp/attrs-9.c b/gcc/testsuite/gcc.dg/gomp/attrs-9.c index 1d2207e6a76..2e0f6f59a64 100644 --- a/gcc/testsuite/gcc.dg/gomp/attrs-9.c +++ b/gcc/testsuite/gcc.dg/gomp/attrs-9.c @@ -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" diff --git a/gcc/testsuite/gcc.dg/gomp/clause-1.c b/gcc/testsuite/gcc.dg/gomp/clause-1.c index 8e7cc950d22..3770fbf6a87 100644 --- a/gcc/testsuite/gcc.dg/gomp/clause-1.c +++ b/gcc/testsuite/gcc.dg/gomp/clause-1.c @@ -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); diff --git a/gcc/testsuite/gcc.dg/gomp/declare-simd-3.c b/gcc/testsuite/gcc.dg/gomp/declare-simd-3.c index ba8e71008b5..09e5e8d03f9 100644 --- a/gcc/testsuite/gcc.dg/gomp/declare-simd-3.c +++ b/gcc/testsuite/gcc.dg/gomp/declare-simd-3.c @@ -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) diff --git a/gcc/testsuite/gcc.dg/gomp/linear-1.c b/gcc/testsuite/gcc.dg/gomp/linear-1.c index f906e3991bb..8b0a4f3385f 100644 --- a/gcc/testsuite/gcc.dg/gomp/linear-1.c +++ b/gcc/testsuite/gcc.dg/gomp/linear-1.c @@ -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 index 00000000000..16f36529aff --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/map-csm-dep.c @@ -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; + } diff --git a/gcc/testsuite/gcc.dg/gomp/metadirective-1.c b/gcc/testsuite/gcc.dg/gomp/metadirective-1.c index 2ac81bfde75..8d354e4037d 100644 --- a/gcc/testsuite/gcc.dg/gomp/metadirective-1.c +++ b/gcc/testsuite/gcc.dg/gomp/metadirective-1.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } int main (void) { int x, y; diff --git a/gcc/testsuite/gcc.dg/gomp/pr104757.c b/gcc/testsuite/gcc.dg/gomp/pr104757.c index 738396523af..f8672cad28c 100644 --- a/gcc/testsuite/gcc.dg/gomp/pr104757.c +++ b/gcc/testsuite/gcc.dg/gomp/pr104757.c @@ -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) diff --git a/gcc/testsuite/gcc.dg/gomp/sink-fold-1.c b/gcc/testsuite/gcc.dg/gomp/sink-fold-1.c index d166dac950b..56498066679 100644 --- a/gcc/testsuite/gcc.dg/gomp/sink-fold-1.c +++ b/gcc/testsuite/gcc.dg/gomp/sink-fold-1.c @@ -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; diff --git a/gcc/testsuite/gcc.dg/gomp/sink-fold-2.c b/gcc/testsuite/gcc.dg/gomp/sink-fold-2.c index f3cdaee1900..d2b15f3f2e2 100644 --- a/gcc/testsuite/gcc.dg/gomp/sink-fold-2.c +++ b/gcc/testsuite/gcc.dg/gomp/sink-fold-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } int i,j, N; extern void bar(); diff --git a/gcc/testsuite/gcc.dg/gomp/sink-fold-3.c b/gcc/testsuite/gcc.dg/gomp/sink-fold-3.c index d3af18e17e7..2b93c77ce91 100644 --- a/gcc/testsuite/gcc.dg/gomp/sink-fold-3.c +++ b/gcc/testsuite/gcc.dg/gomp/sink-fold-3.c @@ -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. */ diff --git a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-1.c b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-1.c index 0d74aa971f9..48acde09b2f 100644 --- a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-1.c +++ b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-1.c @@ -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 diff --git a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-2.c b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-2.c index acdc241db46..16928afc945 100644 --- a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-2.c +++ b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-2.c @@ -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 diff --git a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-3.c b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-3.c index e90d49ce7f2..e5db3b4c381 100644 --- a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-3.c +++ b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-3.c @@ -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. */ diff --git a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-4.c b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-4.c index 141097bdce8..f115c97765e 100644 --- a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-4.c +++ b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-4.c @@ -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; diff --git a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-5.c b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-5.c index 93f9774f831..5355cc99c1d 100644 --- a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-5.c +++ b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-5.c @@ -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) { diff --git a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-6.c b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-6.c index 4c34967af95..f2cf513492d 100644 --- a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-6.c +++ b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-6.c @@ -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); diff --git a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-7.c b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-7.c index 78c60f9f6bc..3631145904f 100644 --- a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-7.c +++ b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-7.c @@ -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 diff --git a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-8.c b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-8.c index 561766cb128..d06b640ae5f 100644 --- a/gcc/testsuite/gcc.dg/gomp/target-simd-clone-8.c +++ b/gcc/testsuite/gcc.dg/gomp/target-simd-clone-8.c @@ -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; diff --git a/gcc/testsuite/gcc.dg/gomp/workshare-reduction-55.c b/gcc/testsuite/gcc.dg/gomp/workshare-reduction-55.c index 6b9a7ecd5a1..ca865d07f81 100644 --- a/gcc/testsuite/gcc.dg/gomp/workshare-reduction-55.c +++ b/gcc/testsuite/gcc.dg/gomp/workshare-reduction-55.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/gomp/workshare-reduction-56.c b/gcc/testsuite/gcc.dg/gomp/workshare-reduction-56.c index 955c6d4eef8..c894edabf87 100644 --- a/gcc/testsuite/gcc.dg/gomp/workshare-reduction-56.c +++ b/gcc/testsuite/gcc.dg/gomp/workshare-reduction-56.c @@ -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 *); diff --git a/gcc/testsuite/gcc.dg/gomp/workshare-reduction-57.c b/gcc/testsuite/gcc.dg/gomp/workshare-reduction-57.c index 9019886665a..274ed370155 100644 --- a/gcc/testsuite/gcc.dg/gomp/workshare-reduction-57.c +++ b/gcc/testsuite/gcc.dg/gomp/workshare-reduction-57.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/gomp/workshare-reduction-58.c b/gcc/testsuite/gcc.dg/gomp/workshare-reduction-58.c index 7907aba5ee0..d0bbd5930f5 100644 --- a/gcc/testsuite/gcc.dg/gomp/workshare-reduction-58.c +++ b/gcc/testsuite/gcc.dg/gomp/workshare-reduction-58.c @@ -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" } } */ diff --git a/libgomp/testsuite/libgomp.c++/declare_target-1.C b/libgomp/testsuite/libgomp.c++/declare_target-1.C index 4394bb1405d..2c6a2de49f3 100644 --- a/libgomp/testsuite/libgomp.c++/declare_target-1.C +++ b/libgomp/testsuite/libgomp.c++/declare_target-1.C @@ -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 struct typeX diff --git a/libgomp/testsuite/libgomp.c++/depobj-1.C b/libgomp/testsuite/libgomp.c++/depobj-1.C index 91edf8cc34b..6fd00df272e 100644 --- a/libgomp/testsuite/libgomp.c++/depobj-1.C +++ b/libgomp/testsuite/libgomp.c++/depobj-1.C @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c++/doacross-1.C b/libgomp/testsuite/libgomp.c++/doacross-1.C index bc53ee6e8a2..dbed1045915 100644 --- a/libgomp/testsuite/libgomp.c++/doacross-1.C +++ b/libgomp/testsuite/libgomp.c++/doacross-1.C @@ -1,5 +1,5 @@ // { dg-do run } - +// { dg-additional-options "-Wno-deprecated-openmp" } typedef __PTRDIFF_TYPE__ ptrdiff_t; extern "C" void abort (); diff --git a/libgomp/testsuite/libgomp.c++/for-15.C b/libgomp/testsuite/libgomp.c++/for-15.C index ddb9ce629dd..9aaf6c29fb4 100644 --- a/libgomp/testsuite/libgomp.c++/for-15.C +++ b/libgomp/testsuite/libgomp.c++/for-15.C @@ -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 (); diff --git a/libgomp/testsuite/libgomp.c++/for-24.C b/libgomp/testsuite/libgomp.c++/for-24.C index 99f74e46911..0a5d8baa254 100644 --- a/libgomp/testsuite/libgomp.c++/for-24.C +++ b/libgomp/testsuite/libgomp.c++/for-24.C @@ -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 (); diff --git a/libgomp/testsuite/libgomp.c++/pr101544-1-O0.C b/libgomp/testsuite/libgomp.c++/pr101544-1-O0.C index c8a73dcfa19..314f4a6a0f5 100644 --- a/libgomp/testsuite/libgomp.c++/pr101544-1-O0.C +++ b/libgomp/testsuite/libgomp.c++/pr101544-1-O0.C @@ -1,3 +1,3 @@ // { dg-additional-options -O0 } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include "pr101544-1.C" diff --git a/libgomp/testsuite/libgomp.c++/pr101544-1.C b/libgomp/testsuite/libgomp.c++/pr101544-1.C index 22c81aa5f86..ae25ca39a6c 100644 --- a/libgomp/testsuite/libgomp.c++/pr101544-1.C +++ b/libgomp/testsuite/libgomp.c++/pr101544-1.C @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } // See also '../libgomp.oacc-c++/pr101544-1.C'. #ifndef ALWAYS_INLINE # define ALWAYS_INLINE diff --git a/libgomp/testsuite/libgomp.c++/pr96835-1-O0.C b/libgomp/testsuite/libgomp.c++/pr96835-1-O0.C index 85e42909e29..3a8dd39d10e 100644 --- a/libgomp/testsuite/libgomp.c++/pr96835-1-O0.C +++ b/libgomp/testsuite/libgomp.c++/pr96835-1-O0.C @@ -1,3 +1,3 @@ // { dg-additional-options -O0 } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include "pr96835-1.C" diff --git a/libgomp/testsuite/libgomp.c++/pr96835-1.C b/libgomp/testsuite/libgomp.c++/pr96835-1.C index c9f6475eeb9..863ff7b8b0b 100644 --- a/libgomp/testsuite/libgomp.c++/pr96835-1.C +++ b/libgomp/testsuite/libgomp.c++/pr96835-1.C @@ -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 diff --git a/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C b/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C index a704e39411d..2da754879f0 100644 --- a/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C +++ b/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-1.C @@ -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 #include diff --git a/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C b/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C index de481aadd34..1aab931920f 100644 --- a/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C +++ b/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-2.C @@ -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 diff --git a/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-3.C b/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-3.C index 8d4aff21cd7..51e14211392 100644 --- a/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-3.C +++ b/libgomp/testsuite/libgomp.c++/static-aggr-constructor-destructor-3.C @@ -1,5 +1,5 @@ // { dg-do run } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #pragma omp declare target diff --git a/libgomp/testsuite/libgomp.c++/target-13.C b/libgomp/testsuite/libgomp.c++/target-13.C index 5279ac02684..536fe4d0dde 100644 --- a/libgomp/testsuite/libgomp.c++/target-13.C +++ b/libgomp/testsuite/libgomp.c++/target-13.C @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } extern "C" void abort (void); int g; diff --git a/libgomp/testsuite/libgomp.c++/target-cdtor-1.C b/libgomp/testsuite/libgomp.c++/target-cdtor-1.C index 7e8cc582e94..a6be4a04601 100644 --- a/libgomp/testsuite/libgomp.c++/target-cdtor-1.C +++ b/libgomp/testsuite/libgomp.c++/target-cdtor-1.C @@ -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 #include diff --git a/libgomp/testsuite/libgomp.c++/target-cdtor-2.C b/libgomp/testsuite/libgomp.c++/target-cdtor-2.C index 9c8512245b1..a673ddb6898 100644 --- a/libgomp/testsuite/libgomp.c++/target-cdtor-2.C +++ b/libgomp/testsuite/libgomp.c++/target-cdtor-2.C @@ -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 #include diff --git a/libgomp/testsuite/libgomp.c++/target-std__array-concurrent-usm.C b/libgomp/testsuite/libgomp.c++/target-std__array-concurrent-usm.C index aa36f7109e9..c98d8559b97 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__array-concurrent-usm.C +++ b/libgomp/testsuite/libgomp.c++/target-std__array-concurrent-usm.C @@ -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 diff --git a/libgomp/testsuite/libgomp.c++/target-std__array-concurrent.C b/libgomp/testsuite/libgomp.c++/target-std__array-concurrent.C index ee5e094c694..d40fe1044ff 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__array-concurrent.C +++ b/libgomp/testsuite/libgomp.c++/target-std__array-concurrent.C @@ -1,5 +1,6 @@ // { dg-do run } // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } } +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c++/target-std__cmath.C b/libgomp/testsuite/libgomp.c++/target-std__cmath.C index aaf715237a4..73f50bbcf2e 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__cmath.C +++ b/libgomp/testsuite/libgomp.c++/target-std__cmath.C @@ -1,6 +1,6 @@ // { dg-do run } // { dg-additional-options "-std=c++20" } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c++/target-std__complex.C b/libgomp/testsuite/libgomp.c++/target-std__complex.C index e392d17a303..db6c66b70e2 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__complex.C +++ b/libgomp/testsuite/libgomp.c++/target-std__complex.C @@ -1,6 +1,6 @@ // { dg-do run } // { dg-additional-options "-std=c++20" } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include #include diff --git a/libgomp/testsuite/libgomp.c++/target-std__deque-concurrent-usm.C b/libgomp/testsuite/libgomp.c++/target-std__deque-concurrent-usm.C index b30ade4f086..aaa6acc6312 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__deque-concurrent-usm.C +++ b/libgomp/testsuite/libgomp.c++/target-std__deque-concurrent-usm.C @@ -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 diff --git a/libgomp/testsuite/libgomp.c++/target-std__deque-concurrent.C b/libgomp/testsuite/libgomp.c++/target-std__deque-concurrent.C index d8c929997a5..e89c2557c91 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__deque-concurrent.C +++ b/libgomp/testsuite/libgomp.c++/target-std__deque-concurrent.C @@ -1,6 +1,6 @@ // { dg-do run } // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include #include diff --git a/libgomp/testsuite/libgomp.c++/target-std__forward_list-concurrent-usm.C b/libgomp/testsuite/libgomp.c++/target-std__forward_list-concurrent-usm.C index 65004b25510..2c28ed81580 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__forward_list-concurrent-usm.C +++ b/libgomp/testsuite/libgomp.c++/target-std__forward_list-concurrent-usm.C @@ -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 diff --git a/libgomp/testsuite/libgomp.c++/target-std__forward_list-concurrent.C b/libgomp/testsuite/libgomp.c++/target-std__forward_list-concurrent.C index 4a98e4734fb..93f91476712 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__forward_list-concurrent.C +++ b/libgomp/testsuite/libgomp.c++/target-std__forward_list-concurrent.C @@ -1,6 +1,6 @@ // { dg-do run } // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include #include diff --git a/libgomp/testsuite/libgomp.c++/target-std__list-concurrent-usm.C b/libgomp/testsuite/libgomp.c++/target-std__list-concurrent-usm.C index 3cdd44db427..dec92d2639d 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__list-concurrent-usm.C +++ b/libgomp/testsuite/libgomp.c++/target-std__list-concurrent-usm.C @@ -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 diff --git a/libgomp/testsuite/libgomp.c++/target-std__list-concurrent.C b/libgomp/testsuite/libgomp.c++/target-std__list-concurrent.C index bede8392035..6b3f8c51231 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__list-concurrent.C +++ b/libgomp/testsuite/libgomp.c++/target-std__list-concurrent.C @@ -1,6 +1,6 @@ // { dg-do run } // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include #include diff --git a/libgomp/testsuite/libgomp.c++/target-std__numbers.C b/libgomp/testsuite/libgomp.c++/target-std__numbers.C index a6b3665663b..8ce0c251dbd 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__numbers.C +++ b/libgomp/testsuite/libgomp.c++/target-std__numbers.C @@ -1,5 +1,6 @@ // { dg-do run } // { dg-additional-options "-std=c++20" } +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c++/target-std__span-concurrent-usm.C b/libgomp/testsuite/libgomp.c++/target-std__span-concurrent-usm.C index 09f98790b3c..09af5c2dd21 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__span-concurrent-usm.C +++ b/libgomp/testsuite/libgomp.c++/target-std__span-concurrent-usm.C @@ -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 diff --git a/libgomp/testsuite/libgomp.c++/target-std__span-concurrent.C b/libgomp/testsuite/libgomp.c++/target-std__span-concurrent.C index d6186f76ac5..761abc357e7 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__span-concurrent.C +++ b/libgomp/testsuite/libgomp.c++/target-std__span-concurrent.C @@ -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 #include #include diff --git a/libgomp/testsuite/libgomp.c++/target-std__valarray-1.C b/libgomp/testsuite/libgomp.c++/target-std__valarray-1.C index 9a77fb256bf..f15ba7ec005 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__valarray-1.C +++ b/libgomp/testsuite/libgomp.c++/target-std__valarray-1.C @@ -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 #include #include diff --git a/libgomp/testsuite/libgomp.c++/target-std__valarray-concurrent-usm.C b/libgomp/testsuite/libgomp.c++/target-std__valarray-concurrent-usm.C index 828b67c3930..9a0485ce77a 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__valarray-concurrent-usm.C +++ b/libgomp/testsuite/libgomp.c++/target-std__valarray-concurrent-usm.C @@ -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 diff --git a/libgomp/testsuite/libgomp.c++/target-std__valarray-concurrent.C b/libgomp/testsuite/libgomp.c++/target-std__valarray-concurrent.C index 81eebe83e03..15ca0f999b4 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__valarray-concurrent.C +++ b/libgomp/testsuite/libgomp.c++/target-std__valarray-concurrent.C @@ -1,6 +1,6 @@ // { dg-do run } // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include #include diff --git a/libgomp/testsuite/libgomp.c++/target-std__vector-concurrent-usm.C b/libgomp/testsuite/libgomp.c++/target-std__vector-concurrent-usm.C index 835f6d5287e..c9f42838327 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__vector-concurrent-usm.C +++ b/libgomp/testsuite/libgomp.c++/target-std__vector-concurrent-usm.C @@ -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 diff --git a/libgomp/testsuite/libgomp.c++/target-std__vector-concurrent.C b/libgomp/testsuite/libgomp.c++/target-std__vector-concurrent.C index d728194eb68..ae269630107 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__vector-concurrent.C +++ b/libgomp/testsuite/libgomp.c++/target-std__vector-concurrent.C @@ -1,6 +1,6 @@ // { dg-do run } // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include #include diff --git a/libgomp/testsuite/libgomp.c-c++-common/declare_target-1.c b/libgomp/testsuite/libgomp.c-c++-common/declare_target-1.c index c5670dfb7db..bd57477e959 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/declare_target-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/declare_target-1.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/depend-2.c b/libgomp/testsuite/libgomp.c-c++-common/depend-2.c index 2fe867e2c83..7b793123e8a 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/depend-2.c +++ b/libgomp/testsuite/libgomp.c-c++-common/depend-2.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include #include @@ -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; } diff --git a/libgomp/testsuite/libgomp.c-c++-common/depobj-1.c b/libgomp/testsuite/libgomp.c-c++-common/depobj-1.c index a07a0c889c1..744c7da57b2 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/depobj-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/depobj-1.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c-c++-common/for-11.c b/libgomp/testsuite/libgomp.c-c++-common/for-11.c index e46b4dd04c1..35acbc2ca25 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/for-11.c +++ b/libgomp/testsuite/libgomp.c-c++-common/for-11.c @@ -1,4 +1,4 @@ /* { dg-additional-options "-std=gnu99" {target c } } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #define CONDNE #include "for-5.c" diff --git a/libgomp/testsuite/libgomp.c-c++-common/for-12.c b/libgomp/testsuite/libgomp.c-c++-common/for-12.c index e28ba93f8fe..6d6f3c0f3b9 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/for-12.c +++ b/libgomp/testsuite/libgomp.c-c++-common/for-12.c @@ -1,4 +1,4 @@ /* { dg-additional-options "-std=gnu99" {target c } } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #define CONDNE #include "for-6.c" diff --git a/libgomp/testsuite/libgomp.c-c++-common/for-16.c b/libgomp/testsuite/libgomp.c-c++-common/for-16.c index 5649ba9ee87..daa996eaf89 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/for-16.c +++ b/libgomp/testsuite/libgomp.c-c++-common/for-16.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } extern #ifdef __cplusplus "C" diff --git a/libgomp/testsuite/libgomp.c-c++-common/for-3.c b/libgomp/testsuite/libgomp.c-c++-common/for-3.c index 285f8e9bd4d..eb09039ec18 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/for-3.c +++ b/libgomp/testsuite/libgomp.c-c++-common/for-3.c @@ -1,5 +1,5 @@ /* { dg-additional-options "-std=gnu99" { target c } } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } extern #ifdef __cplusplus "C" diff --git a/libgomp/testsuite/libgomp.c-c++-common/for-5.c b/libgomp/testsuite/libgomp.c-c++-common/for-5.c index edfbe13ecda..79c9d399f62 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/for-5.c +++ b/libgomp/testsuite/libgomp.c-c++-common/for-5.c @@ -1,5 +1,5 @@ /* { dg-additional-options "-std=gnu99" { target c } } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } extern #ifdef __cplusplus "C" diff --git a/libgomp/testsuite/libgomp.c-c++-common/for-6.c b/libgomp/testsuite/libgomp.c-c++-common/for-6.c index 64a754e51b8..4a40f018e7b 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/for-6.c +++ b/libgomp/testsuite/libgomp.c-c++-common/for-6.c @@ -1,5 +1,5 @@ /* { dg-additional-options "-std=gnu99" { target c } } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } extern #ifdef __cplusplus "C" diff --git a/libgomp/testsuite/libgomp.c-c++-common/for-9.c b/libgomp/testsuite/libgomp.c-c++-common/for-9.c index dfd674fee56..059a2778787 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/for-9.c +++ b/libgomp/testsuite/libgomp.c-c++-common/for-9.c @@ -1,4 +1,4 @@ /* { dg-additional-options "-std=gnu99" {target c } } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #define CONDNE #include "for-3.c" diff --git a/libgomp/testsuite/libgomp.c-c++-common/function-not-offloaded.c b/libgomp/testsuite/libgomp.c-c++-common/function-not-offloaded.c index bc1ae68941a..072b83d5061 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/function-not-offloaded.c +++ b/libgomp/testsuite/libgomp.c-c++-common/function-not-offloaded.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/metadirective-1.c b/libgomp/testsuite/libgomp.c-c++-common/metadirective-1.c index fbe4ac3a954..e77fb0579ba 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/metadirective-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/metadirective-1.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/metadirective-2.c b/libgomp/testsuite/libgomp.c-c++-common/metadirective-2.c index 9b5e5cf5d9c..5714a0a3daf 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/metadirective-2.c +++ b/libgomp/testsuite/libgomp.c-c++-common/metadirective-2.c @@ -1,5 +1,5 @@ /* { dg-do run } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #define N 100 diff --git a/libgomp/testsuite/libgomp.c-c++-common/metadirective-3.c b/libgomp/testsuite/libgomp.c-c++-common/metadirective-3.c index b6879c92440..a91ec781485 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/metadirective-3.c +++ b/libgomp/testsuite/libgomp.c-c++-common/metadirective-3.c @@ -1,5 +1,5 @@ /* { dg-do run } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #define N 100 int diff --git a/libgomp/testsuite/libgomp.c-c++-common/metadirective-5.c b/libgomp/testsuite/libgomp.c-c++-common/metadirective-5.c index e869932de6d..f5040eb78e5 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/metadirective-5.c +++ b/libgomp/testsuite/libgomp.c-c++-common/metadirective-5.c @@ -1,5 +1,5 @@ /* { dg-do run } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #define N 100 #include diff --git a/libgomp/testsuite/libgomp.c-c++-common/monotonic-1.c b/libgomp/testsuite/libgomp.c-c++-common/monotonic-1.c index c3c0100f052..0e5af829cc9 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/monotonic-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/monotonic-1.c @@ -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; } diff --git a/libgomp/testsuite/libgomp.c-c++-common/monotonic-2.c b/libgomp/testsuite/libgomp.c-c++-common/monotonic-2.c index b886a24c99a..815bb892a6d 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/monotonic-2.c +++ b/libgomp/testsuite/libgomp.c-c++-common/monotonic-2.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c-c++-common/pr100059-1.c b/libgomp/testsuite/libgomp.c-c++-common/pr100059-1.c index af12295541a..60dad90deca 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/pr100059-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/pr100059-1.c @@ -1,5 +1,5 @@ /* Based on sollve_vv's tests/5.0/declare_target/test_nested_declare_target.c. */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #define N 1024 int a[N], b[N], c[N]; int i = 0; diff --git a/libgomp/testsuite/libgomp.c-c++-common/pr66199-2.c b/libgomp/testsuite/libgomp.c-c++-common/pr66199-2.c index 2fc9eec529a..2a21441f800 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/pr66199-2.c +++ b/libgomp/testsuite/libgomp.c-c++-common/pr66199-2.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/pr66199-4.c b/libgomp/testsuite/libgomp.c-c++-common/pr66199-4.c index d6d13676f54..28c6f8c4e41 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/pr66199-4.c +++ b/libgomp/testsuite/libgomp.c-c++-common/pr66199-4.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/pr66199-5.c b/libgomp/testsuite/libgomp.c-c++-common/pr66199-5.c index 7ade43c4c9f..16f41d0c0fc 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/pr66199-5.c +++ b/libgomp/testsuite/libgomp.c-c++-common/pr66199-5.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/pr66199-6.c b/libgomp/testsuite/libgomp.c-c++-common/pr66199-6.c index 86467d7c726..5ecabb643ea 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/pr66199-6.c +++ b/libgomp/testsuite/libgomp.c-c++-common/pr66199-6.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/pr66199-7.c b/libgomp/testsuite/libgomp.c-c++-common/pr66199-7.c index 752367e3ac5..d4822a6edc6 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/pr66199-7.c +++ b/libgomp/testsuite/libgomp.c-c++-common/pr66199-7.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/pr66199-8.c b/libgomp/testsuite/libgomp.c-c++-common/pr66199-8.c index 102af0691ec..79e766f5f77 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/pr66199-8.c +++ b/libgomp/testsuite/libgomp.c-c++-common/pr66199-8.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/pr66199-9.c b/libgomp/testsuite/libgomp.c-c++-common/pr66199-9.c index 554a4765b4e..0dfc9eec7f4 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/pr66199-9.c +++ b/libgomp/testsuite/libgomp.c-c++-common/pr66199-9.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/ptr-attach-1.c b/libgomp/testsuite/libgomp.c-c++-common/ptr-attach-1.c index 849dd97e231..05b712b8751 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/ptr-attach-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/ptr-attach-1.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/reverse-offload-1.c b/libgomp/testsuite/libgomp.c-c++-common/reverse-offload-1.c index 52d828caf1c..986658fc068 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/reverse-offload-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/reverse-offload-1.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-1.c b/libgomp/testsuite/libgomp.c-c++-common/target-1.c index c7abb008182..d558ddaadbf 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-1.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } extern #ifdef __cplusplus "C" diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-10.c b/libgomp/testsuite/libgomp.c-c++-common/target-10.c index bc66880b6af..4ad707c5658 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-10.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-10.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-40.c b/libgomp/testsuite/libgomp.c-c++-common/target-40.c index 554860ab088..7fe189a4022 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-40.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-40.c @@ -1,6 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O0" } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } extern #ifdef __cplusplus "C" diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-abi-struct-1-O0.c b/libgomp/testsuite/libgomp.c-c++-common/target-abi-struct-1-O0.c index 9bf949a1f06..1e0f2a7de77 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-abi-struct-1-O0.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-abi-struct-1-O0.c @@ -1,3 +1,3 @@ /* { dg-additional-options -O0 } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include "target-abi-struct-1.c" diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-abi-struct-1.c b/libgomp/testsuite/libgomp.c-c++-common/target-abi-struct-1.c index d9268af55cf..475ce653023 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-abi-struct-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-abi-struct-1.c @@ -1 +1,2 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #include "../libgomp.oacc-c-c++-common/abi-struct-1.c" diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-cdtor-1.c b/libgomp/testsuite/libgomp.c-c++-common/target-cdtor-1.c index e6099cf23b8..2b2097607b7 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-cdtor-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-cdtor-1.c @@ -1,5 +1,5 @@ /* Offloaded 'constructor' and 'destructor' functions. */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #pragma omp declare target diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-same-name-1.c b/libgomp/testsuite/libgomp.c-c++-common/target-same-name-1.c index b35d8c96ae2..2fbe41ac6e1 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-same-name-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-same-name-1.c @@ -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 */ diff --git a/libgomp/testsuite/libgomp.c-c++-common/task-reduction-14.c b/libgomp/testsuite/libgomp.c-c++-common/task-reduction-14.c index 37c00d4394a..5f61b89f25e 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/task-reduction-14.c +++ b/libgomp/testsuite/libgomp.c-c++-common/task-reduction-14.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } extern #ifdef __cplusplus "C" diff --git a/libgomp/testsuite/libgomp.c-c++-common/variable-not-offloaded.c b/libgomp/testsuite/libgomp.c-c++-common/variable-not-offloaded.c index fe2a8b26242..fdfa59cf9d8 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/variable-not-offloaded.c +++ b/libgomp/testsuite/libgomp.c-c++-common/variable-not-offloaded.c @@ -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 diff --git a/libgomp/testsuite/libgomp.c/declare-variant-3.c b/libgomp/testsuite/libgomp.c/declare-variant-3.c index 62c1fa766ba..8eb7b7b5765 100644 --- a/libgomp/testsuite/libgomp.c/declare-variant-3.c +++ b/libgomp/testsuite/libgomp.c/declare-variant-3.c @@ -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" } } diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4.c b/libgomp/testsuite/libgomp.c/declare-variant-4.c index 3c8802a6081..609328d3ee2 100644 --- a/libgomp/testsuite/libgomp.c/declare-variant-4.c +++ b/libgomp/testsuite/libgomp.c/declare-variant-4.c @@ -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" } } diff --git a/libgomp/testsuite/libgomp.c/doacross-1.c b/libgomp/testsuite/libgomp.c/doacross-1.c index 3d12f1cfc02..b77ab24fc81 100644 --- a/libgomp/testsuite/libgomp.c/doacross-1.c +++ b/libgomp/testsuite/libgomp.c/doacross-1.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } extern void abort (void); #define N 256 diff --git a/libgomp/testsuite/libgomp.c/doacross-2.c b/libgomp/testsuite/libgomp.c/doacross-2.c index 0911dd207d9..8c8cddc62f0 100644 --- a/libgomp/testsuite/libgomp.c/doacross-2.c +++ b/libgomp/testsuite/libgomp.c/doacross-2.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } extern void abort (void); #define N 256 diff --git a/libgomp/testsuite/libgomp.c/doacross-3.c b/libgomp/testsuite/libgomp.c/doacross-3.c index 9a70b108772..012853c748b 100644 --- a/libgomp/testsuite/libgomp.c/doacross-3.c +++ b/libgomp/testsuite/libgomp.c/doacross-3.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } extern void abort (void); #define N 256 diff --git a/libgomp/testsuite/libgomp.c/examples-4/async_target-1.c b/libgomp/testsuite/libgomp.c/examples-4/async_target-1.c index b2e1f1feef8..9c59b29726e 100644 --- a/libgomp/testsuite/libgomp.c/examples-4/async_target-1.c +++ b/libgomp/testsuite/libgomp.c/examples-4/async_target-1.c @@ -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 #define EPS 0.00001 diff --git a/libgomp/testsuite/libgomp.c/examples-4/declare_target-1.c b/libgomp/testsuite/libgomp.c/examples-4/declare_target-1.c index 6d4bc4fac12..51deb476998 100644 --- a/libgomp/testsuite/libgomp.c/examples-4/declare_target-1.c +++ b/libgomp/testsuite/libgomp.c/examples-4/declare_target-1.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +// { dg-additional-options "-Wno-deprecated-openmp" } #include diff --git a/libgomp/testsuite/libgomp.c/examples-4/declare_target-3.c b/libgomp/testsuite/libgomp.c/examples-4/declare_target-3.c index 8025335722a..e61eae43eb8 100644 --- a/libgomp/testsuite/libgomp.c/examples-4/declare_target-3.c +++ b/libgomp/testsuite/libgomp.c/examples-4/declare_target-3.c @@ -1,5 +1,5 @@ /* { dg-do run } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #define EPS 0.000001 diff --git a/libgomp/testsuite/libgomp.c/examples-4/declare_target-4.c b/libgomp/testsuite/libgomp.c/examples-4/declare_target-4.c index f2414366951..57ce99d530e 100644 --- a/libgomp/testsuite/libgomp.c/examples-4/declare_target-4.c +++ b/libgomp/testsuite/libgomp.c/examples-4/declare_target-4.c @@ -1,6 +1,6 @@ /* { dg-do run } */ /* { dg-additional-options "-DTESTITERS=20" { target { ! run_expensive_tests } } } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #define EPS 0.00001 diff --git a/libgomp/testsuite/libgomp.c/examples-4/declare_target-5.c b/libgomp/testsuite/libgomp.c/examples-4/declare_target-5.c index 33d6137afd5..09c47bac95f 100644 --- a/libgomp/testsuite/libgomp.c/examples-4/declare_target-5.c +++ b/libgomp/testsuite/libgomp.c/examples-4/declare_target-5.c @@ -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 #define EPS 0.00001 diff --git a/libgomp/testsuite/libgomp.c/max_vf-1.c b/libgomp/testsuite/libgomp.c/max_vf-1.c index 70f6b86c614..e18424dece0 100644 --- a/libgomp/testsuite/libgomp.c/max_vf-1.c +++ b/libgomp/testsuite/libgomp.c/max_vf-1.c @@ -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]; diff --git a/libgomp/testsuite/libgomp.c/pr81778.c b/libgomp/testsuite/libgomp.c/pr81778.c index 571668eb36a..101e7bf5bf6 100644 --- a/libgomp/testsuite/libgomp.c/pr81778.c +++ b/libgomp/testsuite/libgomp.c/pr81778.c @@ -1,5 +1,5 @@ /* Minimized from for-5.c. */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c/pr86660.c b/libgomp/testsuite/libgomp.c/pr86660.c index bea6b15270b..274dee2b337 100644 --- a/libgomp/testsuite/libgomp.c/pr86660.c +++ b/libgomp/testsuite/libgomp.c/pr86660.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } /* PR middle-end/86660 */ #pragma omp declare target diff --git a/libgomp/testsuite/libgomp.c/reduction-4.c b/libgomp/testsuite/libgomp.c/reduction-4.c index 23e9d6d5bda..e0d913504f4 100644 --- a/libgomp/testsuite/libgomp.c/reduction-4.c +++ b/libgomp/testsuite/libgomp.c/reduction-4.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include @@ -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; diff --git a/libgomp/testsuite/libgomp.c/switch-conversion.c b/libgomp/testsuite/libgomp.c/switch-conversion.c index 835f54e17ac..d307b4e7197 100644 --- a/libgomp/testsuite/libgomp.c/switch-conversion.c +++ b/libgomp/testsuite/libgomp.c/switch-conversion.c @@ -1,6 +1,6 @@ /* PR tree-optimization/85063 */ /* { dg-additional-options "-ftree-switch-conversion" } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #pragma omp declare target diff --git a/libgomp/testsuite/libgomp.c/target-26.c b/libgomp/testsuite/libgomp.c/target-26.c index fa6b52598da..bc338dff749 100644 --- a/libgomp/testsuite/libgomp.c/target-26.c +++ b/libgomp/testsuite/libgomp.c/target-26.c @@ -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; diff --git a/libgomp/testsuite/libgomp.c/target-28.c b/libgomp/testsuite/libgomp.c/target-28.c index 96e9e058a21..5a7991a8b7e 100644 --- a/libgomp/testsuite/libgomp.c/target-28.c +++ b/libgomp/testsuite/libgomp.c/target-28.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } extern void abort (void); int g; diff --git a/libgomp/testsuite/libgomp.c/target-30.c b/libgomp/testsuite/libgomp.c/target-30.c index a309f7d1a21..f1a94e001b0 100644 --- a/libgomp/testsuite/libgomp.c/target-30.c +++ b/libgomp/testsuite/libgomp.c/target-30.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } extern void abort (void); #pragma omp declare target diff --git a/libgomp/testsuite/libgomp.c/target-32.c b/libgomp/testsuite/libgomp.c/target-32.c index 1444523615e..5cfd8320db8 100644 --- a/libgomp/testsuite/libgomp.c/target-32.c +++ b/libgomp/testsuite/libgomp.c/target-32.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include #include "usleep.h" diff --git a/libgomp/testsuite/libgomp.c/target-35.c b/libgomp/testsuite/libgomp.c/target-35.c index 6da8b2b9a54..7cb0b7564c9 100644 --- a/libgomp/testsuite/libgomp.c/target-35.c +++ b/libgomp/testsuite/libgomp.c/target-35.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c/target-38.c b/libgomp/testsuite/libgomp.c/target-38.c index 81699720526..ea1ad74d4ee 100644 --- a/libgomp/testsuite/libgomp.c/target-38.c +++ b/libgomp/testsuite/libgomp.c/target-38.c @@ -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) diff --git a/libgomp/testsuite/libgomp.c/target-39.c b/libgomp/testsuite/libgomp.c/target-39.c index 4442f43c8ef..8de98b682d8 100644 --- a/libgomp/testsuite/libgomp.c/target-39.c +++ b/libgomp/testsuite/libgomp.c/target-39.c @@ -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) diff --git a/libgomp/testsuite/libgomp.c/target-9.c b/libgomp/testsuite/libgomp.c/target-9.c index 4f3c812afd0..66ae8495552 100644 --- a/libgomp/testsuite/libgomp.c/target-9.c +++ b/libgomp/testsuite/libgomp.c/target-9.c @@ -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 #define N 123456 diff --git a/libgomp/testsuite/libgomp.c/target-link-1.c b/libgomp/testsuite/libgomp.c/target-link-1.c index 681677cc2aa..96b5122e3f7 100644 --- a/libgomp/testsuite/libgomp.c/target-link-1.c +++ b/libgomp/testsuite/libgomp.c/target-link-1.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } struct S { int s, t; }; int a = 1, b = 1; diff --git a/libgomp/testsuite/libgomp.c/target-teams-1.c b/libgomp/testsuite/libgomp.c/target-teams-1.c index adbabef82b3..86e428e7ad7 100644 --- a/libgomp/testsuite/libgomp.c/target-teams-1.c +++ b/libgomp/testsuite/libgomp.c/target-teams-1.c @@ -1,5 +1,5 @@ /* { dg-do run } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c/thread-limit-2.c b/libgomp/testsuite/libgomp.c/thread-limit-2.c index 7997a70adc3..76450138598 100644 --- a/libgomp/testsuite/libgomp.c/thread-limit-2.c +++ b/libgomp/testsuite/libgomp.c/thread-limit-2.c @@ -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 #include #include diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vred2d-128.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vred2d-128.c index 84e6d51670b..b8e44a72d5b 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/vred2d-128.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vred2d-128.c @@ -3,6 +3,7 @@ /* { dg-additional-options "-DEXPENSIVE" { target run_expensive_tests } } */ /* { dg-additional-options -Wuninitialized } */ +// { dg-additional-options "-Wno-deprecated-openmp" } #include