[PATCH v2 1/4] openmp: Bump Version from 4.5 to 5.2 (1/4)

Bumps OpenMP from 4.5 (201511) to 5.2 (202111), with deprecation and
test support to 5.1 (202011). Adds new tests and a new warning.
Suppresses deprecation warnings in all relevant tests and removes
suppression pragmas visible outside of the testsuite. Additionally
implements new warning in the relevant frontends. Otherwise, cleans
up some whitespace and fixed a misspelled pragma in a testcase. Also
fixes an indentation error.

gcc/c-family/ChangeLog:

	* c-cppbuiltin.cc (c_cpp_builtins): Bump _OPENMP version.
	* c.opt (Wdeprecated-openmp): Add warning.
	* c.opt.urls: Regenerated.

gcc/c/ChangeLog:

	* c-parser.cc (c_parser_omp_clause_proc_bind): Deprecate master
	affinity.
	(c_parser_omp_master): Deprecate master construct.
	(c_parser_transaction): Whitespace.

gcc/cp/ChangeLog:

	* parser.cc (cp_parser_postfix_expression): Whitespace.
	(cp_parser_builtin_c23_va_start): Ditto.
	(cp_parser_omp_clause_proc_bind): Deprecate master affinity.
	(cp_parser_omp_master): Deprecate master construct.

gcc/ChangeLog:

	* doc/invoke.texi: Update docs for '-Wdeprecated-openmp'.

gcc/fortran/ChangeLog:

	* cpp.cc (cpp_define_builtins): Bump _OPENMP version.
	* invoke.texi: Update docs for '-Wdeprecated-openmp'.
	* lang.opt (Wdeprecated-openmp): Add warning.
	* lang.opt.urls: Regenerated.
	* openmp.cc (gfc_match_omp_clauses): Deprecate master affinity
	policy.
	(gfc_match_omp_parallel_master): Deprecate master construct.
	(gfc_match_omp_parallel_master_taskloop): Ditto.
	(gfc_match_omp_parallel_master_taskloop_simd): Ditto.
	(gfc_match_omp_master): Ditto.
	(gfc_match_omp_master_taskloop): Ditto.
	(gfc_match_omp_master_taskloop_simd): Ditto.
	(resolve_omp_clauses): Warn for deprecated use of
	{use,is}_device_ptr.

libgomp/ChangeLog:

	* env.c (omp_display_env): Bump _OPENMP version.
	* fortran.c (ialias_redirect): Remove suppression pragmas.
	(omp_set_dynamic_8_): Ditto.
	(omp_set_nested_8_): Ditto.
	(omp_get_nested_): Ditto.
	* icv.c (omp_get_dynamic): Ditto.
	(omp_get_nested): Ditto.
	(ialias): Ditto.
	* omp_lib.f90.in: Bump openmp_version.
	* omp_lib.h.in: Ditto.
	* testsuite/libgomp.c++/affinity-1.C: Suppress deprecation
	warnings.
	* testsuite/libgomp.c++/ctor-1.C: Ditto.
	* testsuite/libgomp.c++/ctor-11.C: Ditto.
	* testsuite/libgomp.c++/ctor-13.C: Ditto.
	* testsuite/libgomp.c++/ctor-2.C: Ditto.
	* testsuite/libgomp.c++/ctor-5.C: Ditto.
	* testsuite/libgomp.c++/ctor-7.C: Ditto.
	* testsuite/libgomp.c++/depend-iterator-1.C: Ditto.
	* testsuite/libgomp.c++/loop-13.C: Ditto.
	* testsuite/libgomp.c++/master-1.C: Ditto.
	* testsuite/libgomp.c++/pr26943.C: Ditto.
	* testsuite/libgomp.c++/pr81130.C: Ditto.
	* testsuite/libgomp.c++/pr81314.C: Ditto.
	* testsuite/libgomp.c++/target-in-reduction-1.C: Ditto.
	* testsuite/libgomp.c++/target-in-reduction-2.C: Ditto.
	* testsuite/libgomp.c++/task-1.C: Ditto.
	* testsuite/libgomp.c++/task-2.C: Ditto.
	* testsuite/libgomp.c++/task-6.C: Ditto.
	* testsuite/libgomp.c++/task-reduction-7.C: Ditto.
	* testsuite/libgomp.c++/task-reduction-9.C: Ditto.
	* testsuite/libgomp.c++/taskloop-reduction-1.C: Ditto.
	* testsuite/libgomp.c-c++-common/cancel-taskgroup-4.c: Ditto.
	* testsuite/libgomp.c-c++-common/depend-inoutset-1.c: Ditto.
	* testsuite/libgomp.c-c++-common/depend-iterator-1.c: Ditto.
	* testsuite/libgomp.c-c++-common/master-combined-1.c: Ditto.
	* testsuite/libgomp.c-c++-common/target-in-reduction-1.c: Ditto.
	* testsuite/libgomp.c-c++-common/target-in-reduction-2.c: Ditto.
	* testsuite/libgomp.c-c++-common/task-detach-12.c: Ditto.
	* testsuite/libgomp.c-c++-common/task-reduction-15.c: Ditto.
	* testsuite/libgomp.c-c++-common/task-reduction-5.c: Ditto.
	* testsuite/libgomp.c-c++-common/task-reduction-6.c: Ditto.
	* testsuite/libgomp.c-c++-common/task-reduction-8.c: Ditto.
	* testsuite/libgomp.c-c++-common/taskloop-reduction-1.c: Ditto.
	* testsuite/libgomp.c-c++-common/taskloop-reduction-3.c: Ditto.
	* testsuite/libgomp.c-c++-common/taskloop-reduction-4.c: Ditto.
	* testsuite/libgomp.c/affinity-1.c: Remove extraneous dg
	instruction and add suppression.
	* testsuite/libgomp.c/critical-2.c: Suppress deprecation
	warnings.
	* testsuite/libgomp.c/debug-1.c: Ditto.
	* testsuite/libgomp.c/lib-1.c: Ditto.
	* testsuite/libgomp.c/loop-24.c: Ditto.
	* testsuite/libgomp.c/nestedfn-2.c: Ditto.
	* testsuite/libgomp.c/nestedfn-3.c: Ditto.
	* testsuite/libgomp.c/pr104385.c: Ditto.
	* testsuite/libgomp.c/target-31.c: Ditto.
	* testsuite/libgomp.c/target-34.c: Ditto.
	* testsuite/libgomp.c/target-critical-1.c: Ditto.
	* testsuite/libgomp.c/task-1.c: Ditto.
	* testsuite/libgomp.c/task-3.c: Ditto.
	* testsuite/libgomp.c/task-6.c: Ditto.
	* testsuite/libgomp.c/task-reduction-1.c: Ditto.
	* testsuite/libgomp.c/task-reduction-2.c: Ditto.
	* testsuite/libgomp.c/teams-1.c: Ditto.
	* testsuite/libgomp.c/vla-1.c: Ditto.
	* testsuite/libgomp.fortran/crayptr1.f90: Ditto.
	* testsuite/libgomp.fortran/depend-inoutset-1.f90: Ditto.
	* testsuite/libgomp.fortran/is_device_ptr-1.f90: Ditto.
	* testsuite/libgomp.fortran/is_device_ptr-2.f90: Ditto.
	* testsuite/libgomp.fortran/lib1.f90: Ditto.
	* testsuite/libgomp.fortran/lib2.f: Ditto.
	* testsuite/libgomp.fortran/lib3.f: Ditto.
	* testsuite/libgomp.fortran/omp_parse2.f90: Ditto.
	* testsuite/libgomp.fortran/openmp_version-1.f: Bump OMP version.
	* testsuite/libgomp.fortran/openmp_version-2.f90: Ditto.
	* testsuite/libgomp.fortran/parallel-master.f90: Suppress
	warnings.
	* testsuite/libgomp.fortran/pointer2.f90: Ditto.
	* testsuite/libgomp.fortran/reduction6.f90: Ditto.
	* testsuite/libgomp.fortran/target-firstprivate-1.f90: Ditto.
	* testsuite/libgomp.fortran/use_device_addr-1.f90: Ditto.
	* testsuite/libgomp.fortran/use_device_addr-2.f90: Ditto.
	* testsuite/libgomp.fortran/use_device_addr-3.f90: Ditto.
	* testsuite/libgomp.fortran/use_device_addr-4.f90: Ditto.
	* testsuite/libgomp.fortran/use_device_addr-5.f90: Ditto.
	* testsuite/libgomp.fortran/use_device_ptr-1.f90: Ditto.
	* testsuite/libgomp.fortran/use_device_ptr-3.f90: Ditto.
	* testsuite/libgomp.fortran/use_device_ptr-4.f90: Ditto.
	* testsuite/libgomp.fortran/use_device_ptr-optional-1.f90: Ditto.
	* testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: Ditto.
	* testsuite/libgomp.fortran/use_device_ptr-optional-3.f90: Ditto.
	* testsuite/libgomp.c-c++-common/omp-atv-seq-dep.c: New test.
	* testsuite/libgomp.c-c++-common/omp-lock-hint-contended-dep.c:
	New test.
	* testsuite/libgomp.c-c++-common/omp-lock-hint-none-dep.c: New test.
	* testsuite/libgomp.c-c++-common/omp-lock-hint-speculative-dep.c:
	New test.
	* testsuite/libgomp.c-c++-common/omp-lock-hint-uncontended-dep.c:
	New test.
	* testsuite/libgomp.c/omp-proc-bind-master-dep.c: New test.
	* testsuite/libgomp.fortran/omp-atv-seq-dep.f90: New test.
	* testsuite/libgomp.fortran/omp-lock-hint-contended-dep.f90: New
	test.
	* testsuite/libgomp.fortran/omp-lock-hint-none-dep.f90: New test.
	* testsuite/libgomp.fortran/omp-lock-hint-speculative-dep.f90: New
	test.
	* testsuite/libgomp.fortran/omp-lock-hint-uncontended-dep.f90: New
	test.

