diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc index eac69690c819..f3a3ad855e08 100644 --- a/gcc/c-family/c-cppbuiltin.cc +++ b/gcc/c-family/c-cppbuiltin.cc @@ -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]) diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index e1576c9c3c37..a4cb755b0b97 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -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. diff --git a/gcc/c-family/c.opt.urls b/gcc/c-family/c.opt.urls index 9430f4bc2f9c..68c30a98d50e 100644 --- a/gcc/c-family/c.opt.urls +++ b/gcc/c-family/c.opt.urls @@ -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) diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc index 15bfd0dc3f4c..c81243d2ad21 100644 --- a/gcc/c/c-parser.cc +++ b/gcc/c/c-parser.cc @@ -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, + "% affinity deprecated since OpenMP 5.1, " + "use %"); 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, + "% construct deprecated since OpenMP 5.1, use %"); 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") diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index cdfa8f0122d3..866708a7e46c 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -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, + "% affinity deprecated since OpenMP 5.1, " + "use %"); 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, + "% construct deprecated since OpenMP 5.1, use %"); strcat (p_name, " master"); diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 8db0aa0ceb76..21888010a2b1 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -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 diff --git a/gcc/fortran/cpp.cc b/gcc/fortran/cpp.cc index 15ecc7dd5fa3..109dc587e7bc 100644 --- a/gcc/fortran/cpp.cc +++ b/gcc/fortran/cpp.cc @@ -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. diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index a65f2d1cc34f..d0a3b7aeedea 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -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 diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index 33710d0d920c..a60800a6eb5e 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -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. diff --git a/gcc/fortran/lang.opt.urls b/gcc/fortran/lang.opt.urls index cdb0ba8195d8..8625e15ca8f1 100644 --- a/gcc/fortran/lang.opt.urls +++ b/gcc/fortran/lang.opt.urls @@ -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) diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc index abc27d59a0c5..a771f0dd2134 100644 --- a/gcc/fortran/openmp.cc +++ b/gcc/fortran/openmp.cc @@ -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, "% affinity " + "policy at %C deprecated since OpenMP 5.1, use " + "%"); + 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, "% construct at %C deprecated" + " since OpenMP 5.1, use %"); return match_omp (EXEC_OMP_PARALLEL_MASTER, OMP_PARALLEL_CLAUSES); } match gfc_match_omp_parallel_master_taskloop (void) { + gfc_warning (OPT_Wdeprecated_openmp, "% construct at %C deprecated" + " since OpenMP 5.1, use %"); 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, "% construct at %C deprecated" + " since OpenMP 5.1, use %"); 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, "% construct at %C deprecated" + " since OpenMP 5.1, use %"); 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, "% construct at %C deprecated" + " since OpenMP 5.1, use %"); return match_omp (EXEC_OMP_MASTER_TASKLOOP, OMP_TASKLOOP_CLAUSES); } match gfc_match_omp_master_taskloop_simd (void) { + gfc_warning (OPT_Wdeprecated_openmp, "% construct at %C deprecated" + " since OpenMP 5.1, use %"); 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; diff --git a/gcc/testsuite/c-c++-common/cpp/openmp-define-3.c b/gcc/testsuite/c-c++-common/cpp/openmp-define-3.c index ef283d4e7ce6..1a184ff86085 100644 --- a/gcc/testsuite/c-c++-common/cpp/openmp-define-3.c +++ b/gcc/testsuite/c-c++-common/cpp/openmp-define-3.c @@ -6,6 +6,6 @@ # error _OPENMP not defined #endif -#if _OPENMP != 201511 +#if _OPENMP != 202111 # error _OPENMP defined to wrong value #endif diff --git a/gcc/testsuite/c-c++-common/gomp/Wparentheses-1.c b/gcc/testsuite/c-c++-common/gomp/Wparentheses-1.c index 4420d670bde3..fe5e949455a3 100644 --- a/gcc/testsuite/c-c++-common/gomp/Wparentheses-1.c +++ b/gcc/testsuite/c-c++-common/gomp/Wparentheses-1.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/Wparentheses-3.c b/gcc/testsuite/c-c++-common/gomp/Wparentheses-3.c index 1688d1062d4d..a23141d503e8 100644 --- a/gcc/testsuite/c-c++-common/gomp/Wparentheses-3.c +++ b/gcc/testsuite/c-c++-common/gomp/Wparentheses-3.c @@ -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); diff --git a/gcc/testsuite/c-c++-common/gomp/affinity-3.c b/gcc/testsuite/c-c++-common/gomp/affinity-3.c index 1a4765430489..43cb0099b12a 100644 --- a/gcc/testsuite/c-c++-common/gomp/affinity-3.c +++ b/gcc/testsuite/c-c++-common/gomp/affinity-3.c @@ -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]; diff --git a/gcc/testsuite/c-c++-common/gomp/allocate-18.c b/gcc/testsuite/c-c++-common/gomp/allocate-18.c index 49dc60fb6f52..cad79812032d 100644 --- a/gcc/testsuite/c-c++-common/gomp/allocate-18.c +++ b/gcc/testsuite/c-c++-common/gomp/allocate-18.c @@ -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 } diff --git a/gcc/testsuite/c-c++-common/gomp/cancel-1.c b/gcc/testsuite/c-c++-common/gomp/cancel-1.c index 5d68cd3ed6d2..16c9e77ed6af 100644 --- a/gcc/testsuite/c-c++-common/gomp/cancel-1.c +++ b/gcc/testsuite/c-c++-common/gomp/cancel-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fopenmp" } */ +/* { dg-options "-fopenmp -Wno-deprecated-openmp" } */ void f1 (void) diff --git a/gcc/testsuite/c-c++-common/gomp/clause-dups-1.c b/gcc/testsuite/c-c++-common/gomp/clause-dups-1.c index 6fc53e83f010..dce553bc588b 100644 --- a/gcc/testsuite/c-c++-common/gomp/clause-dups-1.c +++ b/gcc/testsuite/c-c++-common/gomp/clause-dups-1.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } void f0 (void); void diff --git a/gcc/testsuite/c-c++-common/gomp/clauses-1.c b/gcc/testsuite/c-c++-common/gomp/clauses-1.c index 71ca41c5804c..7f50e58bb477 100644 --- a/gcc/testsuite/c-c++-common/gomp/clauses-1.c +++ b/gcc/testsuite/c-c++-common/gomp/clauses-1.c @@ -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++) diff --git a/gcc/testsuite/c-c++-common/gomp/clauses-6.c b/gcc/testsuite/c-c++-common/gomp/clauses-6.c index 3502647ffb40..3727ff448641 100644 --- a/gcc/testsuite/c-c++-common/gomp/clauses-6.c +++ b/gcc/testsuite/c-c++-common/gomp/clauses-6.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/declare-variant-1.c b/gcc/testsuite/c-c++-common/gomp/declare-variant-1.c index f130a4130b6b..c6d2bea7c79a 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-variant-1.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-variant-1.c @@ -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); } diff --git a/gcc/testsuite/c-c++-common/gomp/declare-variant-2.c b/gcc/testsuite/c-c++-common/gomp/declare-variant-2.c index 83e1bb10058a..3bebb9acafd1 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-variant-2.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-variant-2.c @@ -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" } */ diff --git a/gcc/testsuite/c-c++-common/gomp/depend-iterator-1.c b/gcc/testsuite/c-c++-common/gomp/depend-iterator-1.c index 6fa60215f434..bfe51e123fbe 100644 --- a/gcc/testsuite/c-c++-common/gomp/depend-iterator-1.c +++ b/gcc/testsuite/c-c++-common/gomp/depend-iterator-1.c @@ -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]; diff --git a/gcc/testsuite/c-c++-common/gomp/lastprivate-conditional-1.c b/gcc/testsuite/c-c++-common/gomp/lastprivate-conditional-1.c index d4ef49690e84..5756893071fd 100644 --- a/gcc/testsuite/c-c++-common/gomp/lastprivate-conditional-1.c +++ b/gcc/testsuite/c-c++-common/gomp/lastprivate-conditional-1.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/loop-1.c b/gcc/testsuite/c-c++-common/gomp/loop-1.c index 3454fa802e33..0c4c3122844b 100644 --- a/gcc/testsuite/c-c++-common/gomp/loop-1.c +++ b/gcc/testsuite/c-c++-common/gomp/loop-1.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (void); int v; #ifdef __cplusplus diff --git a/gcc/testsuite/c-c++-common/gomp/loop-2.c b/gcc/testsuite/c-c++-common/gomp/loop-2.c index ce9b6c95b1da..be52c562ef4f 100644 --- a/gcc/testsuite/c-c++-common/gomp/loop-2.c +++ b/gcc/testsuite/c-c++-common/gomp/loop-2.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #ifdef __cplusplus extern "C" { #endif diff --git a/gcc/testsuite/c-c++-common/gomp/loop-3.c b/gcc/testsuite/c-c++-common/gomp/loop-3.c index 186b8cce64f0..5cfe10a82ab0 100644 --- a/gcc/testsuite/c-c++-common/gomp/loop-3.c +++ b/gcc/testsuite/c-c++-common/gomp/loop-3.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #ifdef __cplusplus extern "C" { #endif diff --git a/gcc/testsuite/c-c++-common/gomp/loop-4.c b/gcc/testsuite/c-c++-common/gomp/loop-4.c index b77f8c981427..d09f64e29786 100644 --- a/gcc/testsuite/c-c++-common/gomp/loop-4.c +++ b/gcc/testsuite/c-c++-common/gomp/loop-4.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } int r, l; void diff --git a/gcc/testsuite/c-c++-common/gomp/master-combined-1.c b/gcc/testsuite/c-c++-common/gomp/master-combined-1.c index b11f5db10de2..d66e88e1be6b 100644 --- a/gcc/testsuite/c-c++-common/gomp/master-combined-1.c +++ b/gcc/testsuite/c-c++-common/gomp/master-combined-1.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } void bar (int *); void diff --git a/gcc/testsuite/c-c++-common/gomp/master-combined-2.c b/gcc/testsuite/c-c++-common/gomp/master-combined-2.c index 4f7b57409aaf..454825c0b95c 100644 --- a/gcc/testsuite/c-c++-common/gomp/master-combined-2.c +++ b/gcc/testsuite/c-c++-common/gomp/master-combined-2.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (int *a) { diff --git a/gcc/testsuite/c-c++-common/gomp/master-construct-dep.c b/gcc/testsuite/c-c++-common/gomp/master-construct-dep.c new file mode 100644 index 000000000000..12040e501fca --- /dev/null +++ b/gcc/testsuite/c-c++-common/gomp/master-construct-dep.c @@ -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; +} diff --git a/gcc/testsuite/c-c++-common/gomp/nesting-2.c b/gcc/testsuite/c-c++-common/gomp/nesting-2.c index 6ce560de7f5e..377226de7a82 100644 --- a/gcc/testsuite/c-c++-common/gomp/nesting-2.c +++ b/gcc/testsuite/c-c++-common/gomp/nesting-2.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (void) { diff --git a/gcc/testsuite/c-c++-common/gomp/pr100902-1.c b/gcc/testsuite/c-c++-common/gomp/pr100902-1.c index e84aeb6240d4..63b780ecbeb1 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr100902-1.c +++ b/gcc/testsuite/c-c++-common/gomp/pr100902-1.c @@ -1,5 +1,5 @@ /* PR c/100902 */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (int *ptr) { diff --git a/gcc/testsuite/c-c++-common/gomp/pr61486-2.c b/gcc/testsuite/c-c++-common/gomp/pr61486-2.c index 5e9fa474a721..bc199587918c 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr61486-2.c +++ b/gcc/testsuite/c-c++-common/gomp/pr61486-2.c @@ -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 diff --git a/gcc/testsuite/c-c++-common/gomp/pr85696.c b/gcc/testsuite/c-c++-common/gomp/pr85696.c index 798718b563d4..edae22d39a7c 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr85696.c +++ b/gcc/testsuite/c-c++-common/gomp/pr85696.c @@ -1,5 +1,5 @@ /* PR c/85696 */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #ifndef __cplusplus void foo (int n, int a[][n]) diff --git a/gcc/testsuite/c-c++-common/gomp/pr85956.c b/gcc/testsuite/c-c++-common/gomp/pr85956.c index bfbf1e302cff..8f96e2d8ff7a 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr85956.c +++ b/gcc/testsuite/c-c++-common/gomp/pr85956.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/pr98187.c b/gcc/testsuite/c-c++-common/gomp/pr98187.c index fc252fd7e91e..a4f865dec69b 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr98187.c +++ b/gcc/testsuite/c-c++-common/gomp/pr98187.c @@ -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 diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-1.c b/gcc/testsuite/c-c++-common/gomp/pr99928-1.c index b4aa8dd61ecd..11be0b5653bc 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-1.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-1.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-10.c b/gcc/testsuite/c-c++-common/gomp/pr99928-10.c index 4366863c5793..e763896d4196 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-10.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-10.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-11.c b/gcc/testsuite/c-c++-common/gomp/pr99928-11.c index 66c2feb36d3e..0bead490daf6 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-11.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-11.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-12.c b/gcc/testsuite/c-c++-common/gomp/pr99928-12.c index be0c5c0315df..ec758a42ef31 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-12.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-12.c @@ -1,6 +1,6 @@ /* PR middle-end/99928 */ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } int foo (void) { diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-13.c b/gcc/testsuite/c-c++-common/gomp/pr99928-13.c index d45417fec8aa..a3f8c41da357 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-13.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-13.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-14.c b/gcc/testsuite/c-c++-common/gomp/pr99928-14.c index 2df78919de94..9d2c43178b86 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-14.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-14.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-2.c b/gcc/testsuite/c-c++-common/gomp/pr99928-2.c index 1af9bd2c4be2..0eb766bff5e4 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-2.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-2.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-3.c b/gcc/testsuite/c-c++-common/gomp/pr99928-3.c index 8e8cf938ef6c..6e4186206887 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-3.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-3.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-4.c b/gcc/testsuite/c-c++-common/gomp/pr99928-4.c index 915a8657b91f..3bc2f604ec8a 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-4.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-4.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-5.c b/gcc/testsuite/c-c++-common/gomp/pr99928-5.c index 26da0ac433a1..88ee84d88078 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-5.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-5.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-6.c b/gcc/testsuite/c-c++-common/gomp/pr99928-6.c index d37587c13133..f0556793b287 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-6.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-6.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-7.c b/gcc/testsuite/c-c++-common/gomp/pr99928-7.c index e6e0e929dd23..20b178f243d4 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-7.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-7.c @@ -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) diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-8.c b/gcc/testsuite/c-c++-common/gomp/pr99928-8.c index ad36f3ede542..b4762c55a962 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-8.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-8.c @@ -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; diff --git a/gcc/testsuite/c-c++-common/gomp/pr99928-9.c b/gcc/testsuite/c-c++-common/gomp/pr99928-9.c index a7d970ac157d..75ce826c4511 100644 --- a/gcc/testsuite/c-c++-common/gomp/pr99928-9.c +++ b/gcc/testsuite/c-c++-common/gomp/pr99928-9.c @@ -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]; diff --git a/gcc/testsuite/c-c++-common/gomp/task-detach-1.c b/gcc/testsuite/c-c++-common/gomp/task-detach-1.c index 4558bc1f89cb..0c7bcd13b4f9 100644 --- a/gcc/testsuite/c-c++-common/gomp/task-detach-1.c +++ b/gcc/testsuite/c-c++-common/gomp/task-detach-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fopenmp" } */ +/* { dg-options "-fopenmp -Wno-deprecated-openmp" } */ typedef enum omp_event_handle_t { diff --git a/gcc/testsuite/c-c++-common/gomp/teams-2.c b/gcc/testsuite/c-c++-common/gomp/teams-2.c index 85a5be7ca53a..12fb79285689 100644 --- a/gcc/testsuite/c-c++-common/gomp/teams-2.c +++ b/gcc/testsuite/c-c++-common/gomp/teams-2.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (void) { diff --git a/gcc/testsuite/g++.dg/gomp/attrs-1.C b/gcc/testsuite/g++.dg/gomp/attrs-1.C index dd33b0736148..618fd14069ae 100644 --- a/gcc/testsuite/g++.dg/gomp/attrs-1.C +++ b/gcc/testsuite/g++.dg/gomp/attrs-1.C @@ -1,5 +1,5 @@ // { dg-do compile { target c++11 } } - +// { dg-additional-options "-Wno-deprecated-openmp" } typedef enum omp_allocator_handle_t : __UINTPTR_TYPE__ { diff --git a/gcc/testsuite/g++.dg/gomp/attrs-2.C b/gcc/testsuite/g++.dg/gomp/attrs-2.C index 541afeb7ff4b..4f31bc89f10b 100644 --- a/gcc/testsuite/g++.dg/gomp/attrs-2.C +++ b/gcc/testsuite/g++.dg/gomp/attrs-2.C @@ -1,5 +1,5 @@ // { dg-do compile { target c++11 } } - +// { dg-additional-options "-Wno-deprecated-openmp" } typedef enum omp_allocator_handle_t : __UINTPTR_TYPE__ { diff --git a/gcc/testsuite/g++.dg/gomp/attrs-4.C b/gcc/testsuite/g++.dg/gomp/attrs-4.C index a730ad7db503..05eae2dff49a 100644 --- a/gcc/testsuite/g++.dg/gomp/attrs-4.C +++ b/gcc/testsuite/g++.dg/gomp/attrs-4.C @@ -1,5 +1,5 @@ // { dg-do compile { target c++11 } } - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (int x) { diff --git a/gcc/testsuite/g++.dg/gomp/block-0.C b/gcc/testsuite/g++.dg/gomp/block-0.C index 7a9d2bfb94ef..0e1994574d0c 100644 --- a/gcc/testsuite/g++.dg/gomp/block-0.C +++ b/gcc/testsuite/g++.dg/gomp/block-0.C @@ -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() diff --git a/gcc/testsuite/g++.dg/gomp/block-10.C b/gcc/testsuite/g++.dg/gomp/block-10.C index 4aa41cdf2e29..748b4899ab3d 100644 --- a/gcc/testsuite/g++.dg/gomp/block-10.C +++ b/gcc/testsuite/g++.dg/gomp/block-10.C @@ -1,5 +1,5 @@ // { dg-do compile } - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo(int i) { int j; diff --git a/gcc/testsuite/g++.dg/gomp/block-5.C b/gcc/testsuite/g++.dg/gomp/block-5.C index 985e761d3855..c26f88c92735 100644 --- a/gcc/testsuite/g++.dg/gomp/block-5.C +++ b/gcc/testsuite/g++.dg/gomp/block-5.C @@ -1,5 +1,5 @@ // { dg-do compile } - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo() { #pragma omp master diff --git a/gcc/testsuite/g++.dg/gomp/block-9.C b/gcc/testsuite/g++.dg/gomp/block-9.C index 1de40a983f95..4bd073711092 100644 --- a/gcc/testsuite/g++.dg/gomp/block-9.C +++ b/gcc/testsuite/g++.dg/gomp/block-9.C @@ -1,5 +1,5 @@ // { dg-do compile } - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo(int i) { int j; diff --git a/gcc/testsuite/g++.dg/gomp/depend-iterator-1.C b/gcc/testsuite/g++.dg/gomp/depend-iterator-1.C index d12670c51594..f9d6a1aae96b 100644 --- a/gcc/testsuite/g++.dg/gomp/depend-iterator-1.C +++ b/gcc/testsuite/g++.dg/gomp/depend-iterator-1.C @@ -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; diff --git a/gcc/testsuite/g++.dg/gomp/master-1.C b/gcc/testsuite/g++.dg/gomp/master-1.C index 2681c216a3ff..00adb6904ccd 100644 --- a/gcc/testsuite/g++.dg/gomp/master-1.C +++ b/gcc/testsuite/g++.dg/gomp/master-1.C @@ -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 diff --git a/gcc/testsuite/g++.dg/gomp/master-2.C b/gcc/testsuite/g++.dg/gomp/master-2.C index 053206627249..8a9cbd2b5681 100644 --- a/gcc/testsuite/g++.dg/gomp/master-2.C +++ b/gcc/testsuite/g++.dg/gomp/master-2.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void f1(void) { #pragma omp master asdf /* { dg-error "expected" } */ diff --git a/gcc/testsuite/g++.dg/gomp/master-3.C b/gcc/testsuite/g++.dg/gomp/master-3.C index fe79a3390400..c396128afdb0 100644 --- a/gcc/testsuite/g++.dg/gomp/master-3.C +++ b/gcc/testsuite/g++.dg/gomp/master-3.C @@ -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); diff --git a/gcc/testsuite/g++.dg/gomp/method-1.C b/gcc/testsuite/g++.dg/gomp/method-1.C index 3d8235656b17..696fd8fddfd3 100644 --- a/gcc/testsuite/g++.dg/gomp/method-1.C +++ b/gcc/testsuite/g++.dg/gomp/method-1.C @@ -1,6 +1,6 @@ /* PR c++/24513 */ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } struct S { void foo (int *p) diff --git a/gcc/testsuite/g++.dg/gomp/pr29965-3.C b/gcc/testsuite/g++.dg/gomp/pr29965-3.C index b98c24e5505c..fd340cb87dc5 100644 --- a/gcc/testsuite/g++.dg/gomp/pr29965-3.C +++ b/gcc/testsuite/g++.dg/gomp/pr29965-3.C @@ -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)); diff --git a/gcc/testsuite/g++.dg/gomp/pr29965-9.C b/gcc/testsuite/g++.dg/gomp/pr29965-9.C index b66a24729280..828eeef785db 100644 --- a/gcc/testsuite/g++.dg/gomp/pr29965-9.C +++ b/gcc/testsuite/g++.dg/gomp/pr29965-9.C @@ -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 () diff --git a/gcc/testsuite/g++.dg/gomp/pr78363-4.C b/gcc/testsuite/g++.dg/gomp/pr78363-4.C index 54d00788ff70..daf3889f5ea3 100644 --- a/gcc/testsuite/g++.dg/gomp/pr78363-4.C +++ b/gcc/testsuite/g++.dg/gomp/pr78363-4.C @@ -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() { diff --git a/gcc/testsuite/g++.dg/gomp/pr78363-6.C b/gcc/testsuite/g++.dg/gomp/pr78363-6.C index e49ef0628d04..3348a8786437 100644 --- a/gcc/testsuite/g++.dg/gomp/pr78363-6.C +++ b/gcc/testsuite/g++.dg/gomp/pr78363-6.C @@ -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() { diff --git a/gcc/testsuite/g++.dg/gomp/pr79664.C b/gcc/testsuite/g++.dg/gomp/pr79664.C index fb0469407643..974d4a57a9a9 100644 --- a/gcc/testsuite/g++.dg/gomp/pr79664.C +++ b/gcc/testsuite/g++.dg/gomp/pr79664.C @@ -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 () { diff --git a/gcc/testsuite/g++.dg/gomp/pr94477.C b/gcc/testsuite/g++.dg/gomp/pr94477.C index e7fdc23d6d38..3b0116a4120e 100644 --- a/gcc/testsuite/g++.dg/gomp/pr94477.C +++ b/gcc/testsuite/g++.dg/gomp/pr94477.C @@ -1,6 +1,6 @@ // PR c++/94477 // { dg-do compile } - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (); template diff --git a/gcc/testsuite/g++.dg/gomp/pr94512.C b/gcc/testsuite/g++.dg/gomp/pr94512.C index 1d5cf1509875..2d7c5f84c56d 100644 --- a/gcc/testsuite/g++.dg/gomp/pr94512.C +++ b/gcc/testsuite/g++.dg/gomp/pr94512.C @@ -1,5 +1,5 @@ // PR c++/94512 - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (); diff --git a/gcc/testsuite/g++.dg/gomp/tpl-master-1.C b/gcc/testsuite/g++.dg/gomp/tpl-master-1.C index 756cdbcbcb96..1d58ca097341 100644 --- a/gcc/testsuite/g++.dg/gomp/tpl-master-1.C +++ b/gcc/testsuite/g++.dg/gomp/tpl-master-1.C @@ -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; diff --git a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.12.1.c b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.12.1.c index fab948dd7368..b4361d72a2b2 100644 --- a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.12.1.c +++ b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.12.1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include extern float average (float, float, float); void diff --git a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.33.2.c b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.33.2.c index a0da739dd84f..1edd971aaa03 100644 --- a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.33.2.c +++ b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.33.2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include float diff --git a/gcc/testsuite/gcc.dg/gomp/attrs-1.c b/gcc/testsuite/gcc.dg/gomp/attrs-1.c index 329b41a678d7..a29facc0972e 100644 --- a/gcc/testsuite/gcc.dg/gomp/attrs-1.c +++ b/gcc/testsuite/gcc.dg/gomp/attrs-1.c @@ -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" diff --git a/gcc/testsuite/gcc.dg/gomp/attrs-2.c b/gcc/testsuite/gcc.dg/gomp/attrs-2.c index 56eb70a3dc12..cf89fd5a18d8 100644 --- a/gcc/testsuite/gcc.dg/gomp/attrs-2.c +++ b/gcc/testsuite/gcc.dg/gomp/attrs-2.c @@ -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" diff --git a/gcc/testsuite/gcc.dg/gomp/attrs-4.c b/gcc/testsuite/gcc.dg/gomp/attrs-4.c index 5d422b3ba72a..d5cdd68fef51 100644 --- a/gcc/testsuite/gcc.dg/gomp/attrs-4.c +++ b/gcc/testsuite/gcc.dg/gomp/attrs-4.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fopenmp -std=c23" } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (int x) { diff --git a/gcc/testsuite/gcc.dg/gomp/block-10.c b/gcc/testsuite/gcc.dg/gomp/block-10.c index 29c2d91431f7..c590f262588a 100644 --- a/gcc/testsuite/gcc.dg/gomp/block-10.c +++ b/gcc/testsuite/gcc.dg/gomp/block-10.c @@ -1,5 +1,5 @@ // { dg-do compile } - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo(int i) { int j; diff --git a/gcc/testsuite/gcc.dg/gomp/block-5.c b/gcc/testsuite/gcc.dg/gomp/block-5.c index 7f3b37c8d22c..d16ae4f5839f 100644 --- a/gcc/testsuite/gcc.dg/gomp/block-5.c +++ b/gcc/testsuite/gcc.dg/gomp/block-5.c @@ -1,5 +1,5 @@ // { dg-do compile } - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo() { #pragma omp master diff --git a/gcc/testsuite/gcc.dg/gomp/block-9.c b/gcc/testsuite/gcc.dg/gomp/block-9.c index 202599f2ae2e..d97af5dbf846 100644 --- a/gcc/testsuite/gcc.dg/gomp/block-9.c +++ b/gcc/testsuite/gcc.dg/gomp/block-9.c @@ -1,5 +1,5 @@ // { dg-do compile } - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo(int i) { int j; diff --git a/gcc/testsuite/gcc.dg/gomp/master-1.c b/gcc/testsuite/gcc.dg/gomp/master-1.c index 2681c216a3ff..2f5a4ae86437 100644 --- a/gcc/testsuite/gcc.dg/gomp/master-1.c +++ b/gcc/testsuite/gcc.dg/gomp/master-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } extern void bar(int); void foo (void) diff --git a/gcc/testsuite/gcc.dg/gomp/master-2.c b/gcc/testsuite/gcc.dg/gomp/master-2.c index 3b0bdfc90a46..410dc902635f 100644 --- a/gcc/testsuite/gcc.dg/gomp/master-2.c +++ b/gcc/testsuite/gcc.dg/gomp/master-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void f1(void) { #pragma omp master asdf /* { dg-error "expected" } */ diff --git a/gcc/testsuite/gcc.dg/gomp/master-3.c b/gcc/testsuite/gcc.dg/gomp/master-3.c index 3cdadc83aa40..5c0544dfa3cd 100644 --- a/gcc/testsuite/gcc.dg/gomp/master-3.c +++ b/gcc/testsuite/gcc.dg/gomp/master-3.c @@ -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); diff --git a/gcc/testsuite/gcc.dg/gomp/nesting-1.c b/gcc/testsuite/gcc.dg/gomp/nesting-1.c index ed457ced44ce..931c0d49892f 100644 --- a/gcc/testsuite/gcc.dg/gomp/nesting-1.c +++ b/gcc/testsuite/gcc.dg/gomp/nesting-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fopenmp" } */ +/* { dg-options "-fopenmp -Wno-deprecated-openmp" } */ void f1 (void) diff --git a/gcc/testsuite/gcc.dg/gomp/pr104517.c b/gcc/testsuite/gcc.dg/gomp/pr104517.c index 7e3bd1a1d1e1..e62dfafb2471 100644 --- a/gcc/testsuite/gcc.dg/gomp/pr104517.c +++ b/gcc/testsuite/gcc.dg/gomp/pr104517.c @@ -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 { diff --git a/gcc/testsuite/gcc.dg/gomp/pr29965-3.c b/gcc/testsuite/gcc.dg/gomp/pr29965-3.c index 5901f5f42c21..68a08c0c2452 100644 --- a/gcc/testsuite/gcc.dg/gomp/pr29965-3.c +++ b/gcc/testsuite/gcc.dg/gomp/pr29965-3.c @@ -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)); diff --git a/gcc/testsuite/gcc.dg/gomp/pr35818.c b/gcc/testsuite/gcc.dg/gomp/pr35818.c index b2165eb3973d..ea6a223e442c 100644 --- a/gcc/testsuite/gcc.dg/gomp/pr35818.c +++ b/gcc/testsuite/gcc.dg/gomp/pr35818.c @@ -1,6 +1,6 @@ /* PR middle-end/35818 */ /* { dg-do compile } */ -/* { dg-options "-fopenmp" } */ +/* { dg-options "-fopenmp -Wno-deprecated-openmp" } */ extern int a[]; diff --git a/gcc/testsuite/gcc.dg/gomp/pr91216.c b/gcc/testsuite/gcc.dg/gomp/pr91216.c index 3fcc1355568e..965a93a20548 100644 --- a/gcc/testsuite/gcc.dg/gomp/pr91216.c +++ b/gcc/testsuite/gcc.dg/gomp/pr91216.c @@ -1,5 +1,5 @@ /* PR middle-end/91216 */ - +// { dg-additional-options "-Wno-deprecated-openmp" } int r; void diff --git a/gcc/testsuite/gcc.dg/gomp/sharing-2.c b/gcc/testsuite/gcc.dg/gomp/sharing-2.c index 33bbb3bade89..f74813197150 100644 --- a/gcc/testsuite/gcc.dg/gomp/sharing-2.c +++ b/gcc/testsuite/gcc.dg/gomp/sharing-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } void foo (void) { diff --git a/gcc/testsuite/gfortran.dg/gomp/adjust-args-10.f90 b/gcc/testsuite/gfortran.dg/gomp/adjust-args-10.f90 index 3b649b5d7d0e..3c9ce183ff00 100644 --- a/gcc/testsuite/gfortran.dg/gomp/adjust-args-10.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/adjust-args-10.f90 @@ -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 diff --git a/gcc/testsuite/gfortran.dg/gomp/affinity-1.f90 b/gcc/testsuite/gfortran.dg/gomp/affinity-1.f90 index cb1543b6b189..bf8c4d40593e 100644 --- a/gcc/testsuite/gfortran.dg/gomp/affinity-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/affinity-1.f90 @@ -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 diff --git a/gcc/testsuite/gfortran.dg/gomp/allocate-clause.f90 b/gcc/testsuite/gfortran.dg/gomp/allocate-clause.f90 index b60bca0a1264..2394691c74cf 100644 --- a/gcc/testsuite/gfortran.dg/gomp/allocate-clause.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/allocate-clause.f90 @@ -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 diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.12.1.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.12.1.f90 index 38389e4f4a6f..353bc3595263 100644 --- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.12.1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.12.1.f90 @@ -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 diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.2.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.2.f90 index ced23c856b4d..f1dd58538a58 100644 --- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.2.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.2.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } - +! { dg-additional-options "-Wno-deprecated-openmp" } REAL FUNCTION READ_NEXT() REAL, POINTER :: TMP !$OMP SINGLE diff --git a/gcc/testsuite/gfortran.dg/gomp/c_ptr_tests_20.f90 b/gcc/testsuite/gfortran.dg/gomp/c_ptr_tests_20.f90 index 777181cece0e..e5b7eaad70a0 100644 --- a/gcc/testsuite/gfortran.dg/gomp/c_ptr_tests_20.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/c_ptr_tests_20.f90 @@ -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 diff --git a/gcc/testsuite/gfortran.dg/gomp/c_ptr_tests_21.f90 b/gcc/testsuite/gfortran.dg/gomp/c_ptr_tests_21.f90 index b41073616355..6f4a21567214 100644 --- a/gcc/testsuite/gfortran.dg/gomp/c_ptr_tests_21.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/c_ptr_tests_21.f90 @@ -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 diff --git a/gcc/testsuite/gfortran.dg/gomp/cancel-1.f90 b/gcc/testsuite/gfortran.dg/gomp/cancel-1.f90 index 1bfddc7b9db0..3a693d2cf8fa 100644 --- a/gcc/testsuite/gfortran.dg/gomp/cancel-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/cancel-1.f90 @@ -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" } diff --git a/gcc/testsuite/gfortran.dg/gomp/clauses-1.f90 b/gcc/testsuite/gfortran.dg/gomp/clauses-1.f90 index 92801852984d..0c91ae5ff3ea 100644 --- a/gcc/testsuite/gfortran.dg/gomp/clauses-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/clauses-1.f90 @@ -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) diff --git a/gcc/testsuite/gfortran.dg/gomp/declare-variant-1.f90 b/gcc/testsuite/gfortran.dg/gomp/declare-variant-1.f90 index 9b68397d190a..d28886cc1320 100644 --- a/gcc/testsuite/gfortran.dg/gomp/declare-variant-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/declare-variant-1.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } module main implicit none diff --git a/gcc/testsuite/gfortran.dg/gomp/depend-iterator-1.f90 b/gcc/testsuite/gfortran.dg/gomp/depend-iterator-1.f90 index d852b95f1c23..961284b7b2d3 100644 --- a/gcc/testsuite/gfortran.dg/gomp/depend-iterator-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/depend-iterator-1.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } - +! { dg-additional-options "-Wno-deprecated-openmp" } module mymod implicit none (type, external) integer, target :: var(0:5) = [0,1,2,3,4,5] diff --git a/gcc/testsuite/gfortran.dg/gomp/depend-iterator-2.f90 b/gcc/testsuite/gfortran.dg/gomp/depend-iterator-2.f90 index cadd9a06cfec..9922ae5f1516 100644 --- a/gcc/testsuite/gfortran.dg/gomp/depend-iterator-2.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/depend-iterator-2.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } - +! { dg-additional-options "-Wno-deprecated-openmp" } module mymod implicit none (type, external) integer, target :: var(0:5) = [0,1,2,3,4,5] diff --git a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-1.f90 b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-1.f90 index 1d3a0d8cd334..a1bde76a6d6b 100644 --- a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-1.f90 @@ -7,21 +7,22 @@ subroutine test(b,c,d) integer, target :: a(5) - !$omp target is_device_ptr(a) ! Valid since OpenMP 5.1 + !$omp target is_device_ptr(a) ! { dg-warning "Non-C_PTR type argument at \\(1\\) is deprecated, use HAS_DEVICE_ADDR \\\[-Wdeprecated-openmp\\\]" } + !$omp end target - !$omp target is_device_ptr(b) ! Valid since OpenMP 5.1 + !$omp target is_device_ptr(b) ! { dg-warning "Non-C_PTR type argument at \\(1\\) is deprecated, use HAS_DEVICE_ADDR \\\[-Wdeprecated-openmp\\\]" } !$omp end target - !$omp target is_device_ptr(c) ! Valid since OpenMP 5.1 + !$omp target is_device_ptr(c) ! { dg-warning "Non-C_PTR type argument at \\(1\\) is deprecated, use HAS_DEVICE_ADDR \\\[-Wdeprecated-openmp\\\]" } !$omp end target - !$omp target is_device_ptr(d) ! Valid since OpenMP 5.1 + !$omp target is_device_ptr(d) ! { dg-warning "Non-C_PTR type argument at \\(1\\) is deprecated, use HAS_DEVICE_ADDR \\\[-Wdeprecated-openmp\\\]" } !$omp end target !$omp target data map(a) use_device_addr(a) ! Should be okay !$omp end target data - !$omp target data map(c) use_device_ptr(c) ! Should be okay + !$omp target data map(c) use_device_ptr(c) ! { dg-warning "Non-C_PTR type argument at \\(1\\) is deprecated, use USE_DEVICE_ADDR \\\[-Wdeprecated-openmp\\\]" } !$omp end target data end subroutine test diff --git a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-2.f90 b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-2.f90 index 0762e5755e1d..05778c242119 100644 --- a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-2.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-2.f90 @@ -7,8 +7,8 @@ subroutine abc(cc) !$omp target enter data map(to: cc, dd) - !$omp target data use_device_addr(cc) use_device_ptr(dd) - !$omp target is_device_ptr(cc, dd) ! Valid since OpenMP 5.1 + !$omp target data use_device_addr(cc) use_device_ptr(dd) ! { dg-warning "Non-C_PTR type argument at \\(1\\) is deprecated, use USE_DEVICE_ADDR \\\[-Wdeprecated-openmp\\\]" } + !$omp target is_device_ptr(cc, dd) ! { dg-warning "Non-C_PTR type argument at \\(1\\) is deprecated, use HAS_DEVICE_ADDR \\\[-Wdeprecated-openmp\\\]" } if (cc /= 131 .or. dd /= 484) stop 1 cc = 44 dd = 45 diff --git a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f90 b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f90 index 7b5b27baa728..a067a37ca881 100644 --- a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f90 @@ -2,7 +2,6 @@ ! { dg-do compile } ! { dg-additional-options "-fdump-tree-gimple" } - program main use iso_c_binding implicit none @@ -14,8 +13,8 @@ contains subroutine foo (a, b) integer, target :: a, b - !$omp target data map(a, b) use_device_ptr(a, b) - !$omp target is_device_ptr(a, b) + !$omp target data map(a, b) use_device_ptr(a, b) ! { dg-warning "Non-C_PTR type argument at \\(1\\) is deprecated, use USE_DEVICE_ADDR \\\[-Wdeprecated-openmp\\\]" } + !$omp target is_device_ptr(a, b) ! { dg-warning "Non-C_PTR type argument at \\(1\\) is deprecated, use HAS_DEVICE_ADDR \\\[-Wdeprecated-openmp\\\]" } a = 42 !$omp end target !$omp end target data diff --git a/gcc/testsuite/gfortran.dg/gomp/lastprivate-conditional-1.f90 b/gcc/testsuite/gfortran.dg/gomp/lastprivate-conditional-1.f90 index 7a024061ec64..457afd0fe894 100644 --- a/gcc/testsuite/gfortran.dg/gomp/lastprivate-conditional-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/lastprivate-conditional-1.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } subroutine foo (p) implicit none logical :: p(:) diff --git a/gcc/testsuite/gfortran.dg/gomp/loop-4.f90 b/gcc/testsuite/gfortran.dg/gomp/loop-4.f90 index 73745893c698..8438bb0ec99d 100644 --- a/gcc/testsuite/gfortran.dg/gomp/loop-4.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/loop-4.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } module m use iso_c_binding, only: c_loc implicit none (type, external) @@ -36,7 +37,7 @@ subroutine f2 (a) do j = 0, 63 a(64 * i + j) = i + j end do - end do + end do end subroutine f3 (a) diff --git a/gcc/testsuite/gfortran.dg/gomp/loop-exit.f90 b/gcc/testsuite/gfortran.dg/gomp/loop-exit.f90 index 81eebcba66af..bf0e154bc561 100644 --- a/gcc/testsuite/gfortran.dg/gomp/loop-exit.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/loop-exit.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } subroutine sub1 !$omp do outer: do i = 1, 5 diff --git a/gcc/testsuite/gfortran.dg/gomp/map-3.f90 b/gcc/testsuite/gfortran.dg/gomp/map-3.f90 index 2f0a79288197..53026de82ad4 100644 --- a/gcc/testsuite/gfortran.dg/gomp/map-3.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/map-3.f90 @@ -1,4 +1,4 @@ -! { dg-additional-options "-fdump-tree-original" } +! { dg-additional-options "-fdump-tree-original -Wno-deprecated-openmp" } subroutine bar integer, target :: x, x2 @@ -25,9 +25,10 @@ call foo3(y) !$omp end target data !$omp target data map(z) use_device_ptr(z) + call foo3(z) !$omp end target data -end +end ! { dg-final { scan-tree-dump-times "#pragma omp target enter data map\\(to:x\\)" 1 "original" } } ! { dg-final { scan-tree-dump-times "#pragma omp target data map\\(always,to:x\\)" 1 "original" } } diff --git a/gcc/testsuite/gfortran.dg/gomp/master-construct-dep.f90 b/gcc/testsuite/gfortran.dg/gomp/master-construct-dep.f90 new file mode 100644 index 000000000000..3f588017ec13 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/master-construct-dep.f90 @@ -0,0 +1,18 @@ +! { dg-additional-options "-Wno-openmp" } +PROGRAM master_construct_dep + INTEGER X + INTEGER Y + X = 0 + Y = 8 +!$OMP PARALLEL + DO WHILE( Y > 0 ) +!$OMP SINGLE + Y = Y - 1 +!$OMP END SINGLE +!$OMP MASTER ! { dg-warning "'master' construct at \\(1\\) deprecated since OpenMP 5.1, use 'masked' \\\[-Wdeprecated-openmp\\\]" } + X = X + 1 +!$OMP END MASTER +!$OMP BARRIER + ENDDO +!$OMP END PARALLEL +END PROGRAM diff --git a/gcc/testsuite/gfortran.dg/gomp/nesting-2.f90 b/gcc/testsuite/gfortran.dg/gomp/nesting-2.f90 index d8014d6f151a..cffe9373bbe4 100644 --- a/gcc/testsuite/gfortran.dg/gomp/nesting-2.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/nesting-2.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } subroutine foo integer :: i, j !$omp taskloop diff --git a/gcc/testsuite/gfortran.dg/gomp/nesting-3.f90 b/gcc/testsuite/gfortran.dg/gomp/nesting-3.f90 index 5d0d20079a89..7ad73486f6de 100644 --- a/gcc/testsuite/gfortran.dg/gomp/nesting-3.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/nesting-3.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } subroutine f1 integer i, j !$omp do diff --git a/gcc/testsuite/gfortran.dg/gomp/nowait-2.f90 b/gcc/testsuite/gfortran.dg/gomp/nowait-2.f90 index c6881171e5d1..c3125af250ad 100644 --- a/gcc/testsuite/gfortran.dg/gomp/nowait-2.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/nowait-2.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } ! Cross check that it is accepted without nowait subroutine bar() implicit none diff --git a/gcc/testsuite/gfortran.dg/gomp/nowait-4.f90 b/gcc/testsuite/gfortran.dg/gomp/nowait-4.f90 index bebb9d7fb8f2..2629dc4725d0 100644 --- a/gcc/testsuite/gfortran.dg/gomp/nowait-4.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/nowait-4.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } ! invalid nowait subroutine foo diff --git a/gcc/testsuite/gfortran.dg/gomp/nowait-5.f90 b/gcc/testsuite/gfortran.dg/gomp/nowait-5.f90 index c6881171e5d1..c3125af250ad 100644 --- a/gcc/testsuite/gfortran.dg/gomp/nowait-5.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/nowait-5.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } ! Cross check that it is accepted without nowait subroutine bar() implicit none diff --git a/gcc/testsuite/gfortran.dg/gomp/openmp-simd-2.f90 b/gcc/testsuite/gfortran.dg/gomp/openmp-simd-2.f90 index e218a3b4e3c4..8471325be8e9 100644 --- a/gcc/testsuite/gfortran.dg/gomp/openmp-simd-2.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/openmp-simd-2.f90 @@ -1,5 +1,6 @@ ! { dg-do compile } ! { dg-options "-fopenmp -fopenmp-simd -fdump-tree-original -O2" } +! { dg-additional-options "-Wno-deprecated-openmp" } include 'openmp-simd-1.f90' diff --git a/gcc/testsuite/gfortran.dg/gomp/openmp-simd-3.f90 b/gcc/testsuite/gfortran.dg/gomp/openmp-simd-3.f90 index cbf757e20e5b..af2f7bd8a1e0 100644 --- a/gcc/testsuite/gfortran.dg/gomp/openmp-simd-3.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/openmp-simd-3.f90 @@ -1,5 +1,6 @@ ! { dg-do compile } ! { dg-options "-fopenmp -fno-openmp-simd -fdump-tree-original -O2" } +! { dg-additional-options "-Wno-deprecated-openmp" } include 'openmp-simd-1.f90' diff --git a/gcc/testsuite/gfortran.dg/gomp/parallel-master-1.f90 b/gcc/testsuite/gfortran.dg/gomp/parallel-master-1.f90 index 2ccc18f0c736..327a662f0bf9 100644 --- a/gcc/testsuite/gfortran.dg/gomp/parallel-master-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/parallel-master-1.f90 @@ -1,9 +1,9 @@ -! { dg-additional-options "-fdump-tree-original" } +! { dg-additional-options "-fdump-tree-original -Wno-deprecated-openmp" } implicit none integer :: k, p, s, r, nth, t, f logical(kind=2) l2 !$omp threadprivate (t) - + external bar !$omp parallel master default(none) private (k) call bar (k) diff --git a/gcc/testsuite/gfortran.dg/gomp/parallel-master-2.f90 b/gcc/testsuite/gfortran.dg/gomp/parallel-master-2.f90 index 2e12de63a102..350dfa93b6e5 100644 --- a/gcc/testsuite/gfortran.dg/gomp/parallel-master-2.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/parallel-master-2.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } use iso_c_binding, only: c_intptr_t implicit none (external, type) integer, parameter :: omp_event_handle_kind = c_intptr_t @@ -6,4 +7,4 @@ !$omp task detach (x) ! { dg-error "'x' not specified in enclosing 'parallel'" } !$omp end task !$omp end parallel master -end +end diff --git a/gcc/testsuite/gfortran.dg/gomp/pr107214-8.f90 b/gcc/testsuite/gfortran.dg/gomp/pr107214-8.f90 index 192c97a33e5c..96a390e0a18d 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr107214-8.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr107214-8.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } - +! { dg-additional-options "-Wno-deprecated-openmp" } integer, allocatable :: x integer, pointer :: y @@ -13,6 +13,7 @@ integer, pointer :: y !$omp end target !$omp target firstprivate(y) is_device_ptr(y) ! { dg-error "Symbol 'y' present on multiple clauses" } + !$omp end target end diff --git a/gcc/testsuite/gfortran.dg/gomp/pr48117.f90 b/gcc/testsuite/gfortran.dg/gomp/pr48117.f90 index bc8ad9bc35eb..899549d2da49 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr48117.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr48117.f90 @@ -1,7 +1,7 @@ ! PR fortran/48117 ! { dg-do compile } ! { dg-options "-O2 -fopenmp" } - +! { dg-additional-options "-Wno-deprecated-openmp" } subroutine foo(x) character(len=*), optional :: x character(len=80) :: v diff --git a/gcc/testsuite/gfortran.dg/gomp/pr94672.f90 b/gcc/testsuite/gfortran.dg/gomp/pr94672.f90 index d1b066ca1efd..a94f24d301c4 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr94672.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr94672.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } - +! { dg-additional-options "-Wno-deprecated-openmp" } SUBROUTINE foo(n,array) IMPLICIT NONE INTEGER, INTENT (IN) :: n diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-1.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-1.f90 index b61b2fc32b7f..a58df2df0aa4 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr99928-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-1.f90 @@ -1,7 +1,7 @@ ! PR middle-end/99928 ! { dg-do compile } ! { dg-options "-fopenmp -fdump-tree-gimple" } - +! { dg-additional-options "-Wno-deprecated-openmp" } module m implicit none integer :: f00, f01, f02, f03, f04, f05, f06, f07, f08, f09 @@ -13,15 +13,15 @@ contains subroutine foo () integer :: i ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*firstprivate\\(f00\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f00\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f00\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f00\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f00\\)" "gimple" } } ! FIXME. !$omp distribute parallel do firstprivate (f00) default(none) do i = 1, 64 f00 = f00 + 1 end do ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*firstprivate\\(f01\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f01\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f01\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f01\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f01\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f01\\)" "gimple" } } !$omp distribute parallel do simd firstprivate (f01) default(none) do i = 1, 64 @@ -58,14 +58,14 @@ subroutine bar () do i = 1, 64 f05 = f05 + 1 end do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f06\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f06\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f06\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f06\\)" "gimple" } } ! FIXME. !$omp parallel do firstprivate (f06) default(none) do i = 1, 64 f06 = f06 + 1 end do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f07\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f07\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f07\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f07\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f07\\)" "gimple" } } !$omp parallel do simd firstprivate (f07) default(none) do i = 1, 64 @@ -112,15 +112,15 @@ subroutine bar () f13 = f13 + 1 !$omp end target parallel ! { dg-final { scan-tree-dump "omp target\[^\n\r]*firstprivate\\(f14\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f14\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f14\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f14\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f14\\)" "gimple" } } ! FIXME. !$omp target parallel do firstprivate (f14) default(none) defaultmap(none) do i = 1, 64 f14 = f14 + 1 end do ! { dg-final { scan-tree-dump "omp target\[^\n\r]*firstprivate\\(f15\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f15\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f15\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f15\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f15\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f15\\)" "gimple" } } !$omp target parallel do simd firstprivate (f15) default(none) defaultmap(none) do i = 1, 64 @@ -140,34 +140,34 @@ subroutine bar () f17 = f17 + 1 !$omp end target teams ! { dg-final { scan-tree-dump "omp target\[^\n\r]*firstprivate\\(f18\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f18\\)" "gimple" } } ! FIXME: This should be on distribute instead. - ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f18\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f18\\)" "gimple" } } ! FIXME: This should be on distribute instead. + ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f18\\)" "gimple" } } ! FIXME. !$omp target teams distribute firstprivate (f18) default(none) defaultmap(none) do i = 1, 64 f18 = f18 + 1 end do ! { dg-final { scan-tree-dump "omp target\[^\n\r]*firstprivate\\(f19\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f19\\)" "gimple" } } ! FIXME: This should be on distribute instead. - ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f19\\)" "gimple" } } ! FIXME. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f19\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f19\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f19\\)" "gimple" } } ! FIXME: This should be on distribute instead. + ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f19\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f19\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f19\\)" "gimple" } } ! FIXME. !$omp target teams distribute parallel do firstprivate (f19) default(none) defaultmap(none) do i = 1, 64 f19 = f19 + 1 end do ! { dg-final { scan-tree-dump "omp target\[^\n\r]*firstprivate\\(f20\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f20\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f20\\)" "gimple" } } ! FIXME. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f20\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f20\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f20\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f20\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f20\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f20\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f20\\)" "gimple" } } !$omp target teams distribute parallel do simd firstprivate (f20) default(none) defaultmap(none) do i = 1, 64 f20 = f20 + 1 end do ! { dg-final { scan-tree-dump "omp target\[^\n\r]*firstprivate\\(f21\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f21\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f21\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f21\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f21\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f21\\)" "gimple" } } !$omp target teams distribute simd firstprivate (f21) default(none) defaultmap(none) do i = 1, 64 @@ -176,7 +176,7 @@ subroutine bar () ! { dg-final { scan-tree-dump "omp target\[^\n\r]*firstprivate\\(f22\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f22\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f22\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(f22\\)" "gimple" } } ! NOTE: This is an implementation detail. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(f22\\)" "gimple" } } ! NOTE: This is an implementation detail. ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f22\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f22\\)" "gimple" } } !$omp target teams loop firstprivate (f22) default(none) defaultmap(none) @@ -196,31 +196,31 @@ subroutine bar () do i = 1, 64 f24 = f24 + 1 end do - ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f25\\)" "gimple" } } ! FIXME: This should be on distribute instead. - ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f25\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f25\\)" "gimple" } } ! FIXME: This should be on distribute instead. + ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f25\\)" "gimple" } } ! FIXME. !$omp teams distribute firstprivate (f25) default(none) do i = 1, 64 f25 = f25 + 1 end do - ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f26\\)" "gimple" } } ! FIXME: This should be on distribute instead. - ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f26\\)" "gimple" } } ! FIXME. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f26\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f26\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f26\\)" "gimple" } } ! FIXME: This should be on distribute instead. + ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f26\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f26\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f26\\)" "gimple" } } ! FIXME. !$omp teams distribute parallel do firstprivate (f26) default(none) do i = 1, 64 f26 = f26 + 1 end do - ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f27\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f27\\)" "gimple" } } ! FIXME. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f27\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f27\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f27\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f27\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(f27\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f27\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f27\\)" "gimple" } } !$omp teams distribute parallel do simd firstprivate (f27) default(none) do i = 1, 64 f27 = f27 + 1 end do - ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f28\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f28\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f28\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f28\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f28\\)" "gimple" } } !$omp teams distribute simd firstprivate (f28) default(none) do i = 1, 64 @@ -228,7 +228,7 @@ subroutine bar () end do ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*firstprivate\\(f29\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*firstprivate\\(f29\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(f29\\)" "gimple" } } ! NOTE: This is an implementation detail. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(f29\\)" "gimple" } } ! NOTE: This is an implementation detail. ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(f29\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(f29\\)" "gimple" } } !$omp teams loop firstprivate (f29) default(none) diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-11.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-11.f90 index 22a40e2b49c1..07447b695087 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr99928-11.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-11.f90 @@ -1,7 +1,7 @@ ! PR middle-end/99928 ! { dg-do compile } ! { dg-options "-fopenmp -fdump-tree-gimple" } - +! { dg-additional-options "-Wno-deprecated-openmp" } module m implicit none integer :: r00, r01, r02 @@ -30,6 +30,6 @@ subroutine bar () r02 = r02 + 1 end do ! FIXME: We don't support in_reduction clause on target yet, once we do, should - ! add testcase coverage for all combined/composite constructs with target as leaf construct. + ! add testcase coverage for all combined/composite constructs with target as leaf construct. end end module m diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-2.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-2.f90 index 7a9824865c28..71bd69077653 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr99928-2.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-2.f90 @@ -1,7 +1,7 @@ ! PR middle-end/99928 ! { dg-do compile } ! { dg-options "-fopenmp -fdump-tree-gimple" } - +! { dg-additional-options "-Wno-deprecated-openmp" } module m implicit none integer :: l00, l01, l02, l03, l04, l05, l06, l07 @@ -12,15 +12,15 @@ contains subroutine foo () integer :: i ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(l00\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l00\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l00\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l00\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l00\\)" "gimple" } } ! FIXME. !$omp distribute parallel do lastprivate (l00) default(none) do i = 1, 64 l00 = i end do ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(l01\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l01\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l01\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l01\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l01\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l01\\)" "gimple" } } !$omp distribute parallel do simd lastprivate (l01) default(none) do i = 1, 64 @@ -46,42 +46,42 @@ subroutine bar () l03 = i end do ! { dg-final { scan-tree-dump-not "omp master\[^\n\r]*lastprivate\\(l04\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(l04\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(l04\\)" "gimple" } } ! NOTE: This is implementation detail. ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*lastprivate\\(l04\\)" "gimple" } } !$omp master taskloop lastprivate (l04) default(none) do i = 1, 64 l04 = i end do ! { dg-final { scan-tree-dump-not "omp master\[^\n\r]*lastprivate\\(l05\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(l05\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(l05\\)" "gimple" } } ! NOTE: This is implementation detail. ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*lastprivate\\(l05\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l05\\)" "gimple" } } !$omp master taskloop simd lastprivate (l05) default(none) do i = 1, 64 l05 = i end do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l06\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l06\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l06\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l06\\)" "gimple" } } ! FIXME. !$omp parallel do lastprivate (l06) default(none) do i = 1, 64 l06 = i end do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l07\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l07\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l07\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l07\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l07\\)" "gimple" } } !$omp parallel do simd lastprivate (l07) default(none) do i = 1, 64 l07 = i end do ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(j00\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp for\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp for\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } ! NOTE: This is implementation detail. !$omp parallel loop lastprivate (j00) default(none) do j00 = 1, 64 end do ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(l08\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp master\[^\n\r]*lastprivate\\(l08\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(l08\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(l08\\)" "gimple" } } ! NOTE: This is implementation detail. ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*lastprivate\\(l08\\)" "gimple" } } !$omp parallel master taskloop lastprivate (l08) default(none) do i = 1, 64 @@ -89,15 +89,15 @@ subroutine bar () end do ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(l09\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp master\[^\n\r]*lastprivate\\(l09\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(l09\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(l09\\)" "gimple" } } ! NOTE: This is implementation detail. ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*lastprivate\\(l09\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l09\\)" "gimple" } } !$omp parallel master taskloop simd lastprivate (l09) default(none) do i = 1, 64 l09 = i end do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l10\\)" "gimple" } } ! FIXME: This should be on sections instead. - ! { dg-final { scan-tree-dump-not "omp sections\[^\n\r]*lastprivate\\(l10\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l10\\)" "gimple" } } ! FIXME: This should be on sections instead. + ! { dg-final { scan-tree-dump-not "omp sections\[^\n\r]*lastprivate\\(l10\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump-not "omp section \[^\n\r]*lastprivate\\(l10\\)" "gimple" } } !$omp parallel sections lastprivate (l10) default(none) l10 = 1 @@ -106,16 +106,16 @@ subroutine bar () !$omp end parallel sections ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:l11" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l11\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l11\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l11\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l11\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l11\\)" "gimple" } } ! FIXME. !$omp target parallel do lastprivate (l11) default(none) defaultmap(none) do i = 1, 64 l11 = i end do ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:l12" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l12\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l12\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l12\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l12\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l12\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l12\\)" "gimple" } } !$omp target parallel do simd lastprivate (l12) default(none) defaultmap(none) do i = 1, 64 @@ -124,8 +124,8 @@ subroutine bar () ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:j01" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(j01\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(j01\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp for\[^\n\r]*lastprivate\\(j01\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(j01\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp for\[^\n\r]*lastprivate\\(j01\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(j01\\)" "gimple" } } ! NOTE: This is implementation detail. !$omp target parallel loop lastprivate (j01) default(none) defaultmap(none) do j01 = 0, 64 end do @@ -141,8 +141,8 @@ subroutine bar () ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l14\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(l14\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(l14\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l14\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l14\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l14\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l14\\)" "gimple" } } ! FIXME. !$omp target teams distribute parallel do lastprivate (l14) default(none) defaultmap(none) do i = 1, 64 l14 = i @@ -151,8 +151,8 @@ subroutine bar () ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l15\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(l15\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(l15\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l15\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l15\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l15\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l15\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l15\\)" "gimple" } } !$omp target teams distribute parallel do simd lastprivate (l15) default(none) defaultmap(none) do i = 1, 64 @@ -170,10 +170,10 @@ subroutine bar () ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:j02" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(j02\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(j02\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(j02\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(j02\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp for\[^\n\r]*lastprivate\\(j02\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(j02\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(j02\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(j02\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp for\[^\n\r]*lastprivate\\(j02\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(j02\\)" "gimple" } } ! NOTE: This is implementation detail. !$omp target teams loop lastprivate (j02) default(none) defaultmap(none) do j02 = 0, 64 end do @@ -184,7 +184,7 @@ subroutine bar () do i = 1, 64 l17 = i end do - ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(l18\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(l18\\)" "gimple" } } ! NOTE: This is implementation detail. ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*lastprivate\\(l18\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l18\\)" "gimple" } } !$omp taskloop simd lastprivate (l18) default(none) @@ -199,16 +199,16 @@ subroutine bar () end do ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(l20\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(l20\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l20\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l20\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l20\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l20\\)" "gimple" } } ! FIXME. !$omp teams distribute parallel do lastprivate (l20) default(none) do i = 1, 64 l20 = i end do ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(l21\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(l21\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l21\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l21\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l21\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l21\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l21\\)" "gimple" } } !$omp teams distribute parallel do simd lastprivate (l21) default(none) do i = 1, 64 @@ -222,10 +222,10 @@ subroutine bar () l22 = i end do ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(j03\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(j03\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(j03\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp for\[^\n\r]*lastprivate\\(j03\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(j03\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(j03\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(j03\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp for\[^\n\r]*lastprivate\\(j03\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(j03\\)" "gimple" } } ! NOTE: This is implementation detail. !$omp teams loop lastprivate (j03) default(none) do j03 = 1, 64 end do diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-3.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-3.f90 index 3c02c88c483b..2a37be0d70ed 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr99928-3.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-3.f90 @@ -1,7 +1,7 @@ ! PR middle-end/99928 ! { dg-do compile } ! { dg-options "-fopenmp -fdump-tree-gimple" } - +! { dg-additional-options "-Wno-deprecated-openmp" } module m implicit none integer :: l00, l01, l02, l03, l04, l07, l08, l09 @@ -39,19 +39,19 @@ subroutine bar () do i = 1, 64 l02 = i end do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l03\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l03\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l03\\)" "gimple" } } ! FIXME. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l03\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l03\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l03\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l03\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l03\\)" "gimple" } } ! FIXME. !$omp parallel do firstprivate (l03) lastprivate (l03) default(none) do i = 1, 64 l03 = i end do !$omp end parallel do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l04\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l04\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l04\\)" "gimple" } } ! FIXME. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l04\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l04\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l04\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l04\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l04\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(l04\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l04\\)" "gimple" } } !$omp parallel do simd firstprivate (l04) lastprivate (l04) default(none) @@ -83,7 +83,7 @@ subroutine bar () ! FIXME: OpenMP 5.0/5.1 broken here, conceptually it should be shared on parallel and ! firstprivate+lastprivate on sections, in GCC implementation we put firstprivate+lastprivate ! on parallel for historic reasons, but OpenMP 5.0/5.1 mistakenly say firstprivate - ! should be on parallel and lastprivate on sections. + ! should be on parallel and lastprivate on sections. ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l07\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l07\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp sections\[^\n\r]*firstprivate\\(l07\\)" "gimple" } } @@ -97,10 +97,10 @@ subroutine bar () !$omp end parallel sections ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:l08" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l08\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l08\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l08\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l08\\)" "gimple" } } ! FIXME. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l08\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l08\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l08\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l08\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l08\\)" "gimple" } } ! FIXME. !$omp target parallel do firstprivate (l08) lastprivate (l08) default(none) defaultmap(none) do i = 1, 64 l08 = i @@ -108,10 +108,10 @@ subroutine bar () !$omp end target parallel do ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:l09" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l09\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l09\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l09\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l09\\)" "gimple" } } ! FIXME. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l09\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l09\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l09\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l09\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l09\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump-not "omp simd\[^\n\r]*firstprivate\\(l09\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*lastprivate\\(l09\\)" "gimple" } } !$omp target parallel do simd firstprivate (l09) lastprivate (l09) default(none) defaultmap(none) diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-4.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-4.f90 index 1563c4fbbd05..4313c68c02ff 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr99928-4.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-4.f90 @@ -1,7 +1,7 @@ ! PR middle-end/99928 ! { dg-do compile } ! { dg-options "-fopenmp -fdump-tree-gimple" } - +! { dg-additional-options "-Wno-deprecated-openmp" } module m implicit none integer :: l00, l01, l05, l06, l07, l08 @@ -34,10 +34,10 @@ subroutine bar () do i = 1, 64 l02 = l02 + 1 end do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l03\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l03\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l03\\)" "gimple" } } ! FIXME. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l03\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l03\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l03\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l03\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l03\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(l03:1\\)" "gimple" } } !$omp parallel do simd linear (l03) default(none) do i = 1, 64 @@ -63,10 +63,10 @@ subroutine bar () end do ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:l06" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(l06\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l06\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l06\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l06\\)" "gimple" } } ! FIXME. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l06\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*firstprivate\\(l06\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(l06\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*firstprivate\\(l06\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(l06\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(l06:1\\)" "gimple" } } !$omp target parallel do simd linear (l06) default(none) defaultmap(none) do i = 1, 64 diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-5.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-5.f90 index 259f6cc0136a..930088f0b93f 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr99928-5.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-5.f90 @@ -1,7 +1,7 @@ ! PR middle-end/99928 ! { dg-do compile } ! { dg-options "-fopenmp -fdump-tree-gimple" } - +! { dg-additional-options "-Wno-deprecated-openmp" } module m implicit none integer :: j00, j01, j02, j03, j04, j06, j07, j08, j09 @@ -11,8 +11,8 @@ contains subroutine foo () ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j00:1\\)" "gimple" } } !$omp distribute parallel do simd linear (j00) default(none) do j00 = 1, 64 @@ -32,21 +32,21 @@ subroutine bar () do j02 = 1, 64 end do ! { dg-final { scan-tree-dump-not "omp master\[^\n\r]*lastprivate\\(j03\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j03\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j03\\)" "gimple" } } ! NOTE: This is implementation detail. ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*lastprivate\\(j03\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j03:1\\)" "gimple" } } !$omp master taskloop simd linear (j03) default(none) do j03 = 1, 64 end do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j04\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j04\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j04\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j04\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j04:1\\)" "gimple" } } !$omp parallel do simd linear (j04) default(none) do j04 = 1, 64 end do ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(j05\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp master\[^\n\r]*lastprivate\\(j05\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j05\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j05\\)" "gimple" } } ! NOTE: This is implementation detail. ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*lastprivate\\(j05\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j05:1\\)" "gimple" } } !$omp parallel master taskloop simd linear (j05) default(none) @@ -54,8 +54,8 @@ subroutine bar () end do ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:j06" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(j06\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j06\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j06\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j06\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j06\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j06:1\\)" "gimple" } } !$omp target parallel do simd linear (j06) default(none) defaultmap(none) do j06 = 1, 64 @@ -70,8 +70,8 @@ subroutine bar () ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(j08\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(j08\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j08:1\\)" "gimple" } } !$omp target teams distribute parallel do simd linear (j08) default(none) defaultmap(none) do j08 = 1, 64 @@ -84,7 +84,7 @@ subroutine bar () !$omp target teams distribute simd linear (j09) default(none) defaultmap(none) do j09 = 1, 64 end do - ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j10\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j10\\)" "gimple" } } ! NOTE: This is implementation detail. ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*lastprivate\\(j10\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j10:1\\)" "gimple" } } !$omp taskloop simd linear (j10) default(none) @@ -92,8 +92,8 @@ subroutine bar () end do ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(j11\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(j11\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j11\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j11\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j11\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j11\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j11:1\\)" "gimple" } } !$omp teams distribute parallel do simd linear (j11) default(none) do j11 = 1, 64 diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-6.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-6.f90 index a9ad2264e398..7c82db4fa5ab 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr99928-6.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-6.f90 @@ -1,7 +1,7 @@ ! PR middle-end/99928 ! { dg-do compile } ! { dg-options "-fopenmp -fdump-tree-gimple" } - +! { dg-additional-options "-Wno-deprecated-openmp" } module m implicit none integer :: j00, j01, j02, j03, j04, j06, j07, j08, j09 @@ -11,8 +11,8 @@ contains subroutine foo () ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j00\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j00:1\\)" "gimple" } } !$omp distribute parallel do simd default(none) do j00 = 1, 64 @@ -32,21 +32,21 @@ subroutine bar () do j02 = 1, 64 end do ! { dg-final { scan-tree-dump-not "omp master\[^\n\r]*lastprivate\\(j03\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j03\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j03\\)" "gimple" } } ! NOTE: This is implementation detail. ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*lastprivate\\(j03\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j03:1\\)" "gimple" } } !$omp master taskloop simd default(none) do j03 = 1, 64 end do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j04\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j04\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j04\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j04\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j04:1\\)" "gimple" } } !$omp parallel do simd default(none) do j04 = 1, 64 end do ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(j05\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp master\[^\n\r]*lastprivate\\(j05\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j05\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j05\\)" "gimple" } } ! NOTE: This is implementation detail. ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*lastprivate\\(j05\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j05:1\\)" "gimple" } } !$omp parallel master taskloop simd default(none) @@ -54,8 +54,8 @@ subroutine bar () end do ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:j06" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(j06\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j06\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j06\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j06\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j06\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j06:1\\)" "gimple" } } !$omp target parallel do simd default(none) defaultmap(none) do j06 = 1, 64 @@ -70,8 +70,8 @@ subroutine bar () ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(j08\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(j08\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j08\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j08:1\\)" "gimple" } } !$omp target teams distribute parallel do simd default(none) defaultmap(none) do j08 = 1, 64 @@ -84,7 +84,7 @@ subroutine bar () !$omp target teams distribute simd default(none) defaultmap(none) do j09 = 1, 64 end do - ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j10\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*shared\\(j10\\)" "gimple" } } ! NOTE: This is implementation detail. ! { dg-final { scan-tree-dump "omp taskloop\[^\n\r]*lastprivate\\(j10\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j10:1\\)" "gimple" } } !$omp taskloop simd default(none) @@ -92,8 +92,8 @@ subroutine bar () end do ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(j11\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*lastprivate\\(j11\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j11\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j11\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*lastprivate\\(j11\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*lastprivate\\(j11\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*linear\\(j11:1\\)" "gimple" } } !$omp teams distribute parallel do simd default(none) do j11 = 1, 64 diff --git a/gcc/testsuite/gfortran.dg/gomp/pr99928-8.f90 b/gcc/testsuite/gfortran.dg/gomp/pr99928-8.f90 index a0414a57a519..ed5fcf7c1c54 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr99928-8.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr99928-8.f90 @@ -1,7 +1,7 @@ ! PR middle-end/99928 ! { dg-do compile } ! { dg-options "-fopenmp -fdump-tree-gimple" } - +! { dg-additional-options "-Wno-deprecated-openmp" } module m implicit none integer :: r00, r01, r02, r03, r04, r05 @@ -13,15 +13,15 @@ contains subroutine foo () integer :: i ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*reduction\\(\\+:r00\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r00\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r00\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r00\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r00\\)" "gimple" } } ! FIXME. !$omp distribute parallel do reduction(+:r00) default(none) do i = 1, 64 r00 = r00 + 1 end do ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*reduction\\(\\+:r01\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r01\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r01\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r01\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r01\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r01\\)" "gimple" } } !$omp distribute parallel do simd reduction(+:r01) default(none) do i = 1, 64 @@ -62,22 +62,22 @@ subroutine bar () do i = 1, 64 r05 = r05 + 1 end do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r06\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r06\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r06\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r06\\)" "gimple" } } ! FIXME. !$omp parallel do reduction(+:r06) default(none) do i = 1, 64 r06 = r06 + 1 end do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r07\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r07\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r07\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r07\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r07\\)" "gimple" } } !$omp parallel do simd reduction(+:r07) default(none) do i = 1, 64 r07 = r07 + 1 end do ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(r08\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp for\[^\n\r]*reduction\\(\\+:r08\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r08\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp for\[^\n\r]*reduction\\(\\+:r08\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r08\\)" "gimple" } } ! NOTE: This is implementation detail. !$omp parallel loop reduction(+:r08) default(none) do i = 1, 64 r08 = r08 + 1 @@ -102,8 +102,8 @@ subroutine bar () do i = 1, 64 r11 = r11 + 1 end do - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r12\\)" "gimple" } } ! FIXME: This should be on sections instead. - ! { dg-final { scan-tree-dump-not "omp sections\[^\n\r]*reduction\\(\\+:r12\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r12\\)" "gimple" } } ! FIXME: This should be on sections instead. + ! { dg-final { scan-tree-dump-not "omp sections\[^\n\r]*reduction\\(\\+:r12\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump-not "omp section \[^\n\r]*reduction\\(\\+:r12\\)" "gimple" } } !$omp parallel sections reduction(+:r12) default(none) r12 = r12 + 1 @@ -118,16 +118,16 @@ subroutine bar () !$omp end target parallel ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:r14" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(r14\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r14\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r14\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r14\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r14\\)" "gimple" } } ! FIXME. !$omp target parallel do reduction(+:r14) default(none) defaultmap(none) do i = 1, 64 r14 = r14 + 1 end do ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:r15" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(r15\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r15\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r15\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r15\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r15\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r15\\)" "gimple" } } !$omp target parallel do simd reduction(+:r15) default(none) defaultmap(none) do i = 1, 64 @@ -136,8 +136,8 @@ subroutine bar () ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:r16" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(r16\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(r16\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp for\[^\n\r]*reduction\\(\\+:r16\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r16\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp for\[^\n\r]*reduction\\(\\+:r16\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r16\\)" "gimple" } } ! NOTE: This is implementation detail. !$omp target parallel loop reduction(+:r16) default(none) defaultmap(none) do i = 1, 64 r16 = r16 + 1 @@ -160,8 +160,8 @@ subroutine bar () ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(r19\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*reduction\\(\\+:r19\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*reduction\\(\\+:r19\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r19\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r19\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r19\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r19\\)" "gimple" } } ! FIXME. !$omp target teams distribute parallel do reduction(+:r19) default(none) defaultmap(none) do i = 1, 64 r19 = r19 + 1 @@ -170,8 +170,8 @@ subroutine bar () ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(r20\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*reduction\\(\\+:r20\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*reduction\\(\\+:r20\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r20\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r20\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r20\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r20\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r20\\)" "gimple" } } !$omp target teams distribute parallel do simd reduction(+:r20) default(none) defaultmap(none) do i = 1, 64 @@ -189,10 +189,10 @@ subroutine bar () ! { dg-final { scan-tree-dump "omp target\[^\n\r]*map\\(tofrom:r22" "gimple" } } ! { dg-final { scan-tree-dump-not "omp target\[^\n\r]*firstprivate\\(r22\\)" "gimple" } } ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(r22\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*reduction\\(\\+:r22\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(r22\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp for\[^\n\r]*reduction\\(\\+:r22\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r22\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*reduction\\(\\+:r22\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(r22\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp for\[^\n\r]*reduction\\(\\+:r22\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r22\\)" "gimple" } } ! NOTE: This is implementation detail. !$omp target teams loop reduction(+:r22) default(none) defaultmap(none) do i = 1, 64 r22 = r22 + 1 @@ -218,16 +218,16 @@ subroutine bar () end do ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*reduction\\(\\+:r26\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*reduction\\(\\+:r26\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r26\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r26\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r26\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r26\\)" "gimple" } } ! FIXME. !$omp teams distribute parallel do reduction(+:r26) default(none) do i = 1, 64 r26 = r26 + 1 end do ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*reduction\\(\\+:r27\\)" "gimple" } } ! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*reduction\\(\\+:r27\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r27\\)" "gimple" } } ! FIXME: This should be on for instead. - ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r27\\)" "gimple" } } ! FIXME. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*reduction\\(\\+:r27\\)" "gimple" } } ! FIXME: This should be on for instead. + ! { dg-final { scan-tree-dump-not "omp for\[^\n\r]*reduction\\(\\+:r27\\)" "gimple" } } ! FIXME. ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r27\\)" "gimple" } } !$omp teams distribute parallel do simd reduction(+:r27) default(none) do i = 1, 64 @@ -241,10 +241,10 @@ subroutine bar () r28 = r28 + 1 end do ! { dg-final { scan-tree-dump "omp teams\[^\n\r]*shared\\(r29\\)" "gimple" } } - ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*reduction\\(\\+:r29\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(r29\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp for\[^\n\r]*reduction\\(\\+:r29\\)" "gimple" } } ! NOTE: This is implementation detail. - ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r29\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp distribute\[^\n\r]*reduction\\(\\+:r29\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp parallel\[^\n\r]*shared\\(r29\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp for\[^\n\r]*reduction\\(\\+:r29\\)" "gimple" } } ! NOTE: This is implementation detail. + ! { dg-final { scan-tree-dump "omp simd\[^\n\r]*reduction\\(\\+:r29\\)" "gimple" } } ! NOTE: This is implementation detail. !$omp teams loop reduction(+:r29) default(none) do i = 1, 64 r29 = r29 + 1 diff --git a/gcc/testsuite/gfortran.dg/gomp/sharing-3.f90 b/gcc/testsuite/gfortran.dg/gomp/sharing-3.f90 index a9abc7b5a333..2103949b3e19 100644 --- a/gcc/testsuite/gfortran.dg/gomp/sharing-3.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/sharing-3.f90 @@ -1,6 +1,6 @@ ! { dg-do compile } ! { dg-options "-fopenmp" } - +! { dg-additional-options "-Wno-deprecated-openmp" } subroutine foo (vara, varb, varc, vard, n) integer :: n, vara(n), varb(*), varc(:), vard(6), vare(6) vare(:) = 0 diff --git a/gcc/testsuite/gfortran.dg/gomp/strictly-structured-block-1.f90 b/gcc/testsuite/gfortran.dg/gomp/strictly-structured-block-1.f90 index ef8507eb7f01..8d2fffe07567 100644 --- a/gcc/testsuite/gfortran.dg/gomp/strictly-structured-block-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/strictly-structured-block-1.f90 @@ -1,6 +1,6 @@ ! { dg-do compile } ! { dg-options "-fopenmp" } - +! { dg-additional-options "-Wno-deprecated-openmp" } program main integer :: x, i, n diff --git a/gcc/testsuite/gfortran.dg/gomp/strictly-structured-block-2.f90 b/gcc/testsuite/gfortran.dg/gomp/strictly-structured-block-2.f90 index ad4d08a1d495..8ab00905c120 100644 --- a/gcc/testsuite/gfortran.dg/gomp/strictly-structured-block-2.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/strictly-structured-block-2.f90 @@ -1,6 +1,6 @@ ! { dg-do compile } ! { dg-options "-fopenmp" } - +! { dg-additional-options "-Wno-deprecated-openmp" } program main integer :: x, i, n diff --git a/gcc/testsuite/gfortran.dg/gomp/target1.f90 b/gcc/testsuite/gfortran.dg/gomp/target1.f90 index da930b92422f..235c4a5534c0 100644 --- a/gcc/testsuite/gfortran.dg/gomp/target1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/target1.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } - +! { dg-additional-options "-Wno-deprecated-openmp" } module target1 interface subroutine dosomething (a, n, m) diff --git a/gcc/testsuite/gfortran.dg/gomp/taskloop-1.f90 b/gcc/testsuite/gfortran.dg/gomp/taskloop-1.f90 index 7060a7a5c967..46901712a246 100644 --- a/gcc/testsuite/gfortran.dg/gomp/taskloop-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/taskloop-1.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } module m implicit none integer :: t diff --git a/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 b/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 index d200a93bb4fa..15ddea8e69d4 100644 --- a/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } subroutine foo() implicit none integer :: i, r diff --git a/gcc/testsuite/gfortran.dg/openmp-define-3.f90 b/gcc/testsuite/gfortran.dg/openmp-define-3.f90 index d20502dece18..a7d9d19c315d 100644 --- a/gcc/testsuite/gfortran.dg/openmp-define-3.f90 +++ b/gcc/testsuite/gfortran.dg/openmp-define-3.f90 @@ -6,6 +6,6 @@ # error _OPENMP not defined #endif -#if _OPENMP != 201511 +#if _OPENMP != 202111 # error _OPENMP defined to wrong value #endif diff --git a/libgomp/env.c b/libgomp/env.c index 48bb7890e7b4..4eb765259436 100644 --- a/libgomp/env.c +++ b/libgomp/env.c @@ -1777,7 +1777,7 @@ omp_display_env (int verbose) fputs ("\nOPENMP DISPLAY ENVIRONMENT BEGIN\n", stderr); - fputs (" _OPENMP = '201511'\n", stderr); + fputs (" _OPENMP = '202111'\n", stderr); fprintf (stderr, " [host] OMP_DYNAMIC = '%s'\n", none->icvs.dyn_var ? "TRUE" : "FALSE"); diff --git a/libgomp/fortran.c b/libgomp/fortran.c index 7a0386e5ccb3..947a852e0341 100644 --- a/libgomp/fortran.c +++ b/libgomp/fortran.c @@ -48,11 +48,8 @@ ialias_redirect (omp_test_nest_lock) # endif ialias_redirect (omp_set_dynamic) ialias_redirect (omp_get_dynamic) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" ialias_redirect (omp_set_nested) ialias_redirect (omp_get_nested) -#pragma GCC diagnostic pop ialias_redirect (omp_set_num_threads) ialias_redirect (omp_in_parallel) ialias_redirect (omp_get_max_threads) @@ -296,8 +293,6 @@ omp_set_dynamic_8_ (const int64_t *set) omp_set_dynamic (!!*set); } -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" void omp_set_nested_ (const int32_t *set) { @@ -309,7 +304,6 @@ omp_set_nested_8_ (const int64_t *set) { omp_set_nested (!!*set); } -#pragma GCC diagnostic pop void omp_set_num_threads_ (const int32_t *set) @@ -329,14 +323,11 @@ omp_get_dynamic_ (void) return omp_get_dynamic (); } -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" int32_t omp_get_nested_ (void) { return omp_get_nested (); } -#pragma GCC diagnostic pop int32_t omp_in_parallel_ (void) diff --git a/libgomp/icv.c b/libgomp/icv.c index b671767311d6..908e37d8d179 100644 --- a/libgomp/icv.c +++ b/libgomp/icv.c @@ -53,8 +53,6 @@ omp_get_dynamic (void) return icv->dyn_var; } -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" void omp_set_nested (int val) { @@ -72,7 +70,6 @@ omp_get_nested (void) return (icv->max_active_levels_var > 1 && icv->max_active_levels_var > omp_get_active_level ()); } -#pragma GCC diagnostic pop void omp_set_schedule (omp_sched_t kind, int chunk_size) @@ -235,11 +232,8 @@ omp_get_default_allocator (void) ialias (omp_set_dynamic) ialias (omp_get_dynamic) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" ialias (omp_set_nested) ialias (omp_get_nested) -#pragma GCC diagnostic pop ialias (omp_set_num_threads) ialias (omp_set_schedule) ialias (omp_get_schedule) diff --git a/libgomp/omp_lib.f90.in b/libgomp/omp_lib.f90.in index 1b1a16320884..138008be2cde 100644 --- a/libgomp/omp_lib.f90.in +++ b/libgomp/omp_lib.f90.in @@ -225,7 +225,7 @@ module omp_lib use omp_lib_kinds implicit none - integer, parameter :: openmp_version = 201511 + integer, parameter :: openmp_version = 202111 interface subroutine omp_init_lock (svar) diff --git a/libgomp/omp_lib.h.in b/libgomp/omp_lib.h.in index 93305834545a..4d7937707331 100644 --- a/libgomp/omp_lib.h.in +++ b/libgomp/omp_lib.h.in @@ -74,7 +74,7 @@ parameter (omp_lock_hint_nonspeculative = 4) parameter (omp_sync_hint_speculative = 8) parameter (omp_lock_hint_speculative = 8) - parameter (openmp_version = 201511) + parameter (openmp_version = 202111) integer omp_pause_resource_kind parameter (omp_pause_resource_kind = 4) integer (omp_pause_resource_kind) omp_pause_soft diff --git a/libgomp/testsuite/libgomp.c++/affinity-1.C b/libgomp/testsuite/libgomp.c++/affinity-1.C index eff231650544..8ee4e4712b39 100644 --- a/libgomp/testsuite/libgomp.c++/affinity-1.C +++ b/libgomp/testsuite/libgomp.c++/affinity-1.C @@ -1,5 +1,5 @@ // { dg-do run } // { dg-set-target-env-var OMP_PROC_BIND "true" } -// { dg-additional-options "-Wno-deprecated-declarations" } +// { dg-additional-options "-Wno-deprecated-declarations -Wno-deprecated-openmp" } #include "../libgomp.c/affinity-1.c" diff --git a/libgomp/testsuite/libgomp.c++/ctor-1.C b/libgomp/testsuite/libgomp.c++/ctor-1.C index 2ad3b3a6efcc..0898e05fb540 100644 --- a/libgomp/testsuite/libgomp.c++/ctor-1.C +++ b/libgomp/testsuite/libgomp.c++/ctor-1.C @@ -1,5 +1,5 @@ // { dg-do run } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c++/ctor-11.C b/libgomp/testsuite/libgomp.c++/ctor-11.C index 8f501e8c8e5d..cf6319d8dfd9 100644 --- a/libgomp/testsuite/libgomp.c++/ctor-11.C +++ b/libgomp/testsuite/libgomp.c++/ctor-11.C @@ -1,6 +1,6 @@ // PR c++/36308 // { dg-do run } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c++/ctor-13.C b/libgomp/testsuite/libgomp.c++/ctor-13.C index 8c7a09f315d9..2c3fccd2d361 100644 --- a/libgomp/testsuite/libgomp.c++/ctor-13.C +++ b/libgomp/testsuite/libgomp.c++/ctor-13.C @@ -1,5 +1,5 @@ // { dg-do run } - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c++/ctor-2.C b/libgomp/testsuite/libgomp.c++/ctor-2.C index 6611c592fda9..5457360d02f6 100644 --- a/libgomp/testsuite/libgomp.c++/ctor-2.C +++ b/libgomp/testsuite/libgomp.c++/ctor-2.C @@ -1,4 +1,5 @@ // { dg-do run } +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c++/ctor-5.C b/libgomp/testsuite/libgomp.c++/ctor-5.C index d99a1d4628f7..590dab8e0a68 100644 --- a/libgomp/testsuite/libgomp.c++/ctor-5.C +++ b/libgomp/testsuite/libgomp.c++/ctor-5.C @@ -1,5 +1,6 @@ // { dg-do run } // { dg-require-effective-target tls_runtime } +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c++/ctor-7.C b/libgomp/testsuite/libgomp.c++/ctor-7.C index 3d669a707910..18faaf04faf5 100644 --- a/libgomp/testsuite/libgomp.c++/ctor-7.C +++ b/libgomp/testsuite/libgomp.c++/ctor-7.C @@ -1,4 +1,5 @@ // { dg-do run } +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c++/depend-iterator-1.C b/libgomp/testsuite/libgomp.c++/depend-iterator-1.C index 2cff5e84334f..02640f608862 100644 --- a/libgomp/testsuite/libgomp.c++/depend-iterator-1.C +++ b/libgomp/testsuite/libgomp.c++/depend-iterator-1.C @@ -1,3 +1,5 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } + extern "C" void abort (); int arr[64], arr2[64], arr3[64]; diff --git a/libgomp/testsuite/libgomp.c++/loop-13.C b/libgomp/testsuite/libgomp.c++/loop-13.C index 663212c1f74d..580a9aecc070 100644 --- a/libgomp/testsuite/libgomp.c++/loop-13.C +++ b/libgomp/testsuite/libgomp.c++/loop-13.C @@ -1,4 +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++/master-1.C b/libgomp/testsuite/libgomp.c++/master-1.C index 734b4e2cd98e..0c80e70a1188 100644 --- a/libgomp/testsuite/libgomp.c++/master-1.C +++ b/libgomp/testsuite/libgomp.c++/master-1.C @@ -1,5 +1,6 @@ // PR c++/24734 // { dg-do run } +// { dg-additional-options "-Wno-deprecated-openmp" } extern "C" void abort (); int i; diff --git a/libgomp/testsuite/libgomp.c++/pr26943.C b/libgomp/testsuite/libgomp.c++/pr26943.C index 07b7b5dbf74c..f09af221339e 100644 --- a/libgomp/testsuite/libgomp.c++/pr26943.C +++ b/libgomp/testsuite/libgomp.c++/pr26943.C @@ -1,5 +1,6 @@ // PR c++/26943 // { dg-do run } +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c++/pr81130.C b/libgomp/testsuite/libgomp.c++/pr81130.C index f2cb571294d4..b8a125ac40c5 100644 --- a/libgomp/testsuite/libgomp.c++/pr81130.C +++ b/libgomp/testsuite/libgomp.c++/pr81130.C @@ -1,5 +1,6 @@ // PR c++/81130 // { dg-do run } +// { dg-additional-options "-Wno-deprecated-openmp" } struct A { diff --git a/libgomp/testsuite/libgomp.c++/pr81314.C b/libgomp/testsuite/libgomp.c++/pr81314.C index afe89438bd3f..f08ff3360fea 100644 --- a/libgomp/testsuite/libgomp.c++/pr81314.C +++ b/libgomp/testsuite/libgomp.c++/pr81314.C @@ -1,5 +1,6 @@ // PR c++/81314 // { dg-do link } +// { dg-additional-options "-Wno-deprecated-openmp" } template struct S { diff --git a/libgomp/testsuite/libgomp.c++/target-in-reduction-1.C b/libgomp/testsuite/libgomp.c++/target-in-reduction-1.C index a1d1e57c0022..28942c193ede 100644 --- a/libgomp/testsuite/libgomp.c++/target-in-reduction-1.C +++ b/libgomp/testsuite/libgomp.c++/target-in-reduction-1.C @@ -1,3 +1,5 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } + void foo (int &x, int *&y, int n, int v) { diff --git a/libgomp/testsuite/libgomp.c++/target-in-reduction-2.C b/libgomp/testsuite/libgomp.c++/target-in-reduction-2.C index 835cec17da94..3c1cfc3e3bc4 100644 --- a/libgomp/testsuite/libgomp.c++/target-in-reduction-2.C +++ b/libgomp/testsuite/libgomp.c++/target-in-reduction-2.C @@ -1,3 +1,5 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } + struct S { int a, b, c[2]; }; #pragma omp declare reduction (+: S : (omp_out.a += omp_in.a, omp_out.b += omp_in.b)) \ initializer (omp_priv = { 0, 0, { 0, 0 } }) diff --git a/libgomp/testsuite/libgomp.c++/task-1.C b/libgomp/testsuite/libgomp.c++/task-1.C index 94ab6f21f18b..3ff2c959875b 100644 --- a/libgomp/testsuite/libgomp.c++/task-1.C +++ b/libgomp/testsuite/libgomp.c++/task-1.C @@ -1,3 +1,5 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } + extern "C" void abort (); int a = 18; diff --git a/libgomp/testsuite/libgomp.c++/task-2.C b/libgomp/testsuite/libgomp.c++/task-2.C index a198cc721b56..e1dc3d45cc1d 100644 --- a/libgomp/testsuite/libgomp.c++/task-2.C +++ b/libgomp/testsuite/libgomp.c++/task-2.C @@ -1,4 +1,5 @@ // { dg-do run } +// { dg-additional-options "-Wno-deprecated-openmp" } #include extern "C" void abort (); diff --git a/libgomp/testsuite/libgomp.c++/task-6.C b/libgomp/testsuite/libgomp.c++/task-6.C index 389e1e218e4b..4f14fc2fb266 100644 --- a/libgomp/testsuite/libgomp.c++/task-6.C +++ b/libgomp/testsuite/libgomp.c++/task-6.C @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } extern "C" void abort (); int a = 18; diff --git a/libgomp/testsuite/libgomp.c++/task-reduction-7.C b/libgomp/testsuite/libgomp.c++/task-reduction-7.C index 72afa5cd7d17..c3965abb4e1d 100644 --- a/libgomp/testsuite/libgomp.c++/task-reduction-7.C +++ b/libgomp/testsuite/libgomp.c++/task-reduction-7.C @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } typedef __SIZE_TYPE__ size_t; extern "C" void abort (); diff --git a/libgomp/testsuite/libgomp.c++/task-reduction-9.C b/libgomp/testsuite/libgomp.c++/task-reduction-9.C index 068a7bb7b5d4..7c6c183fd790 100644 --- a/libgomp/testsuite/libgomp.c++/task-reduction-9.C +++ b/libgomp/testsuite/libgomp.c++/task-reduction-9.C @@ -1,3 +1,5 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } + #include #include diff --git a/libgomp/testsuite/libgomp.c++/taskloop-reduction-1.C b/libgomp/testsuite/libgomp.c++/taskloop-reduction-1.C index f7fb9cac9e53..db97ff8e9f4d 100644 --- a/libgomp/testsuite/libgomp.c++/taskloop-reduction-1.C +++ b/libgomp/testsuite/libgomp.c++/taskloop-reduction-1.C @@ -1,3 +1,5 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } + extern "C" void abort (); struct S { S (); S (unsigned long long int, int); ~S (); static int cnt1, cnt2, cnt3; unsigned long long int s; int t; }; diff --git a/libgomp/testsuite/libgomp.c-c++-common/cancel-taskgroup-4.c b/libgomp/testsuite/libgomp.c-c++-common/cancel-taskgroup-4.c index 341bfb84ea8e..b35e64e946f8 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/cancel-taskgroup-4.c +++ b/libgomp/testsuite/libgomp.c-c++-common/cancel-taskgroup-4.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-set-target-env-var OMP_CANCELLATION "true" } */ +/* { dg-additional-options "-Wno-deprecated-openmp" } */ #include #include diff --git a/libgomp/testsuite/libgomp.c-c++-common/depend-inoutset-1.c b/libgomp/testsuite/libgomp.c-c++-common/depend-inoutset-1.c index 77956f262324..29d876837a2a 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/depend-inoutset-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/depend-inoutset-1.c @@ -1,3 +1,5 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } + #include #include #include diff --git a/libgomp/testsuite/libgomp.c-c++-common/depend-iterator-1.c b/libgomp/testsuite/libgomp.c-c++-common/depend-iterator-1.c index 03cded42cbd2..98b5fda72770 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/depend-iterator-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/depend-iterator-1.c @@ -1,3 +1,5 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } + #ifdef __cplusplus extern "C" #endif diff --git a/libgomp/testsuite/libgomp.c-c++-common/master-combined-1.c b/libgomp/testsuite/libgomp.c-c++-common/master-combined-1.c index 3e6da095122e..8fc3bda23641 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/master-combined-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/master-combined-1.c @@ -3,6 +3,7 @@ /* { dg-additional-options "-std=c99" { target c } } */ /* { dg-additional-options "-msse2" { target sse2_runtime } } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c-c++-common/omp-atv-seq-dep.c b/libgomp/testsuite/libgomp.c-c++-common/omp-atv-seq-dep.c new file mode 100644 index 000000000000..8fc5dcd9245f --- /dev/null +++ b/libgomp/testsuite/libgomp.c-c++-common/omp-atv-seq-dep.c @@ -0,0 +1,9 @@ +// { dg-do run } +#include + +int +main() +{ + int test = omp_atv_sequential; // { dg-warning "'omp_atv_sequential' is deprecated \\\[-Wdeprecated-declarations\\\]" } + return 0; +} diff --git a/libgomp/testsuite/libgomp.c-c++-common/omp-lock-hint-contended-dep.c b/libgomp/testsuite/libgomp.c-c++-common/omp-lock-hint-contended-dep.c new file mode 100644 index 000000000000..15df926d5654 --- /dev/null +++ b/libgomp/testsuite/libgomp.c-c++-common/omp-lock-hint-contended-dep.c @@ -0,0 +1,11 @@ +// { dg-do compile } +#include + +int +main() +{ + omp_lock_t lock; + omp_init_lock_with_hint(&lock, omp_lock_hint_contended); // { dg-warning "'omp_lock_hint_contended' is deprecated \\\[-Wdeprecated-declarations\\\]" } + omp_destroy_lock(&lock); + return 0; +} diff --git a/libgomp/testsuite/libgomp.c-c++-common/omp-lock-hint-none-dep.c b/libgomp/testsuite/libgomp.c-c++-common/omp-lock-hint-none-dep.c new file mode 100644 index 000000000000..3b9fe798a052 --- /dev/null +++ b/libgomp/testsuite/libgomp.c-c++-common/omp-lock-hint-none-dep.c @@ -0,0 +1,12 @@ +// { dg-do compile } + +#include + +int +main() +{ + omp_lock_t lock; + omp_init_lock_with_hint(&lock, omp_lock_hint_none); // { dg-warning "'omp_lock_hint_none' is deprecated \\\[-Wdeprecated-declarations\\\]" } + omp_destroy_lock(&lock); + return 0; +} diff --git a/libgomp/testsuite/libgomp.c-c++-common/omp-lock-hint-speculative-dep.c b/libgomp/testsuite/libgomp.c-c++-common/omp-lock-hint-speculative-dep.c new file mode 100644 index 000000000000..4f139e9ff16d --- /dev/null +++ b/libgomp/testsuite/libgomp.c-c++-common/omp-lock-hint-speculative-dep.c @@ -0,0 +1,11 @@ +// { dg-do compile } +#include + +int +main() +{ + omp_lock_t lock; + omp_init_lock_with_hint(&lock, omp_lock_hint_speculative); // { dg-warning "'omp_lock_hint_speculative' is deprecated \\\[-Wdeprecated-declarations\\\]" } + omp_destroy_lock(&lock); + return 0; +} diff --git a/libgomp/testsuite/libgomp.c-c++-common/omp-lock-hint-uncontended-dep.c b/libgomp/testsuite/libgomp.c-c++-common/omp-lock-hint-uncontended-dep.c new file mode 100644 index 000000000000..b3483cc1d07d --- /dev/null +++ b/libgomp/testsuite/libgomp.c-c++-common/omp-lock-hint-uncontended-dep.c @@ -0,0 +1,11 @@ +// { dg-do compile } +#include + +int +main() +{ + omp_lock_t lock; + omp_init_lock_with_hint(&lock, omp_lock_hint_uncontended); // { dg-warning "'omp_lock_hint_uncontended' is deprecated \\\[-Wdeprecated-declarations\\\]" } + omp_destroy_lock(&lock); + return 0; +} diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-in-reduction-1.c b/libgomp/testsuite/libgomp.c-c++-common/target-in-reduction-1.c index 3236cf9f0d06..587997447ec6 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-in-reduction-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-in-reduction-1.c @@ -1,3 +1,5 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } + void foo (int x, int *y, int n, int v) { diff --git a/libgomp/testsuite/libgomp.c-c++-common/target-in-reduction-2.c b/libgomp/testsuite/libgomp.c-c++-common/target-in-reduction-2.c index 7e159728163a..08c621ff1f46 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/target-in-reduction-2.c +++ b/libgomp/testsuite/libgomp.c-c++-common/target-in-reduction-2.c @@ -1,3 +1,5 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } + struct S { int a, b, c[2]; }; #pragma omp declare reduction (+: struct S : (omp_out.a += omp_in.a, omp_out.b += omp_in.b)) \ initializer (omp_priv = { 0, 0, { 0, 0 } }) diff --git a/libgomp/testsuite/libgomp.c-c++-common/task-detach-12.c b/libgomp/testsuite/libgomp.c-c++-common/task-detach-12.c index 65833189cd61..25820f2bca53 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/task-detach-12.c +++ b/libgomp/testsuite/libgomp.c-c++-common/task-detach-12.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-fopenmp" } */ +// { dg-additional-options "-Wno-deprecated-openmp" } #include diff --git a/libgomp/testsuite/libgomp.c-c++-common/task-reduction-15.c b/libgomp/testsuite/libgomp.c-c++-common/task-reduction-15.c index 5e87139ccfb1..3d57838217d0 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/task-reduction-15.c +++ b/libgomp/testsuite/libgomp.c-c++-common/task-reduction-15.c @@ -1,4 +1,5 @@ /* PR middle-end/101167 */ +// { dg-additional-options "-Wno-deprecated-openmp" } extern #ifdef __cplusplus diff --git a/libgomp/testsuite/libgomp.c-c++-common/task-reduction-5.c b/libgomp/testsuite/libgomp.c-c++-common/task-reduction-5.c index 018dc4fb28e4..844a3b73c3bd 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/task-reduction-5.c +++ b/libgomp/testsuite/libgomp.c-c++-common/task-reduction-5.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } typedef __SIZE_TYPE__ size_t; extern #ifdef __cplusplus diff --git a/libgomp/testsuite/libgomp.c-c++-common/task-reduction-6.c b/libgomp/testsuite/libgomp.c-c++-common/task-reduction-6.c index 09cbea665426..a23ec3fb1ac6 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/task-reduction-6.c +++ b/libgomp/testsuite/libgomp.c-c++-common/task-reduction-6.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c-c++-common/task-reduction-8.c b/libgomp/testsuite/libgomp.c-c++-common/task-reduction-8.c index 52d238a5b15a..c6fbc23cb845 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/task-reduction-8.c +++ b/libgomp/testsuite/libgomp.c-c++-common/task-reduction-8.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c-c++-common/taskloop-reduction-1.c b/libgomp/testsuite/libgomp.c-c++-common/taskloop-reduction-1.c index d44b471a3725..4a00e2eb579b 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/taskloop-reduction-1.c +++ b/libgomp/testsuite/libgomp.c-c++-common/taskloop-reduction-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/taskloop-reduction-3.c b/libgomp/testsuite/libgomp.c-c++-common/taskloop-reduction-3.c index 30a832490465..b167b807bb25 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/taskloop-reduction-3.c +++ b/libgomp/testsuite/libgomp.c-c++-common/taskloop-reduction-3.c @@ -3,6 +3,7 @@ /* { dg-additional-options "-std=c99" { target c } } */ /* { dg-additional-options "-msse2" { target sse2_runtime } } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ +// { dg-additional-options "-Wno-deprecated-openmp" } #define N 1024 long int u[N], m, n; diff --git a/libgomp/testsuite/libgomp.c-c++-common/taskloop-reduction-4.c b/libgomp/testsuite/libgomp.c-c++-common/taskloop-reduction-4.c index c1c29b37414f..9cb38c439eb7 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/taskloop-reduction-4.c +++ b/libgomp/testsuite/libgomp.c-c++-common/taskloop-reduction-4.c @@ -3,6 +3,7 @@ /* { dg-additional-options "-std=c99" { target c } } */ /* { dg-additional-options "-msse2" { target sse2_runtime } } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c/affinity-1.c b/libgomp/testsuite/libgomp.c/affinity-1.c index ab9b71c1e6ae..414c5121b70e 100644 --- a/libgomp/testsuite/libgomp.c/affinity-1.c +++ b/libgomp/testsuite/libgomp.c/affinity-1.c @@ -17,8 +17,7 @@ /* { dg-do run } */ /* { dg-set-target-env-var OMP_PROC_BIND "false" } */ -/* { dg-additional-options "-Wno-deprecated-declarations" } */ -/* { dg-additional-options "-DINTERPOSE_GETAFFINITY -DDO_FORK -ldl -Wno-deprecated-declarations" { target *-*-linux* } } */ +/* { dg-additional-options "-DINTERPOSE_GETAFFINITY -DDO_FORK -ldl -Wno-deprecated-declarations -Wno-deprecated-openmp" { target *-*-linux* } } */ #ifndef _GNU_SOURCE #define _GNU_SOURCE diff --git a/libgomp/testsuite/libgomp.c/critical-2.c b/libgomp/testsuite/libgomp.c/critical-2.c index 530a891f6b00..20a6506db82d 100644 --- a/libgomp/testsuite/libgomp.c/critical-2.c +++ b/libgomp/testsuite/libgomp.c/critical-2.c @@ -1,4 +1,5 @@ // { dg-do run } +// { dg-additional-options "-Wno-deprecated-openmp" } // Test several constructs within a parallel. At one point in development, // the critical directive clobbered the shared clause of the parallel. diff --git a/libgomp/testsuite/libgomp.c/debug-1.c b/libgomp/testsuite/libgomp.c/debug-1.c index 8fa9b548a142..9a0d1bb7bb93 100644 --- a/libgomp/testsuite/libgomp.c/debug-1.c +++ b/libgomp/testsuite/libgomp.c/debug-1.c @@ -1,6 +1,7 @@ /* PR debug/36617 */ /* { dg-do run } */ /* { dg-options "-g -O0" } */ +// { dg-additional-options "-Wno-deprecated-openmp" } int f1 (void) diff --git a/libgomp/testsuite/libgomp.c/lib-1.c b/libgomp/testsuite/libgomp.c/lib-1.c index fc6f746b83a9..c50bb1699402 100644 --- a/libgomp/testsuite/libgomp.c/lib-1.c +++ b/libgomp/testsuite/libgomp.c/lib-1.c @@ -1,4 +1,4 @@ -/* { dg-additional-options "-Wno-deprecated-declarations" } */ +/* { dg-additional-options "-Wno-deprecated-openmp" } */ #include #include @@ -46,11 +46,11 @@ main (void) if (omp_get_dynamic ()) abort (); - omp_set_nested (1); - if (! omp_get_nested ()) + omp_set_nested (1); // { dg-warning "'omp_set_nested' is deprecated \\\[-Wdeprecated-declarations\\\]" } + if (! omp_get_nested ()) // { dg-warning "'omp_get_nested' is deprecated \\\[-Wdeprecated-declarations\\\]" } abort (); - omp_set_nested (0); - if (omp_get_nested ()) + omp_set_nested (0); // { dg-warning "'omp_set_nested' is deprecated \\\[-Wdeprecated-declarations\\\]" } + if (omp_get_nested ()) // { dg-warning "'omp_get_nested' is deprecated \\\[-Wdeprecated-declarations\\\]" } abort (); omp_set_num_threads (5); diff --git a/libgomp/testsuite/libgomp.c/loop-24.c b/libgomp/testsuite/libgomp.c/loop-24.c index 24aa01e0889d..4d09c3bebe1a 100644 --- a/libgomp/testsuite/libgomp.c/loop-24.c +++ b/libgomp/testsuite/libgomp.c/loop-24.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +// { dg-additional-options "-Wno-deprecated-openmp" } extern void abort (void); diff --git a/libgomp/testsuite/libgomp.c/nestedfn-2.c b/libgomp/testsuite/libgomp.c/nestedfn-2.c index fdbbe0f735c9..560850180655 100644 --- a/libgomp/testsuite/libgomp.c/nestedfn-2.c +++ b/libgomp/testsuite/libgomp.c/nestedfn-2.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +// { dg-additional-options "-Wno-deprecated-openmp" } extern void abort (void); diff --git a/libgomp/testsuite/libgomp.c/nestedfn-3.c b/libgomp/testsuite/libgomp.c/nestedfn-3.c index 8f8847f97e99..ebb0c5ea2930 100644 --- a/libgomp/testsuite/libgomp.c/nestedfn-3.c +++ b/libgomp/testsuite/libgomp.c/nestedfn-3.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +// { dg-additional-options "-Wno-deprecated-openmp" } #include diff --git a/libgomp/testsuite/libgomp.c/omp-proc-bind-master-dep.c b/libgomp/testsuite/libgomp.c/omp-proc-bind-master-dep.c new file mode 100644 index 000000000000..ebf2d9412b63 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/omp-proc-bind-master-dep.c @@ -0,0 +1,12 @@ +// { dg-do run } +// { dg-additional-options "-Wno-deprecated-openmp" } +#include +#include + +int +main() +{ + if (omp_proc_bind_master != omp_proc_bind_primary) // { dg-warning "'omp_proc_bind_master' is deprecated \\\[-Wdeprecated-declarations\\\]" } + abort(); + return 0; +} diff --git a/libgomp/testsuite/libgomp.c/pr104385.c b/libgomp/testsuite/libgomp.c/pr104385.c index 07495e65e580..b61170771f10 100644 --- a/libgomp/testsuite/libgomp.c/pr104385.c +++ b/libgomp/testsuite/libgomp.c/pr104385.c @@ -1,5 +1,5 @@ /* PR libgomp/104385 */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include int diff --git a/libgomp/testsuite/libgomp.c/target-31.c b/libgomp/testsuite/libgomp.c/target-31.c index 1123b7ea5610..4b54f8b4566c 100644 --- a/libgomp/testsuite/libgomp.c/target-31.c +++ b/libgomp/testsuite/libgomp.c/target-31.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c/target-34.c b/libgomp/testsuite/libgomp.c/target-34.c index 66d9f54202be..beef8436b8fd 100644 --- a/libgomp/testsuite/libgomp.c/target-34.c +++ b/libgomp/testsuite/libgomp.c/target-34.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-declarations -Wno-deprecated-openmp" } extern void abort (void); int diff --git a/libgomp/testsuite/libgomp.c/target-critical-1.c b/libgomp/testsuite/libgomp.c/target-critical-1.c index 84ad55823cb7..862ab5d232ab 100644 --- a/libgomp/testsuite/libgomp.c/target-critical-1.c +++ b/libgomp/testsuite/libgomp.c/target-critical-1.c @@ -1,5 +1,5 @@ /* { dg-do run } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c/task-1.c b/libgomp/testsuite/libgomp.c/task-1.c index d17c3c61c2f7..dd395d6116a9 100644 --- a/libgomp/testsuite/libgomp.c/task-1.c +++ b/libgomp/testsuite/libgomp.c/task-1.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } extern void abort (void); int a = 18; diff --git a/libgomp/testsuite/libgomp.c/task-3.c b/libgomp/testsuite/libgomp.c/task-3.c index 5657346bd158..b4315789b53e 100644 --- a/libgomp/testsuite/libgomp.c/task-3.c +++ b/libgomp/testsuite/libgomp.c/task-3.c @@ -1,5 +1,5 @@ /* { dg-do run } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include extern void abort (); diff --git a/libgomp/testsuite/libgomp.c/task-6.c b/libgomp/testsuite/libgomp.c/task-6.c index e5fc758d2834..f400616022fb 100644 --- a/libgomp/testsuite/libgomp.c/task-6.c +++ b/libgomp/testsuite/libgomp.c/task-6.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include diff --git a/libgomp/testsuite/libgomp.c/task-reduction-1.c b/libgomp/testsuite/libgomp.c/task-reduction-1.c index 224d995bd131..ffbcbbaca81c 100644 --- a/libgomp/testsuite/libgomp.c/task-reduction-1.c +++ b/libgomp/testsuite/libgomp.c/task-reduction-1.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } typedef __SIZE_TYPE__ size_t; extern void abort (void); diff --git a/libgomp/testsuite/libgomp.c/task-reduction-2.c b/libgomp/testsuite/libgomp.c/task-reduction-2.c index f5d48c36873c..680484d247f6 100644 --- a/libgomp/testsuite/libgomp.c/task-reduction-2.c +++ b/libgomp/testsuite/libgomp.c/task-reduction-2.c @@ -1,3 +1,4 @@ +// { dg-additional-options "-Wno-deprecated-openmp" } typedef __SIZE_TYPE__ size_t; extern void abort (void); diff --git a/libgomp/testsuite/libgomp.c/teams-1.c b/libgomp/testsuite/libgomp.c/teams-1.c index 09b357062f8a..67616e652ff2 100644 --- a/libgomp/testsuite/libgomp.c/teams-1.c +++ b/libgomp/testsuite/libgomp.c/teams-1.c @@ -1,5 +1,3 @@ -/* { dg-additional-options "-Wno-deprecated-declarations" } */ - #include #include @@ -7,7 +5,7 @@ int main () { omp_set_dynamic (0); - omp_set_nested (1); + omp_set_nested (1); // { dg-warning "'omp_set_nested' is deprecated \\\[-Wdeprecated-declarations\\\]" } #pragma omp teams thread_limit (2) { #pragma omp distribute dist_schedule(static,1) diff --git a/libgomp/testsuite/libgomp.c/vla-1.c b/libgomp/testsuite/libgomp.c/vla-1.c index bdacdbbe8836..fa1ab7a24432 100644 --- a/libgomp/testsuite/libgomp.c/vla-1.c +++ b/libgomp/testsuite/libgomp.c/vla-1.c @@ -1,5 +1,5 @@ /* { dg-do run } */ - +// { dg-additional-options "-Wno-deprecated-openmp" } #include #include #include diff --git a/libgomp/testsuite/libgomp.fortran/crayptr1.f90 b/libgomp/testsuite/libgomp.fortran/crayptr1.f90 index 2340257f3f60..b18f8ad3fd6a 100644 --- a/libgomp/testsuite/libgomp.fortran/crayptr1.f90 +++ b/libgomp/testsuite/libgomp.fortran/crayptr1.f90 @@ -1,6 +1,6 @@ ! { dg-do run } ! { dg-options "-fcray-pointer" } - +! { dg-additional-options "-Wno-deprecated-openmp" } use omp_lib integer :: a, b, c, p logical :: l diff --git a/libgomp/testsuite/libgomp.fortran/depend-inoutset-1.f90 b/libgomp/testsuite/libgomp.fortran/depend-inoutset-1.f90 index 6953b592095f..c826941bd171 100644 --- a/libgomp/testsuite/libgomp.fortran/depend-inoutset-1.f90 +++ b/libgomp/testsuite/libgomp.fortran/depend-inoutset-1.f90 @@ -1,5 +1,5 @@ ! { dg-additional-sources my-usleep.c } -! { dg-additional-options -Wno-complain-wrong-lang } +! { dg-additional-options "-Wno-complain-wrong-lang -Wno-deprecated-openmp" } program main use omp_lib diff --git a/libgomp/testsuite/libgomp.fortran/is_device_ptr-1.f90 b/libgomp/testsuite/libgomp.fortran/is_device_ptr-1.f90 index 30a927a19ba1..abf3abb8d83b 100644 --- a/libgomp/testsuite/libgomp.fortran/is_device_ptr-1.f90 +++ b/libgomp/testsuite/libgomp.fortran/is_device_ptr-1.f90 @@ -1,5 +1,4 @@ -! { dg-additional-options "-fdump-tree-original" } - +! { dg-additional-options "-fdump-tree-original -Wno-deprecated-openmp" } ! PR fortran/98476 program abc diff --git a/libgomp/testsuite/libgomp.fortran/is_device_ptr-2.f90 b/libgomp/testsuite/libgomp.fortran/is_device_ptr-2.f90 index 5b7fab075aee..a6a846e5e3fa 100644 --- a/libgomp/testsuite/libgomp.fortran/is_device_ptr-2.f90 +++ b/libgomp/testsuite/libgomp.fortran/is_device_ptr-2.f90 @@ -1,7 +1,7 @@ -! { dg-additional-options "-fdump-tree-original" } +! { dg-additional-options "-fdump-tree-original -Wno-deprecated-openmp" } ! ! Since OpenMP 5.1, non-TYPE(c_ptr) arguments to is_device_ptr -! map to has_device_ptr - check this! +! map to has_device_addr - check this! ! ! PR fortran/105318 ! @@ -73,7 +73,7 @@ contains if (false_) then !$omp target device(omp_invalid_device) !$omp end target - end if + end if end subroutine end module m diff --git a/libgomp/testsuite/libgomp.fortran/lib1.f90 b/libgomp/testsuite/libgomp.fortran/lib1.f90 index c99eb7bdd6d7..1b74739f83aa 100644 --- a/libgomp/testsuite/libgomp.fortran/lib1.f90 +++ b/libgomp/testsuite/libgomp.fortran/lib1.f90 @@ -1,6 +1,5 @@ ! { dg-do run } -! { dg-additional-options "-Wno-deprecated-declarations" } - +! { dg-additional-options "-Wno-deprecated-declarations -Wno-deprecated-openmp" } use omp_lib double precision :: d, e diff --git a/libgomp/testsuite/libgomp.fortran/lib2.f b/libgomp/testsuite/libgomp.fortran/lib2.f index a25611bb4d0a..9051e72cf6ed 100644 --- a/libgomp/testsuite/libgomp.fortran/lib2.f +++ b/libgomp/testsuite/libgomp.fortran/lib2.f @@ -1,5 +1,5 @@ C { dg-do run } -C { dg-additional-options "-Wno-deprecated-declarations" } +C { dg-additional-options "-Wno-deprecated-declarations -Wno-deprecated-openmp" } USE OMP_LIB diff --git a/libgomp/testsuite/libgomp.fortran/lib3.f b/libgomp/testsuite/libgomp.fortran/lib3.f index 34d9b64d9a3b..b13a7e5aadf0 100644 --- a/libgomp/testsuite/libgomp.fortran/lib3.f +++ b/libgomp/testsuite/libgomp.fortran/lib3.f @@ -1,5 +1,5 @@ -C { dg-do run } - +! { dg-do run } +! { dg-additional-options "-Wno-deprecated-openmp" } INCLUDE "omp_lib.h" DOUBLE PRECISION :: D, E diff --git a/libgomp/testsuite/libgomp.fortran/omp-atv-seq-dep.f90 b/libgomp/testsuite/libgomp.fortran/omp-atv-seq-dep.f90 new file mode 100644 index 000000000000..8c2e8ae99119 --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/omp-atv-seq-dep.f90 @@ -0,0 +1,7 @@ +! { dg-do run } + +program omp_atv_seq_dep + use omp_lib ! { dg-warning "Using parameter 'omp_atv_sequential' declared at \\(1\\) is deprecated \\\[-Wdeprecated-declarations\\\]" } + integer :: x + x = omp_atv_sequential +end program diff --git a/libgomp/testsuite/libgomp.fortran/omp-lock-hint-contended-dep.f90 b/libgomp/testsuite/libgomp.fortran/omp-lock-hint-contended-dep.f90 new file mode 100644 index 000000000000..2c3c9e1421a2 --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/omp-lock-hint-contended-dep.f90 @@ -0,0 +1,8 @@ +! { dg-do compile } + +program hint_contended_dep + use omp_lib ! { dg-warning "Using parameter 'omp_lock_hint_contended' declared at \\(1\\) is deprecated \\\[-Wdeprecated-declarations\\\]" } + integer (kind=omp_lock_kind) :: lock + call omp_init_lock_with_hint(lock, omp_lock_hint_contended) + call omp_destroy_lock(lock) +end program diff --git a/libgomp/testsuite/libgomp.fortran/omp-lock-hint-none-dep.f90 b/libgomp/testsuite/libgomp.fortran/omp-lock-hint-none-dep.f90 new file mode 100644 index 000000000000..c6c9ff9dbfe3 --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/omp-lock-hint-none-dep.f90 @@ -0,0 +1,8 @@ +! { dg-do compile } + +program hint_none_dep + use omp_lib ! { dg-warning "Using parameter 'omp_lock_hint_none' declared at \\(1\\) is deprecated \\\[-Wdeprecated-declarations\\\]" } + integer (kind=omp_lock_kind) :: lock + call omp_init_lock_with_hint(lock, omp_lock_hint_none) + call omp_destroy_lock(lock) +end program diff --git a/libgomp/testsuite/libgomp.fortran/omp-lock-hint-speculative-dep.f90 b/libgomp/testsuite/libgomp.fortran/omp-lock-hint-speculative-dep.f90 new file mode 100644 index 000000000000..2dad28b0ac45 --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/omp-lock-hint-speculative-dep.f90 @@ -0,0 +1,8 @@ +! { dg-do compile } + +program hint_speculative_dep + use omp_lib ! { dg-warning "Using parameter 'omp_lock_hint_speculative' declared at \\(1\\) is deprecated \\\[-Wdeprecated-declarations\\\]" } + integer (kind=omp_lock_kind) :: lock + call omp_init_lock_with_hint(lock, omp_lock_hint_speculative) + call omp_destroy_lock(lock) +end program diff --git a/libgomp/testsuite/libgomp.fortran/omp-lock-hint-uncontended-dep.f90 b/libgomp/testsuite/libgomp.fortran/omp-lock-hint-uncontended-dep.f90 new file mode 100644 index 000000000000..1150c58dc689 --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/omp-lock-hint-uncontended-dep.f90 @@ -0,0 +1,8 @@ +! { dg-do compile } + +program hint_uncontended_dep + use omp_lib ! { dg-warning "Using parameter 'omp_lock_hint_uncontended' declared at \\(1\\) is deprecated \\\[-Wdeprecated-declarations\\\]" } + integer (kind=omp_lock_kind) :: lock + call omp_init_lock_with_hint(lock, omp_lock_hint_uncontended) + call omp_destroy_lock(lock) +end program diff --git a/libgomp/testsuite/libgomp.fortran/omp_parse2.f90 b/libgomp/testsuite/libgomp.fortran/omp_parse2.f90 index 3de6968bae28..4cdd5e95ebed 100644 --- a/libgomp/testsuite/libgomp.fortran/omp_parse2.f90 +++ b/libgomp/testsuite/libgomp.fortran/omp_parse2.f90 @@ -1,4 +1,5 @@ ! { dg-do run } +! { dg-additional-options "-Wno-deprecated-openmp" } use omp_lib call test_master call test_critical @@ -14,14 +15,14 @@ contains !$omp master i = .true. j = omp_get_thread_num () .eq. 0 -!$omp endmaster +!$omp end master !$omp end parallel if (.not. (i .or. j)) stop 1 end subroutine test_master subroutine test_critical_1 (i, j) integer :: i, j -!$omp critical(critical_foo) +!$omp critical(critical_foo) i = i + 1 !$omp end critical (critical_foo) !$omp critical diff --git a/libgomp/testsuite/libgomp.fortran/openmp_version-1.f b/libgomp/testsuite/libgomp.fortran/openmp_version-1.f index 78d4b981f6b1..4f194346cf33 100644 --- a/libgomp/testsuite/libgomp.fortran/openmp_version-1.f +++ b/libgomp/testsuite/libgomp.fortran/openmp_version-1.f @@ -4,6 +4,6 @@ implicit none include "omp_lib.h" - if (openmp_version .ne. 201511) stop 1; + if (openmp_version .ne. 202111) stop 1; end program main diff --git a/libgomp/testsuite/libgomp.fortran/openmp_version-2.f90 b/libgomp/testsuite/libgomp.fortran/openmp_version-2.f90 index 693dba0b3f54..97e22c00cdf3 100644 --- a/libgomp/testsuite/libgomp.fortran/openmp_version-2.f90 +++ b/libgomp/testsuite/libgomp.fortran/openmp_version-2.f90 @@ -4,6 +4,6 @@ program main use omp_lib implicit none - if (openmp_version .ne. 201511) stop 1; + if (openmp_version .ne. 202111) stop 1; end program main diff --git a/libgomp/testsuite/libgomp.fortran/parallel-master.f90 b/libgomp/testsuite/libgomp.fortran/parallel-master.f90 index 1e30b4807ef7..e9ac5129bbab 100644 --- a/libgomp/testsuite/libgomp.fortran/parallel-master.f90 +++ b/libgomp/testsuite/libgomp.fortran/parallel-master.f90 @@ -1,4 +1,4 @@ -! { dg-additional-options "-fdump-tree-original" } +! { dg-additional-options "-fdump-tree-original -Wno-deprecated-openmp" } program main use omp_lib implicit none (type, external) diff --git a/libgomp/testsuite/libgomp.fortran/pointer2.f90 b/libgomp/testsuite/libgomp.fortran/pointer2.f90 index 3db052e72aa1..b8cda3708960 100644 --- a/libgomp/testsuite/libgomp.fortran/pointer2.f90 +++ b/libgomp/testsuite/libgomp.fortran/pointer2.f90 @@ -1,5 +1,6 @@ ! { dg-do run } ! { dg-require-effective-target tls_runtime } +! { dg-additional-options "-Wno-deprecated-openmp" } integer, pointer, save :: thr(:) !$omp threadprivate (thr) integer, target :: s(3), t(3), u(3) diff --git a/libgomp/testsuite/libgomp.fortran/reduction6.f90 b/libgomp/testsuite/libgomp.fortran/reduction6.f90 index 24d849cc60ff..817a28ddeafa 100644 --- a/libgomp/testsuite/libgomp.fortran/reduction6.f90 +++ b/libgomp/testsuite/libgomp.fortran/reduction6.f90 @@ -1,5 +1,5 @@ ! { dg-do run } - +! { dg-additional-options "-Wno-deprecated-openmp" } integer, dimension (6, 6) :: a character (36) :: c integer nthreads diff --git a/libgomp/testsuite/libgomp.fortran/target-firstprivate-1.f90 b/libgomp/testsuite/libgomp.fortran/target-firstprivate-1.f90 index 7b77992a21dd..8da507cb5ed3 100644 --- a/libgomp/testsuite/libgomp.fortran/target-firstprivate-1.f90 +++ b/libgomp/testsuite/libgomp.fortran/target-firstprivate-1.f90 @@ -1,5 +1,5 @@ ! PR fortran/104949 - +! { dg-additional-options "-Wno-deprecated-openmp" } implicit none (type,external) integer, allocatable :: A(:) A = [1,2,3,4,5,6] diff --git a/libgomp/testsuite/libgomp.fortran/use_device_addr-1.f90 b/libgomp/testsuite/libgomp.fortran/use_device_addr-1.f90 index 0254f2dc1960..2f3aa2b45c03 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_addr-1.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_addr-1.f90 @@ -1,4 +1,5 @@ ! { dg-do run } +! { dg-additional-options "-Wno-deprecated-openmp" } ! Comprehensive run-time test for use_device_addr ! ! Differs from use_device_addr-2.f90 by using a 8-byte variable (c_double) @@ -77,7 +78,6 @@ contains real(c_double), target :: from_r(:), to_r(:) ! The extra function is needed as is_device_ptr ! requires non-value, non-pointer dummy arguments - !$omp target is_device_ptr(from_r, to_r) call copy3_scalar_int(from_r(1), to_r(1)) !$omp end target diff --git a/libgomp/testsuite/libgomp.fortran/use_device_addr-2.f90 b/libgomp/testsuite/libgomp.fortran/use_device_addr-2.f90 index 3dd1f90f04c7..ae56de6e973e 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_addr-2.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_addr-2.f90 @@ -1,4 +1,5 @@ ! { dg-do run } +! { dg-additional-options "-Wno-deprecated-openmp" } ! Comprehensive run-time test for use_device_addr ! ! Differs from use_device_addr-1.f90 by using a 4-byte variable (c_float) diff --git a/libgomp/testsuite/libgomp.fortran/use_device_addr-3.f90 b/libgomp/testsuite/libgomp.fortran/use_device_addr-3.f90 index a917d289fe8f..cd3642ca41c7 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_addr-3.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_addr-3.f90 @@ -1,5 +1,5 @@ ! { dg-do run } - +! { dg-additional-options "-Wno-deprecated-openmp" } ! Comprehensive run-time test for use_device_addr ! ! Tests array with array descriptor diff --git a/libgomp/testsuite/libgomp.fortran/use_device_addr-4.f90 b/libgomp/testsuite/libgomp.fortran/use_device_addr-4.f90 index e7b6c624f4ed..e930eb7fecd8 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_addr-4.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_addr-4.f90 @@ -1,5 +1,5 @@ ! { dg-do run } - +! { dg-additional-options "-Wno-deprecated-openmp" } ! Comprehensive run-time test for use_device_addr ! ! Tests array with array descriptor diff --git a/libgomp/testsuite/libgomp.fortran/use_device_addr-5.f90 b/libgomp/testsuite/libgomp.fortran/use_device_addr-5.f90 index 3124d60fe9be..8b94999af5f1 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_addr-5.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_addr-5.f90 @@ -1,3 +1,4 @@ +! { dg-additional-options "-Wno-deprecated-openmp" } program main use omp_lib implicit none diff --git a/libgomp/testsuite/libgomp.fortran/use_device_ptr-1.f90 b/libgomp/testsuite/libgomp.fortran/use_device_ptr-1.f90 index e5390e27a512..915e4bd52107 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_ptr-1.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_ptr-1.f90 @@ -1,5 +1,5 @@ ! { dg-do run } - +! { dg-additional-options "-Wno-deprecated-openmp" } module target_procs use iso_c_binding implicit none (type, external) diff --git a/libgomp/testsuite/libgomp.fortran/use_device_ptr-3.f90 b/libgomp/testsuite/libgomp.fortran/use_device_ptr-3.f90 index f2b33cd5e896..351ad7a2f594 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_ptr-3.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_ptr-3.f90 @@ -1,5 +1,5 @@ ! PR fortran/98858 -! +! { dg-additional-options "-Wno-deprecated-openmp" } ! Assumed-size array with use_device_ptr() ! program test_use_device_ptr diff --git a/libgomp/testsuite/libgomp.fortran/use_device_ptr-4.f90 b/libgomp/testsuite/libgomp.fortran/use_device_ptr-4.f90 index 8c361d1e3cd9..63ffa60a7336 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_ptr-4.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_ptr-4.f90 @@ -1,5 +1,5 @@ ! { dg-do run } -! +! { dg-additional-options "-Wno-deprecated-openmp" } ! Test user_device_ptr nested within another parallel ! construct ! diff --git a/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-1.f90 b/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-1.f90 index e92ee8bf573c..f1ee850d6fb0 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-1.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-1.f90 @@ -1,4 +1,5 @@ ! { dg-do run } +! { dg-additional-options "-Wno-deprecated-openmp" } ! Test whether use_device_ptr properly handles OPTIONAL arguments ! (Only case of present arguments is tested) program test_it diff --git a/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-2.f90 b/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-2.f90 index 7a4aaae52cbd..7033b7aa9627 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-2.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-2.f90 @@ -1,4 +1,5 @@ ! { dg-do run } +! { dg-additional-options "-Wno-deprecated-openmp" } ! Check whether absent optional arguments are properly ! handled with use_device_{addr,ptr}. program main diff --git a/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-3.f90 b/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-3.f90 index b06a88415b47..01cd4cfb5703 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-3.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-3.f90 @@ -1,4 +1,5 @@ ! { dg-do run } +! { dg-additional-options "-Wno-deprecated-openmp" } ! Check whether absent optional arguments are properly ! handled with use_device_{addr,ptr}. program main