gcc/testsuite/ChangeLog:

	* c-c++-common/cpp/openmp-define-3.c: Bump OMP version.
	* c-c++-common/gomp/Wparentheses-1.c: Suppress deprecation
	warnings.
	* c-c++-common/gomp/Wparentheses-3.c: Ditto.
	* c-c++-common/gomp/affinity-3.c: Ditto.
	* c-c++-common/gomp/allocate-18.c: Ditto.
	* c-c++-common/gomp/cancel-1.c: Ditto.
	* c-c++-common/gomp/clause-dups-1.c: Ditto.
	* c-c++-common/gomp/clauses-1.c: Suppress deprecation
	warnings and fix misspelled directive. Add
	'-Wunknown-pragmas'.
	* c-c++-common/gomp/clauses-6.c: Suppress deprecation warnings.
	* c-c++-common/gomp/declare-variant-1.c: Ditto.
	* c-c++-common/gomp/declare-variant-2.c: Ditto.
	* c-c++-common/gomp/depend-iterator-1.c: Ditto.
	* c-c++-common/gomp/lastprivate-conditional-1.c: Ditto.
	* c-c++-common/gomp/loop-1.c: Ditto.
	* c-c++-common/gomp/loop-2.c: Ditto.
	* c-c++-common/gomp/loop-3.c: Ditto.
	* c-c++-common/gomp/loop-4.c: Ditto.
	* c-c++-common/gomp/master-combined-1.c: Ditto.
	* c-c++-common/gomp/master-combined-2.c: Ditto.
	* c-c++-common/gomp/nesting-2.c: Ditto.
	* c-c++-common/gomp/pr100902-1.c: Ditto.
	* c-c++-common/gomp/pr61486-2.c: Ditto.
	* c-c++-common/gomp/pr85696.c: Ditto.
	* c-c++-common/gomp/pr85956.c: Ditto.
	* c-c++-common/gomp/pr98187.c: Ditto.
	* c-c++-common/gomp/pr99928-1.c: Ditto.
	* c-c++-common/gomp/pr99928-10.c: Ditto.
	* c-c++-common/gomp/pr99928-11.c: Ditto.
	* c-c++-common/gomp/pr99928-12.c: Ditto.
	* c-c++-common/gomp/pr99928-13.c: Ditto.
	* c-c++-common/gomp/pr99928-14.c: Ditto.
	* c-c++-common/gomp/pr99928-2.c: Ditto.
	* c-c++-common/gomp/pr99928-3.c: Ditto.
	* c-c++-common/gomp/pr99928-4.c: Ditto.
	* c-c++-common/gomp/pr99928-5.c: Ditto.
	* c-c++-common/gomp/pr99928-6.c: Ditto.
	* c-c++-common/gomp/pr99928-7.c: Ditto.
	* c-c++-common/gomp/pr99928-8.c: Ditto.
	* c-c++-common/gomp/pr99928-9.c: Ditto.
	* c-c++-common/gomp/task-detach-1.c: Ditto.
	* c-c++-common/gomp/teams-2.c: Ditto.
	* g++.dg/gomp/attrs-1.C: Ditto.
	* g++.dg/gomp/attrs-2.C: Ditto.
	* g++.dg/gomp/attrs-4.C: Ditto.
	* g++.dg/gomp/block-0.C: Ditto.
	* g++.dg/gomp/block-10.C: Ditto.
	* g++.dg/gomp/block-5.C: Ditto.
	* g++.dg/gomp/block-9.C: Ditto.
	* g++.dg/gomp/depend-iterator-1.C: Ditto.
	* g++.dg/gomp/master-1.C: Ditto.
	* g++.dg/gomp/master-2.C: Ditto.
	* g++.dg/gomp/master-3.C: Ditto.
	* g++.dg/gomp/method-1.C: Ditto.
	* g++.dg/gomp/pr29965-3.C: Ditto.
	* g++.dg/gomp/pr29965-9.C: Ditto.
	* g++.dg/gomp/pr78363-4.C: Ditto.
	* g++.dg/gomp/pr78363-6.C: Ditto.
	* g++.dg/gomp/pr79664.C: Ditto.
	* g++.dg/gomp/pr94477.C: Ditto.
	* g++.dg/gomp/pr94512.C: Ditto.
	* g++.dg/gomp/tpl-master-1.C: Ditto.
	* gcc.dg/gomp/appendix-a/a.12.1.c: Ditto.
	* gcc.dg/gomp/appendix-a/a.33.2.c: Ditto.
	* gcc.dg/gomp/attrs-1.c: Ditto.
	* gcc.dg/gomp/attrs-2.c: Ditto.
	* gcc.dg/gomp/attrs-4.c: Ditto.
	* gcc.dg/gomp/block-10.c: Ditto.
	* gcc.dg/gomp/block-5.c: Ditto.
	* gcc.dg/gomp/block-9.c: Ditto.
	* gcc.dg/gomp/master-1.c: Ditto.
	* gcc.dg/gomp/master-2.c: Ditto.
	* gcc.dg/gomp/master-3.c: Ditto.
	* gcc.dg/gomp/nesting-1.c: Ditto.
	* gcc.dg/gomp/pr104517.c: Ditto.
	* gcc.dg/gomp/pr29965-3.c: Ditto.
	* gcc.dg/gomp/pr35818.c: Ditto.
	* gcc.dg/gomp/pr91216.c: Ditto.
	* gcc.dg/gomp/sharing-2.c: Ditto.
	* gfortran.dg/gomp/adjust-args-10.f90: Ditto.
	* gfortran.dg/gomp/affinity-1.f90: Ditto.
	* gfortran.dg/gomp/allocate-clause.f90: Ditto.
	* gfortran.dg/gomp/appendix-a/a.12.1.f90: Ditto.
	* gfortran.dg/gomp/appendix-a/a.33.2.f90: Ditto.
	* gfortran.dg/gomp/c_ptr_tests_20.f90: Ditto.
	* gfortran.dg/gomp/c_ptr_tests_21.f90: Ditto.
	* gfortran.dg/gomp/cancel-1.f90: Ditto.
	* gfortran.dg/gomp/clauses-1.f90: Ditto.
	* gfortran.dg/gomp/declare-variant-1.f90: Ditto.
	* gfortran.dg/gomp/depend-iterator-1.f90: Ditto.
	* gfortran.dg/gomp/depend-iterator-2.f90: Ditto.
	* gfortran.dg/gomp/is_device_ptr-1.f90: Ditto.
	* gfortran.dg/gomp/is_device_ptr-2.f90: Ditto.
	* gfortran.dg/gomp/is_device_ptr-3.f90: Ditto.
	* gfortran.dg/gomp/lastprivate-conditional-1.f90: Ditto.
	* gfortran.dg/gomp/loop-4.f90: Ditto.
	* gfortran.dg/gomp/loop-exit.f90: Ditto.
	* gfortran.dg/gomp/map-3.f90: Ditto.
	* gfortran.dg/gomp/nesting-2.f90: Ditto.
	* gfortran.dg/gomp/nesting-3.f90: Ditto.
	* gfortran.dg/gomp/nowait-2.f90: Ditto.
	* gfortran.dg/gomp/nowait-4.f90: Ditto.
	* gfortran.dg/gomp/nowait-5.f90: Ditto.
	* gfortran.dg/gomp/openmp-simd-2.f90: Ditto.
	* gfortran.dg/gomp/openmp-simd-3.f90: Ditto.
	* gfortran.dg/gomp/parallel-master-1.f90: Ditto.
	* gfortran.dg/gomp/parallel-master-2.f90: Ditto.
	* gfortran.dg/gomp/pr107214-8.f90: Ditto.
	* gfortran.dg/gomp/pr48117.f90: Ditto.
	* gfortran.dg/gomp/pr94672.f90: Ditto.
	* gfortran.dg/gomp/pr99928-1.f90: Suppression + fix whitespace.
	* gfortran.dg/gomp/pr99928-11.f90: Suppression.
	* gfortran.dg/gomp/pr99928-2.f90: Suppression + fix whitespace.
	* gfortran.dg/gomp/pr99928-3.f90: Ditto.
	* gfortran.dg/gomp/pr99928-4.f90: Ditto.
	* gfortran.dg/gomp/pr99928-5.f90: Ditto.
	* gfortran.dg/gomp/pr99928-6.f90: Ditto.
	* gfortran.dg/gomp/pr99928-8.f90: Ditto.
	* gfortran.dg/gomp/sharing-3.f90: Suppress deprecation warnings.
	* gfortran.dg/gomp/strictly-structured-block-1.f90: Ditto.
	* gfortran.dg/gomp/strictly-structured-block-2.f90: Ditto.
	* gfortran.dg/gomp/target1.f90: Ditto.
	* gfortran.dg/gomp/taskloop-1.f90: Ditto.
	* gfortran.dg/gomp/taskloop-2.f90: Ditto.
	* gfortran.dg/openmp-define-3.f90: Bump expected version.
	* c-c++-common/gomp/master-construct-dep.c: New test.
	* gfortran.dg/gomp/master-construct-dep.f90: New test.
This commit is contained in:
supers1ngular 2025-12-11 06:27:09 -08:00
parent bf9dd44a97
commit a57b0e3ecb
231 changed files with 639 additions and 360 deletions

View File

@ -1687,7 +1687,7 @@ c_cpp_builtins (cpp_reader *pfile)
cpp_define (pfile, "_OPENACC=201711");
if (flag_openmp)
cpp_define (pfile, "_OPENMP=201511");
cpp_define (pfile, "_OPENMP=202111");
for (i = 0; i < NUM_INT_N_ENTS; i ++)
if (int_n_enabled_p[i])

View File

@ -685,6 +685,10 @@ Wdeprecated-non-prototype
C ObjC Var(warn_deprecated_non_prototype) Init(-1) Warning
Warn about calls with arguments to functions declared without parameters.
Wdeprecated-openmp
C ObjC C++ ObjC++ Warning Var(warn_deprecated_openmp) Init(1)
Warn about deprecated OpenMP code.
Wdeprecated-variadic-comma-omission
C++ ObjC++ Var(warn_deprecated_variadic_comma_omission) Warning
Warn about deprecated omission of comma before ... in varargs function declaration.

View File

@ -322,6 +322,9 @@ UrlSuffix(gcc/C_002b_002b-Dialect-Options.html#index-Wdeprecated-literal-operato
Wdeprecated-non-prototype
UrlSuffix(gcc/Warning-Options.html#index-Wdeprecated-non-prototype)
Wdeprecated-openmp
UrlSuffix(gcc/Warning-Options.html#index-Wdeprecated-openmp) LangUrlSuffix_Fortran(gfortran/Error-and-Warning-Options.html#index-Wdeprecated-openmp)
Wdeprecated-variadic-comma-omission
UrlSuffix(gcc/C_002b_002b-Dialect-Options.html#index-Wdeprecated-variadic-comma-omission)

View File

@ -20801,7 +20801,12 @@ c_parser_omp_clause_proc_bind (c_parser *parser, tree list)
if (strcmp ("primary", p) == 0)
kind = OMP_CLAUSE_PROC_BIND_PRIMARY;
else if (strcmp ("master", p) == 0)
{
warning_at (clause_loc, OPT_Wdeprecated_openmp,
"%<master%> affinity deprecated since OpenMP 5.1, "
"use %<primary%>");
kind = OMP_CLAUSE_PROC_BIND_MASTER;
}
else if (strcmp ("close", p) == 0)
kind = OMP_CLAUSE_PROC_BIND_CLOSE;
else if (strcmp ("spread", p) == 0)
@ -25419,6 +25424,8 @@ c_parser_omp_master (location_t loc, c_parser *parser,
char *p_name, omp_clause_mask mask, tree *cclauses,
bool *if_p)
{
warning_at (loc, OPT_Wdeprecated_openmp,
"%<master%> construct deprecated since OpenMP 5.1, use %<masked%>");
tree block, clauses, ret;
strcat (p_name, " master");
@ -30708,7 +30715,7 @@ c_parser_transaction (c_parser *parser, enum rid keyword)
if (flag_tm)
stmt = c_finish_transaction (loc, stmt, this_in);
else
error_at (loc,
error_at (loc,
keyword == RID_TRANSACTION_ATOMIC
? G_("%<__transaction_atomic%> without transactional memory "
"support enabled")

View File

@ -8198,7 +8198,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
error_at (loc, "call to %<__builtin_operator_new%> "
"does not select replaceable global "
"allocation function");
else
else
error_at (loc, "call to %<__builtin_operator_delete%> "
"does not select replaceable global "
"deallocation function");
@ -11694,7 +11694,7 @@ cp_parser_builtin_c23_va_start (cp_parser *parser)
if (TREE_CODE (ret) == CALL_EXPR)
SET_EXPR_LOCATION (ret, combined_loc);
return cp_expr (ret, combined_loc);
}
}
/* Parse __builtin_offsetof.
@ -44290,7 +44290,12 @@ cp_parser_omp_clause_proc_bind (cp_parser *parser, tree list,
if (strcmp ("primary", p) == 0)
kind = OMP_CLAUSE_PROC_BIND_PRIMARY;
else if (strcmp ("master", p) == 0)
{
warning_at (location, OPT_Wdeprecated_openmp,
"%<master%> affinity deprecated since OpenMP 5.1, "
"use %<primary%>");
kind = OMP_CLAUSE_PROC_BIND_MASTER;
}
else if (strcmp ("close", p) == 0)
kind = OMP_CLAUSE_PROC_BIND_CLOSE;
else if (strcmp ("spread", p) == 0)
@ -49006,6 +49011,8 @@ cp_parser_omp_master (cp_parser *parser, cp_token *pragma_tok,
tree clauses, sb, ret;
unsigned int save;
location_t loc = cp_lexer_peek_token (parser->lexer)->location;
warning_at (loc, OPT_Wdeprecated_openmp,
"%<master%> construct deprecated since OpenMP 5.1, use %<masked%>");
strcat (p_name, " master");

View File

@ -392,6 +392,7 @@ Objective-C and Objective-C++ Dialects}.
-Wdangling-else -Wdangling-pointer -Wdangling-pointer=@var{n}
-Wdate-time
-Wno-deprecated -Wno-deprecated-declarations -Wno-designated-init
-Wno-deprecated-openmp
-Wdisabled-optimization
-Wno-discarded-array-qualifiers -Wno-discarded-qualifiers
-Wno-div-by-zero -Wdouble-promotion
@ -10998,6 +10999,11 @@ variables (@pxref{Variable Attributes}), and types (@pxref{Type
Attributes}) marked as deprecated by using the @code{deprecated}
attribute.
@opindex Wno-deprecated-openmp
@opindex Wdeprecated-openmp
@item -Wno-deprecated-openmp
Do not warn about deprecated OpenMP code.
@opindex Wno-overflow
@opindex Woverflow
@item -Wno-overflow

View File

@ -175,7 +175,7 @@ cpp_define_builtins (cpp_reader *pfile)
cpp_define (pfile, "_OPENACC=201711");
if (flag_openmp)
cpp_define (pfile, "_OPENMP=201511");
cpp_define (pfile, "_OPENMP=202111");
/* The defines below are necessary for the TARGET_* macros.

View File

@ -149,9 +149,9 @@ by type. Explanations are in the following sections.
and warnings}.
@gccoptlist{-Waliasing -Wall -Wampersand -Warray-bounds
-Wc-binding-type -Wcharacter-truncation -Wconversion
-Wdo-subscript -Wfunction-elimination -Wimplicit-interface
-Wimplicit-procedure -Wintrinsic-shadow -Wuse-without-only
-Wintrinsics-std -Wline-truncation -Wno-align-commons
-Wno-deprecated-openmp -Wdo-subscript -Wfunction-elimination
-Wimplicit-interface -Wimplicit-procedure -Wintrinsic-shadow
-Wuse-without-only -Wintrinsics-std -Wline-truncation -Wno-align-commons
-Wno-overwrite-recursive -Wno-tabs -Wreal-q-constant -Wsurprising
-Wunderflow -Wunused-parameter -Wrealloc-lhs -Wrealloc-lhs-all
-Wfrontend-loop-interchange -Wtarget-lifetime -fmax-errors=@var{n}
@ -1069,6 +1069,11 @@ the expression after conversion. Implied by @option{-Wall}.
Warn about implicit conversions between different types and kinds. This
option does @emph{not} imply @option{-Wconversion}.
@opindex Wdeprecated-openmp
@cindex warnings
@item -Wdeprecated-openmp
Warn for usage of deprecated OpenMP code.
@opindex Wexternal-argument-mismatch
@cindex warnings, argument mismatch
@cindex argment mismatch, warnings

View File

@ -237,6 +237,10 @@ Wconversion-extra
Fortran Var(warn_conversion_extra) Warning
Warn about most implicit conversions.
Wdeprecated-openmp
Fortran Var(warn_deprecated_openmp) Warning Init(1)
; Documented in C
Wdo-subscript
Fortran Var(warn_do_subscript) Warning LangEnabledBy(Fortran,Wextra)
Warn about possibly incorrect subscripts in do loops.

View File

@ -91,6 +91,9 @@ UrlSuffix(gcc/Warning-Options.html#index-Wconversion) LangUrlSuffix_Fortran(gfor
Wconversion-extra
LangUrlSuffix_Fortran(gfortran/Error-and-Warning-Options.html#index-Wconversion-extra)
Wdeprecated-openmp
UrlSuffix(gcc/Warning-Options.html#index-Wdeprecated-openmp) LangUrlSuffix_Fortran(gfortran/Error-and-Warning-Options.html#index-Wdeprecated-openmp)
Wdo-subscript
LangUrlSuffix_Fortran(gfortran/Error-and-Warning-Options.html#index-Wdo-subscript)

View File

@ -4019,7 +4019,12 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask,
if (gfc_match ("primary )") == MATCH_YES)
c->proc_bind = OMP_PROC_BIND_PRIMARY;
else if (gfc_match ("master )") == MATCH_YES)
c->proc_bind = OMP_PROC_BIND_MASTER;
{
gfc_warning (OPT_Wdeprecated_openmp, "%<master%> affinity "
"policy at %C deprecated since OpenMP 5.1, use "
"%<primary%>");
c->proc_bind = OMP_PROC_BIND_MASTER;
}
else if (gfc_match ("spread )") == MATCH_YES)
c->proc_bind = OMP_PROC_BIND_SPREAD;
else if (gfc_match ("close )") == MATCH_YES)
@ -7425,12 +7430,16 @@ gfc_match_omp_parallel_masked_taskloop_simd (void)
match
gfc_match_omp_parallel_master (void)
{
gfc_warning (OPT_Wdeprecated_openmp, "%<master%> construct at %C deprecated"
" since OpenMP 5.1, use %<masked%>");
return match_omp (EXEC_OMP_PARALLEL_MASTER, OMP_PARALLEL_CLAUSES);
}
match
gfc_match_omp_parallel_master_taskloop (void)
{
gfc_warning (OPT_Wdeprecated_openmp, "%<master%> construct at %C deprecated"
" since OpenMP 5.1, use %<masked%>");
return match_omp (EXEC_OMP_PARALLEL_MASTER_TASKLOOP,
(OMP_PARALLEL_CLAUSES | OMP_TASKLOOP_CLAUSES)
& ~(omp_mask (OMP_CLAUSE_IN_REDUCTION)));
@ -7439,6 +7448,8 @@ gfc_match_omp_parallel_master_taskloop (void)
match
gfc_match_omp_parallel_master_taskloop_simd (void)
{
gfc_warning (OPT_Wdeprecated_openmp, "%<master%> construct at %C deprecated"
" since OpenMP 5.1, use %<masked%>");
return match_omp (EXEC_OMP_PARALLEL_MASTER_TASKLOOP_SIMD,
(OMP_PARALLEL_CLAUSES | OMP_TASKLOOP_CLAUSES
| OMP_SIMD_CLAUSES)
@ -8022,6 +8033,8 @@ gfc_match_omp_masked_taskloop_simd (void)
match
gfc_match_omp_master (void)
{
gfc_warning (OPT_Wdeprecated_openmp, "%<master%> construct at %C deprecated"
" since OpenMP 5.1, use %<masked%>");
if (gfc_match_omp_eos () != MATCH_YES)
{
gfc_error ("Unexpected junk after $OMP MASTER statement at %C");
@ -8035,12 +8048,16 @@ gfc_match_omp_master (void)
match
gfc_match_omp_master_taskloop (void)
{
gfc_warning (OPT_Wdeprecated_openmp, "%<master%> construct at %C deprecated"
" since OpenMP 5.1, use %<masked%>");
return match_omp (EXEC_OMP_MASTER_TASKLOOP, OMP_TASKLOOP_CLAUSES);
}
match
gfc_match_omp_master_taskloop_simd (void)
{
gfc_warning (OPT_Wdeprecated_openmp, "%<master%> construct at %C deprecated"
" since OpenMP 5.1, use %<masked%>");
return match_omp (EXEC_OMP_MASTER_TASKLOOP_SIMD,
OMP_TASKLOOP_CLAUSES | OMP_SIMD_CLAUSES);
}
@ -9991,6 +10008,9 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses,
{
/* For TARGET, non-C_PTR are deprecated and handled as
has_device_addr. */
gfc_warning (OPT_Wdeprecated_openmp, "Non-C_PTR type "
"argument at %L is deprecated, use HAS_DEVICE_ADDR",
&n->where);
gfc_omp_namelist *n2 = n;
n = n->next;
if (last)
@ -10017,6 +10037,9 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses,
if (n->sym->ts.type != BT_DERIVED
|| !n->sym->ts.u.derived->ts.is_iso_c)
{
gfc_warning (OPT_Wdeprecated_openmp, "Non-C_PTR type "
"argument at %L is deprecated, use USE_DEVICE_ADDR",
&n->where);
n = n->next;
if (last)
last->next = n;

View File

@ -6,6 +6,6 @@
# error _OPENMP not defined
#endif
#if _OPENMP != 201511
#if _OPENMP != 202111
# error _OPENMP defined to wrong value
#endif

View File

@ -1,5 +1,5 @@
/* PR c/70436 */
/* { dg-additional-options "-Wparentheses" } */
/* { dg-additional-options "-Wparentheses -Wno-deprecated-openmp" } */
int a, b, c;
void bar (void);

View File

@ -1,5 +1,5 @@
/* PR c/70436 */
/* { dg-additional-options "-Wparentheses -fno-openmp" } */
/* { dg-additional-options "-Wparentheses -fno-openmp -Wno-deprecated-openmp" } */
int a, b, c;
void bar (void);

View File

@ -1,5 +1,5 @@
/* { dg-additional-options "-Wno-volatile" { target c++ } } */
// { dg-additional-options "-Wno-deprecated-openmp" }
int arr[64], arr2[64];
struct S { int a[4]; } k;
short arr4[4];

View File

@ -1,3 +1,4 @@
// { dg-additional-options "-Wno-deprecated-openmp" }
typedef enum omp_allocator_handle_t
#if __cplusplus >= 201103L
: __UINTPTR_TYPE__
@ -24,7 +25,7 @@ void test0 ()
#ifndef __cplusplus
_Static_assert (_Alignof(A1) == _Alignof(B1), "wrong alignment");
#elif __cplusplus >= 201103L
static_assert (alignof(A1) == alignof(B1), "wrong alignment");
static_assert (alignof(A1) == alignof(B1), "wrong alignment");
#endif
}

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
/* { dg-options "-fopenmp -Wno-deprecated-openmp" } */
void
f1 (void)

View File

@ -1,3 +1,4 @@
// { dg-additional-options "-Wno-deprecated-openmp" }
void f0 (void);
void

View File

@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-additional-options "-std=c99" { target c } } */
// { dg-additional-options "-Wno-deprecated-openmp -Wunknown-pragmas" }
typedef enum omp_allocator_handle_t
#if __cplusplus >= 201103L
: __UINTPTR_TYPE__
@ -362,7 +362,7 @@ bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int hda, int s,
for (int i = 0; i < 64; i++)
ll++;
#pragma omp taskgroup task_reduction (+:r2) allocate (r2)
#pragma omp mastked taskloop \
#pragma omp masked taskloop \
private (p) firstprivate (f) lastprivate (l) shared (s) default(shared) num_tasks (nta) collapse(1) untied if(i1) final(fi) mergeable priority (pp) \
reduction(default, +:r) in_reduction(+:r2) filter (d)
for (int i = 0; i < 64; i++)

View File

@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-additional-options "-std=c99" { target c } } */
// { dg-additional-options "-Wno-deprecated-openmp" }
typedef enum omp_allocator_handle_t
#if __cplusplus >= 201103L
: __UINTPTR_TYPE__
@ -30,7 +30,7 @@ omp_lock_hint_nonspeculative = omp_sync_hint_nonspeculative,
omp_sync_hint_speculative = 0x8,
omp_lock_hint_speculative = omp_sync_hint_speculative
} omp_sync_hint_t;
typedef struct __attribute__((__aligned__ (sizeof (void *)))) omp_depend_t {
char __omp_depend_t__[2 * sizeof (void *)];
} omp_depend_t;

View File

@ -1,3 +1,4 @@
// { dg-additional-options "-Wno-deprecated-openmp" }
int foo (int, int, int *);
int bar (int, int, int *);
int foobar (int, int, int *);
@ -43,7 +44,7 @@ corge (void)
for (i = 0; i < 3; i++)
waldo (7);
#pragma omp parallel
#pragma omp master
#pragma omp master
waldo (8);
}

View File

@ -1,3 +1,4 @@
// { dg-additional-options "-Wno-deprecated-openmp" }
void f0 (void);
void f1 (void);
#pragma omp declare variant /* { dg-error "expected '\\(' before end of line" } */

View File

@ -1,5 +1,5 @@
/* { dg-additional-options "-Wno-volatile" { target c++ } } */
// { dg-additional-options "-Wno-deprecated-openmp" }
int arr[64], arr2[64];
struct S { int a[4]; } k;
short arr4[4];

View File

@ -1,4 +1,5 @@
void
// { dg-additional-options "-Wno-deprecated-openmp" }
void
foo (int *p)
{
int a = -1, b = -1, c = -1, d = -1, e = -1, f = -1, g = -1, h = -1;

View File

@ -1,3 +1,4 @@
// { dg-additional-options "-Wno-deprecated-openmp" }
void foo (void);
int v;
#ifdef __cplusplus

View File

@ -1,3 +1,4 @@
// { dg-additional-options "-Wno-deprecated-openmp" }
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -1,3 +1,4 @@
// { dg-additional-options "-Wno-deprecated-openmp" }
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -1,3 +1,4 @@
// { dg-additional-options "-Wno-deprecated-openmp" }
int r, l;
void

View File

@ -1,3 +1,4 @@
// { dg-additional-options "-Wno-deprecated-openmp" }
void bar (int *);
void

View File

@ -1,3 +1,4 @@
// { dg-additional-options "-Wno-deprecated-openmp" }
void
foo (int *a)
{

View File

@ -0,0 +1,22 @@
// { dg-additional-options "-Wopenmp" }
int
main()
{
int x = 0;
#pragma omp parallel
for (int i = 0; i < 8; ++i)
{
#pragma omp master // { dg-warning "'master' construct deprecated since OpenMP 5.1, use 'masked' \\\[-Wdeprecated-openmp\\\]" }
{
++x;
}
}
for (int i = 0; i < 8; ++i)
{
#pragma omp parallel master // { dg-warning "'master' construct deprecated since OpenMP 5.1, use 'masked' \\\[-Wdeprecated-openmp\\\]" }
{
++x;
}
}
return 0;
}

View File

@ -1,3 +1,4 @@
// { dg-additional-options "-Wno-deprecated-openmp" }
void
foo (void)
{

View File

@ -1,5 +1,5 @@
/* PR c/100902 */
// { dg-additional-options "-Wno-deprecated-openmp" }
void
foo (int *ptr)
{

View File

@ -1,6 +1,6 @@
/* PR middle-end/61486 */
/* { dg-do compile } */
// { dg-additional-options "-Wno-deprecated-openmp" }
#pragma omp declare target
void dosomething (int *a, int n, int m);
#pragma omp end declare target

View File

@ -1,5 +1,5 @@
/* PR c/85696 */
// { dg-additional-options "-Wno-deprecated-openmp" }
#ifndef __cplusplus
void
foo (int n, int a[][n])

View File

@ -1,6 +1,6 @@
/* PR middle-end/85956 */
/* { dg-do compile } */
/* { dg-additional-options "-O2 -Wall" } */
/* { dg-additional-options "-O2 -Wall -Wno-deprecated-openmp" } */
void
foo (int n, void *p)

View File

@ -1,6 +1,6 @@
/* PR c++/98187 */
/* { dg-do compile } */
/* { dg-options "-fopenmp-simd -O2 -fdump-tree-gimple" } */
/* { dg-options "-fopenmp-simd -O2 -fdump-tree-gimple -Wno-deprecated-openmp" } */
/* { dg-final { scan-tree-dump-times "#pragma omp simd" 17 "gimple" } } */
void

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
int f00, f01, f02, f03, f04, f05, f06, f07, f08, f09;
int f12, f13, f14, f15, f16, f17, f18, f19;

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
int *r00, *r01, *r02, *r03, *r04, *r05;
int *r13, *r14, *r15, *r16, *r17, *r18, *r19;

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
int r00, r01, r02;

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
// { dg-additional-options "-Wno-deprecated-openmp" }
int
foo (void)
{

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
int j00a, j00b, j01a, j01b, j02a, j02b, j03a, j03b;
int j06a, j06b, j07a, j07b, j08a, j08b, j09a, j09b, j10a, j10b;

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
int j00a, j00b, j01a, j01b, j02a, j02b, j03a, j03b, j04a, j04b;
int j06a, j06b, j07a, j07b, j08a, j08b, j09a, j09b, j10a, j10b;

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
int l00, l01, l02, l03, l04, l05, l06, l07;
int l10, l11, l12, l13, l14, l15, l16, l17, l18;

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
int l00, l01, l02, l03, l04, l07, l08, l09;
int l10, l11;

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
int l00, l01, l05, l06, l07, l08;

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
int j00, j01, j02, j03, j04, j06, j07, j08, j09;
int j10;

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
int j00, j01, j02, j03, j04, j06, j07, j08, j09;
int j10;

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
void
foo (void)

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
int r00, r01, r02, r03, r04, r05;
int r13, r14, r15, r16, r17, r18, r19;

View File

@ -1,6 +1,6 @@
/* PR middle-end/99928 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" } */
int r00[4], r01[4], r02[4], r03[4], r04[4], r05[4];
int r13[4], r14[4], r15[4], r16[4], r17[4], r18[4], r19[4];

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
/* { dg-options "-fopenmp -Wno-deprecated-openmp" } */
typedef enum omp_event_handle_t
{

View File

@ -1,3 +1,4 @@
// { dg-additional-options "-Wno-deprecated-openmp" }
void
foo (void)
{

View File

@ -1,5 +1,5 @@
// { dg-do compile { target c++11 } }
// { dg-additional-options "-Wno-deprecated-openmp" }
typedef enum omp_allocator_handle_t
: __UINTPTR_TYPE__
{

View File

@ -1,5 +1,5 @@
// { dg-do compile { target c++11 } }
// { dg-additional-options "-Wno-deprecated-openmp" }
typedef enum omp_allocator_handle_t
: __UINTPTR_TYPE__
{

View File

@ -1,5 +1,5 @@
// { dg-do compile { target c++11 } }
// { dg-additional-options "-Wno-deprecated-openmp" }
void
foo (int x)
{

View File

@ -1,5 +1,5 @@
// { dg-do compile }
// { dg-options "-fopenmp -fdump-tree-omplower" }
// { dg-options "-fopenmp -fdump-tree-omplower -Wno-deprecated-openmp" }
void bar();
void foo()

View File

@ -1,5 +1,5 @@
// { dg-do compile }
// { dg-additional-options "-Wno-deprecated-openmp" }
void foo(int i)
{
int j;

View File

@ -1,5 +1,5 @@
// { dg-do compile }
// { dg-additional-options "-Wno-deprecated-openmp" }
void foo()
{
#pragma omp master

View File

@ -1,5 +1,5 @@
// { dg-do compile }
// { dg-additional-options "-Wno-deprecated-openmp" }
void foo(int i)
{
int j;

View File

@ -1,4 +1,4 @@
// { dg-additional-options "-Wno-volatile" }
// { dg-additional-options "-Wno-volatile -Wno-deprecated-openmp" }
int arr[64], arr2[64];
struct S { int a[4]; } k;

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
// { dg-additional-options "-Wno-deprecated-openmp" }
extern void bar(int);
void foo (void)
@ -14,7 +14,7 @@ void foo (void)
}
/* Yes, this is legal -- structured-block contains statement contains
openmp-construct contains master-construct. */
openmp-construct contains masked-construct. */
#pragma omp master
#pragma omp master
#pragma omp master

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
// { dg-additional-options "-Wno-deprecated-openmp" }
void f1(void)
{
#pragma omp master asdf /* { dg-error "expected" } */

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-omplower" } */
/* { dg-options "-fopenmp -fdump-tree-omplower -Wno-deprecated-openmp" } */
extern void bar(int);

View File

@ -1,6 +1,6 @@
/* PR c++/24513 */
/* { dg-do compile } */
// { dg-additional-options "-Wno-deprecated-openmp" }
struct S
{
void foo (int *p)

View File

@ -1,7 +1,7 @@
// PR middle-end/29965
// Test that OpenMP construct bodies which never return don't cause ICEs.
// { dg-do compile }
// { dg-options "-O2 -fopenmp" }
// { dg-options "-O2 -fopenmp -Wno-deprecated-openmp" }
extern void baz () __attribute__ ((noreturn));

View File

@ -3,7 +3,7 @@
// This is invalid code, but we don't emit diagnostics for it, nevertheless
// we test that we don't ICE on it.
// { dg-do compile }
// { dg-options "-O2 -fopenmp" }
// { dg-options "-O2 -fopenmp -Wno-deprecated-openmp" }
void
foo1 ()

View File

@ -1,6 +1,6 @@
// { dg-do compile }
// { dg-require-effective-target c++11 }
// { dg-additional-options "-g" }
// { dg-additional-options "-g -Wno-deprecated-openmp" }
int main()
{

View File

@ -1,6 +1,6 @@
// { dg-do compile }
// { dg-require-effective-target c++11 }
// { dg-additional-options "-g" }
// { dg-additional-options "-g -Wno-deprecated-openmp" }
int main()
{

View File

@ -1,7 +1,7 @@
// PR c++/79664
// { dg-do compile }
// { dg-options "-std=c++14 -fopenmp -Winvalid-constexpr -pedantic-errors" }
// { dg-additional-options "-Wno-deprecated-openmp" }
constexpr int
f1 ()
{

View File

@ -1,6 +1,6 @@
// PR c++/94477
// { dg-do compile }
// { dg-additional-options "-Wno-deprecated-openmp" }
void foo ();
template <int>

View File

@ -1,5 +1,5 @@
// PR c++/94512
// { dg-additional-options "-Wno-deprecated-openmp" }
void
foo ();

View File

@ -1,6 +1,6 @@
// PR c++/24734
// { dg-do compile }
// { dg-options "-fopenmp -fdump-tree-gimple" }
// { dg-options "-fopenmp -fdump-tree-gimple -Wno-deprecated-openmp" }
int i;

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
// { dg-additional-options "-Wno-deprecated-openmp" }
#include <stdio.h>
extern float average (float, float, float);
void

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
// { dg-additional-options "-Wno-deprecated-openmp" }
#include <stdio.h>
#include <stdlib.h>
float

View File

@ -1,4 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp -std=c23" } */
// { dg-additional-options "-Wno-deprecated-openmp" }
#include "../../g++.dg/gomp/attrs-1.C"

View File

@ -1,4 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp -std=c23" } */
// { dg-additional-options "-Wno-deprecated-openmp" }
#include "../../g++.dg/gomp/attrs-2.C"

View File

@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp -std=c23" } */
// { dg-additional-options "-Wno-deprecated-openmp" }
void
foo (int x)
{

View File

@ -1,5 +1,5 @@
// { dg-do compile }
// { dg-additional-options "-Wno-deprecated-openmp" }
void foo(int i)
{
int j;

View File

@ -1,5 +1,5 @@
// { dg-do compile }
// { dg-additional-options "-Wno-deprecated-openmp" }
void foo()
{
#pragma omp master

View File

@ -1,5 +1,5 @@
// { dg-do compile }
// { dg-additional-options "-Wno-deprecated-openmp" }
void foo(int i)
{
int j;

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
// { dg-additional-options "-Wno-deprecated-openmp" }
extern void bar(int);
void foo (void)

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
// { dg-additional-options "-Wno-deprecated-openmp" }
void f1(void)
{
#pragma omp master asdf /* { dg-error "expected" } */

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-ompexp" } */
/* { dg-options "-fopenmp -fdump-tree-ompexp -Wno-deprecated-openmp" } */
extern void bar(int);

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
/* { dg-options "-fopenmp -Wno-deprecated-openmp" } */
void
f1 (void)

View File

@ -1,6 +1,6 @@
/* PR debug/104517 */
/* { dg-do compile } */
/* { dg-options "-O1 -fcompare-debug -fopenmp -fno-tree-ter -save-temps" } */
/* { dg-options "-O1 -fcompare-debug -fopenmp -fno-tree-ter -save-temps -Wno-deprecated-openmp" } */
typedef enum omp_allocator_handle_t
{

View File

@ -1,7 +1,7 @@
/* PR middle-end/29965 */
/* Test that OpenMP construct bodies which never return don't cause ICEs. */
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp" } */
/* { dg-options "-O2 -fopenmp -Wno-deprecated-openmp" } */
extern void baz (void) __attribute__ ((noreturn));

View File

@ -1,6 +1,6 @@
/* PR middle-end/35818 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
/* { dg-options "-fopenmp -Wno-deprecated-openmp" } */
extern int a[];

View File

@ -1,5 +1,5 @@
/* PR middle-end/91216 */
// { dg-additional-options "-Wno-deprecated-openmp" }
int r;
void

View File

@ -1,5 +1,5 @@
/* { dg-do compile } */
// { dg-additional-options "-Wno-deprecated-openmp" }
void
foo (void)
{

View File

@ -85,7 +85,7 @@ program main
! Note: We don't add 'use_device_addr(B)' here;
! if we do, it will fail with an illegal memory access (why?).
!$omp target data use_device_ptr(p)
!$omp target data use_device_ptr(p) ! { dg-warning "Non-C_PTR type argument at \\(1\\) is deprecated, use USE_DEVICE_ADDR \\\[-Wdeprecated-openmp\\\]" }
call sub(p, B)
call sub(C, B) ! C is not mapped -> 'from' ptr == NULL
!$omp end target data

View File

@ -1,5 +1,7 @@
integer :: i, j
integer, dimension (10, 10) :: a
! { dg-additional-options "-Wno-deprecated-openmp" }
integer :: i, j
integer, dimension (10, 10) :: a
!$omp parallel do default(none)proc_bind(master)shared(a)
do i = 1, 10
j = 4

View File

@ -1,3 +1,4 @@
! { dg-additional-options "-Wno-deprecated-openmp" }
module omp_lib_kinds
use iso_c_binding, only: c_int, c_intptr_t
implicit none

View File

@ -1,4 +1,5 @@
! { dg-do compile }
! { dg-additional-options "-Wno-deprecated-openmp" }
SUBROUTINE A12( X, XOLD, N, TOL )
REAL X(*), XOLD(*), TOL
INTEGER N

View File

@ -1,5 +1,5 @@
! { dg-do compile }
! { dg-additional-options "-Wno-deprecated-openmp" }
REAL FUNCTION READ_NEXT()
REAL, POINTER :: TMP
!$OMP SINGLE

View File

@ -1,6 +1,6 @@
! { dg-do compile }
!
! This failed to compile the declare variant directive due to the C_PTR
! { dg-additional-options "-Wno-deprecated-openmp" }
! This failed to compile the declare variant directive due to the C_PTR
! arguments to foo being recognised as INTEGER(8)
program adjust_args
@ -17,7 +17,7 @@ program adjust_args
call foo(c_loc(cv), c_loc(av), N)
!$omp end parallel
!$omp end target data
contains
subroutine foo_variant(c_d_bv, c_d_av, n)
use iso_c_binding, only: c_ptr, c_f_pointer
@ -26,7 +26,7 @@ contains
real, pointer :: f_d_bv(:)
real, pointer :: f_d_av(:)
integer :: i
call c_f_pointer(c_d_bv, f_d_bv, [n])
call c_f_pointer(c_d_av, f_d_av, [n])
!$omp target teams loop is_device_ptr(f_d_bv, f_d_av)
@ -34,8 +34,8 @@ contains
f_d_bv(i) = f_d_av(i) * i
end do
end subroutine
subroutine foo(c_bv, c_av, n)
use iso_c_binding, only: c_ptr, c_f_pointer
type(c_ptr), intent(in) :: c_bv, c_av
@ -44,8 +44,8 @@ contains
real, pointer :: f_av(:)
integer :: i
!$omp declare variant(foo_variant) &
!$omp match(construct={parallel})
!$omp match(construct={parallel})
call c_f_pointer(c_bv, f_bv, [n])
call c_f_pointer(c_av, f_av, [n])
!$omp parallel loop

View File

@ -1,6 +1,6 @@
! { dg-do compile }
!
! Ensure that C_PTR and C_FUNPTR are reported as incompatible types in variant
! { dg-additional-options "-Wno-deprecated-openmp" }
! Ensure that C_PTR and C_FUNPTR are reported as incompatible types in variant
! argument lists
program adjust_args
@ -17,7 +17,7 @@ program adjust_args
call foo(c_loc(cv), c_loc(av), N)
!$omp end parallel
!$omp end target data
contains
subroutine foo_variant(c_d_bv, c_d_av, n)
use iso_c_binding, only: c_funptr, c_f_pointer
@ -26,7 +26,7 @@ contains
real, pointer :: f_d_bv(:)
real, pointer :: f_d_av(:)
integer :: i
! call c_f_pointer(c_d_bv, f_d_bv, [n])
! call c_f_pointer(c_d_av, f_d_av, [n])
!$omp target teams loop is_device_ptr(f_d_bv, f_d_av)
@ -34,8 +34,8 @@ contains
f_d_bv(i) = f_d_av(i) * i
end do
end subroutine
subroutine foo(c_bv, c_av, n)
use iso_c_binding, only: c_ptr, c_f_pointer
type(c_ptr), intent(in) :: c_bv, c_av
@ -44,8 +44,8 @@ contains
real, pointer :: f_av(:)
integer :: i
!$omp declare variant(foo_variant) & ! { dg-error "variant 'foo_variant' and base 'foo' at .1. have incompatible types: Type mismatch in argument 'c_bv' .TYPE.c_ptr./TYPE.c_funptr.." }
!$omp match(construct={parallel})
!$omp match(construct={parallel})
call c_f_pointer(c_bv, f_bv, [n])
call c_f_pointer(c_av, f_av, [n])
!$omp parallel loop

View File

@ -1,5 +1,5 @@
! { dg-additional-options "-cpp" }
! { dg-additional-options "-Wno-deprecated-openmp" }
subroutine f1
!$omp cancel parallel ! { dg-error "orphaned" }
!$omp cancel do ! { dg-error "orphaned" }

View File

@ -1,5 +1,5 @@
! { dg-do compile }
! { dg-additional-options "-Wno-deprecated-openmp" }
module m
use iso_c_binding, only: c_intptr_t
implicit none (external, type)

View File

@ -1,3 +1,4 @@
! { dg-additional-options "-Wno-deprecated-openmp" }
module main
implicit none

Some files were not shown because too many files have changed in this diff Show More