From: Thomas Schwinge Date: Thu, 30 Apr 2020 07:07:06 +0000 (+0200) Subject: [OpenMP, gimplifier] 'inform' after 'error' diagnostic X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f2ab6b89e170f1343f935761481c3745fe603b1;p=gcc.git [OpenMP, gimplifier] 'inform' after 'error' diagnostic This is not a thorough review of the code, just a few cases I noticed while scanning 'gcc/gimplify.c' for "enclosing". gcc/ * gimplify.c (omp_notice_threadprivate_variable) (omp_default_clause, omp_notice_variable): 'inform' after 'error' diagnostic. Adjust all users. gcc/testsuite/ * c-c++-common/gomp/default-1.c: Update. * c-c++-common/gomp/defaultmap-3.c: Likewise. * c-c++-common/gomp/order-4.c: Likewise. * g++.dg/gomp/parallel-2.C: Likewise. * g++.dg/gomp/predetermined-1.C: Likewise. * g++.dg/gomp/sharing-1.C: Likewise. * gcc.dg/gomp/appendix-a/a.24.1.c: Likewise. * gcc.dg/gomp/parallel-2.c: Likewise. * gcc.dg/gomp/pr44085.c: Likewise. * gcc.dg/gomp/sharing-1.c: Likewise. * gcc.dg/gomp/vla-1.c: Likewise. * gfortran.dg/gomp/appendix-a/a.24.1.f90: Likewise. * gfortran.dg/gomp/crayptr3.f90: Likewise. * gfortran.dg/gomp/pr33439.f90: Likewise. * gfortran.dg/gomp/pr44036-1.f90: Likewise. * gfortran.dg/gomp/pr44085.f90: Likewise. * gfortran.dg/gomp/pr44536.f90: Likewise. * gfortran.dg/gomp/pr94672.f90: Likewise. * gfortran.dg/gomp/sharing-1.f90: Likewise. * gfortran.dg/gomp/sharing-2.f90: Likewise. * gfortran.dg/gomp/sharing-3.f90: Likewise. --- diff --git a/gcc/gimplify.c b/gcc/gimplify.c index ab3408f480e..968fae2f1a3 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -7096,13 +7096,13 @@ omp_notice_threadprivate_variable (struct gimplify_omp_ctx *ctx, tree decl, { error ("threadprivate variable %qE used in a region with" " % clause", DECL_NAME (decl)); - error_at (octx->location, "enclosing region"); + inform (octx->location, "enclosing region"); } else { error ("threadprivate variable %qE used in target region", DECL_NAME (decl)); - error_at (octx->location, "enclosing target region"); + inform (octx->location, "enclosing target region"); } splay_tree_insert (octx->variables, (splay_tree_key)decl, 0); } @@ -7117,7 +7117,7 @@ omp_notice_threadprivate_variable (struct gimplify_omp_ctx *ctx, tree decl, { error ("threadprivate variable %qE used in untied task", DECL_NAME (decl)); - error_at (ctx->location, "enclosing task"); + inform (ctx->location, "enclosing task"); splay_tree_insert (ctx->variables, (splay_tree_key)decl, 0); } if (decl2) @@ -7195,7 +7195,7 @@ omp_default_clause (struct gimplify_omp_ctx *ctx, tree decl, error ("%qE not specified in enclosing %qs", DECL_NAME (lang_hooks.decls.omp_report_decl (decl)), rtype); - error_at (ctx->location, "enclosing %qs", rtype); + inform (ctx->location, "enclosing %qs", rtype); } /* FALLTHRU */ case OMP_CLAUSE_DEFAULT_SHARED: @@ -7476,7 +7476,7 @@ omp_notice_variable (struct gimplify_omp_ctx *ctx, tree decl, bool in_code) tree d = lang_hooks.decls.omp_report_decl (decl); error ("%qE not specified in enclosing %", DECL_NAME (d)); - error_at (ctx->location, "enclosing %"); + inform (ctx->location, "enclosing %"); } else if (ctx->defaultmap[gdmk] & (GOVD_MAP_0LEN_ARRAY | GOVD_FIRSTPRIVATE)) diff --git a/gcc/testsuite/c-c++-common/gomp/default-1.c b/gcc/testsuite/c-c++-common/gomp/default-1.c index 6525483c44e..eab46892dad 100644 --- a/gcc/testsuite/c-c++-common/gomp/default-1.c +++ b/gcc/testsuite/c-c++-common/gomp/default-1.c @@ -2,20 +2,20 @@ void foo (void) { int x = 0, i; - #pragma omp task default(none) /* { dg-error "enclosing 'task'" } */ + #pragma omp task default(none) /* { dg-message "note: enclosing 'task'" } */ { x++; /* { dg-error "'x' not specified in enclosing 'task'" } */ } - #pragma omp taskloop default(none) /* { dg-error "enclosing 'taskloop'" } */ + #pragma omp taskloop default(none) /* { dg-message "note: enclosing 'taskloop'" } */ for (i = 0; i < 64; i++) { x++; /* { dg-error "'x' not specified in enclosing 'taskloop'" } */ } - #pragma omp teams default(none) /* { dg-error "enclosing 'teams'" } */ + #pragma omp teams default(none) /* { dg-message "note: enclosing 'teams'" } */ { x++; /* { dg-error "'x' not specified in enclosing 'teams'" } */ } - #pragma omp parallel default(none) /* { dg-error "enclosing 'parallel'" } */ + #pragma omp parallel default(none) /* { dg-message "note: enclosing 'parallel'" } */ { x++; /* { dg-error "'x' not specified in enclosing 'parallel'" } */ } diff --git a/gcc/testsuite/c-c++-common/gomp/defaultmap-3.c b/gcc/testsuite/c-c++-common/gomp/defaultmap-3.c index 2f5b303958f..8be23fd1473 100644 --- a/gcc/testsuite/c-c++-common/gomp/defaultmap-3.c +++ b/gcc/testsuite/c-c++-common/gomp/defaultmap-3.c @@ -11,7 +11,7 @@ f1 (int sc1, struct S ag1, int *pt1) { char ar1[N]; foo (ar1); - #pragma omp target defaultmap(default:scalar) defaultmap(to:aggregate) defaultmap(none:pointer) /* { dg-error "enclosing 'target'" } */ + #pragma omp target defaultmap(default:scalar) defaultmap(to:aggregate) defaultmap(none:pointer) /* { dg-message "note: enclosing 'target'" } */ bar (sc1, ar1, ag1, pt1); /* { dg-error "'pt1' not specified in enclosing 'target'" } */ } @@ -20,7 +20,7 @@ f2 (int sc2, struct S ag2, int *pt2) { char ar2[N]; foo (ar2); - #pragma omp target defaultmap(none:scalar) defaultmap(from:aggregate) defaultmap(default:pointer) /* { dg-error "enclosing 'target'" } */ + #pragma omp target defaultmap(none:scalar) defaultmap(from:aggregate) defaultmap(default:pointer) /* { dg-message "note: enclosing 'target'" } */ bar (sc2, ar2, ag2, pt2); /* { dg-error "'sc2' not specified in enclosing 'target'" } */ } @@ -29,6 +29,6 @@ f3 (int sc3, struct S ag3, int *pt3) { char ar3[N]; foo (ar3); - #pragma omp target defaultmap(firstprivate:scalar) defaultmap(none:aggregate) defaultmap(to:pointer) /* { dg-error "enclosing 'target'" } */ + #pragma omp target defaultmap(firstprivate:scalar) defaultmap(none:aggregate) defaultmap(to:pointer) /* { dg-message "note: enclosing 'target'" } */ bar (sc3, ar3, ag3, pt3); /* { dg-error "'ar3' not specified in enclosing 'target'" } */ } /* { dg-error "'ag3' not specified in enclosing 'target'" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/c-c++-common/gomp/order-4.c b/gcc/testsuite/c-c++-common/gomp/order-4.c index f916772ceea..d1109bb13b3 100644 --- a/gcc/testsuite/c-c++-common/gomp/order-4.c +++ b/gcc/testsuite/c-c++-common/gomp/order-4.c @@ -5,7 +5,7 @@ void f1 (void) { int i; - #pragma omp simd order(concurrent) /* { dg-error "enclosing region" } */ + #pragma omp simd order(concurrent) /* { dg-message "note: enclosing region" } */ for (i = 0; i < 64; i++) t++; /* { dg-error "threadprivate variable 't' used in a region with 'order\\(concurrent\\)' clause" } */ } @@ -14,8 +14,8 @@ void f2 (void) { int i; - #pragma omp for simd order(concurrent) /* { dg-error "enclosing region" } */ - for (i = 0; i < 64; i++) /* { dg-error "enclosing region" "" { target c++ } } */ + #pragma omp for simd order(concurrent) /* { dg-message "note: enclosing region" } */ + for (i = 0; i < 64; i++) /* { dg-message "note: enclosing region" "" { target c++ } } */ t++; /* { dg-error "threadprivate variable 't' used in a region with 'order\\(concurrent\\)' clause" } */ } @@ -23,7 +23,7 @@ void f3 (void) { int i; - #pragma omp for order(concurrent) /* { dg-error "enclosing region" } */ + #pragma omp for order(concurrent) /* { dg-message "note: enclosing region" } */ for (i = 0; i < 64; i++) t++; /* { dg-error "threadprivate variable 't' used in a region with 'order\\(concurrent\\)' clause" } */ } diff --git a/gcc/testsuite/g++.dg/gomp/parallel-2.C b/gcc/testsuite/g++.dg/gomp/parallel-2.C index 68e577766b1..38875ad94ed 100644 --- a/gcc/testsuite/g++.dg/gomp/parallel-2.C +++ b/gcc/testsuite/g++.dg/gomp/parallel-2.C @@ -4,11 +4,11 @@ void foo() { int i; - #pragma omp parallel default(none) // { dg-error "enclosing" } + #pragma omp parallel default(none) // { dg-message "note: enclosing 'parallel'" } { #pragma omp parallel { - #pragma omp parallel default(none) // { dg-error "enclosing" } + #pragma omp parallel default(none) // { dg-message "note: enclosing 'parallel'" } { i++; // { dg-error "not specified" } } diff --git a/gcc/testsuite/g++.dg/gomp/predetermined-1.C b/gcc/testsuite/g++.dg/gomp/predetermined-1.C index 084f04ec90f..74cd74febdf 100644 --- a/gcc/testsuite/g++.dg/gomp/predetermined-1.C +++ b/gcc/testsuite/g++.dg/gomp/predetermined-1.C @@ -15,19 +15,19 @@ const A foo (const A d, const C e) const A f; const B b = { 4 }; A g; - #pragma omp parallel default (none) // { dg-error "enclosing 'parallel'" } + #pragma omp parallel default (none) // { dg-message "note: enclosing 'parallel'" } bar (&a); // { dg-error "not specified" } - #pragma omp parallel default (none) // { dg-error "enclosing 'parallel'" } + #pragma omp parallel default (none) // { dg-message "note: enclosing 'parallel'" } bar (&b); // { dg-error "not specified" } - #pragma omp parallel default (none) // { dg-error "enclosing 'parallel'" } + #pragma omp parallel default (none) // { dg-message "note: enclosing 'parallel'" } bar (&c); // { dg-error "not specified" } - #pragma omp parallel default (none) // { dg-error "enclosing 'parallel'" } + #pragma omp parallel default (none) // { dg-message "note: enclosing 'parallel'" } bar (&d); // { dg-error "not specified" } - #pragma omp parallel default (none) // { dg-error "enclosing 'parallel'" } + #pragma omp parallel default (none) // { dg-message "note: enclosing 'parallel'" } bar (&e); // { dg-error "not specified" } - #pragma omp parallel default (none) // { dg-error "enclosing 'parallel'" } + #pragma omp parallel default (none) // { dg-message "note: enclosing 'parallel'" } bar (&f); // { dg-error "not specified" } - #pragma omp parallel default (none) // { dg-error "enclosing 'parallel'" } + #pragma omp parallel default (none) // { dg-message "note: enclosing 'parallel'" } bar (&g); // { dg-error "not specified" } return f; } diff --git a/gcc/testsuite/g++.dg/gomp/sharing-1.C b/gcc/testsuite/g++.dg/gomp/sharing-1.C index ac6908b68ac..4506170c247 100644 --- a/gcc/testsuite/g++.dg/gomp/sharing-1.C +++ b/gcc/testsuite/g++.dg/gomp/sharing-1.C @@ -52,7 +52,7 @@ main (void) *p = 7; s = 6; l = 0; -#pragma omp parallel for /* { dg-error "enclosing 'parallel'" } */ \ +#pragma omp parallel for /* { dg-message "note: enclosing 'parallel'" } */ \ default (none) private (p) shared (s) for (i = 0; i < 64; i++) { diff --git a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.24.1.c b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.24.1.c index 099f03fe89d..47b2511508e 100644 --- a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.24.1.c +++ b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.24.1.c @@ -21,7 +21,7 @@ a24 (int a) is listed in shared clause */ z[i] = y; /* { dg-error "'i' not specified" "" { target *-*-* } .-1 } */ - /* { dg-error "enclosing 'parallel'" "" { target *-*-* } omp_parallel } */ + /* { dg-message "note: enclosing 'parallel'" "" { target *-*-* } omp_parallel } */ /* { dg-error "'y' not specified" "" { target *-*-* } .-3 } */ #pragma omp for firstprivate(y) for (i = 0; i < 10; i++) diff --git a/gcc/testsuite/gcc.dg/gomp/parallel-2.c b/gcc/testsuite/gcc.dg/gomp/parallel-2.c index 68e577766b1..b2d653db9e2 100644 --- a/gcc/testsuite/gcc.dg/gomp/parallel-2.c +++ b/gcc/testsuite/gcc.dg/gomp/parallel-2.c @@ -4,11 +4,11 @@ void foo() { int i; - #pragma omp parallel default(none) // { dg-error "enclosing" } + #pragma omp parallel default(none) // { dg-message "note: enclosing 'parallel'" } { #pragma omp parallel { - #pragma omp parallel default(none) // { dg-error "enclosing" } + #pragma omp parallel default(none) // { dg-message: "note: enclosing 'parallel'" } { i++; // { dg-error "not specified" } } diff --git a/gcc/testsuite/gcc.dg/gomp/pr44085.c b/gcc/testsuite/gcc.dg/gomp/pr44085.c index 55462abe504..3f3441bde88 100644 --- a/gcc/testsuite/gcc.dg/gomp/pr44085.c +++ b/gcc/testsuite/gcc.dg/gomp/pr44085.c @@ -9,7 +9,7 @@ int thr1, thr2; void foo (void) { -#pragma omp task untied /* { dg-error "enclosing task" } */ +#pragma omp task untied /* { dg-message "note: enclosing task" } */ { thr1++; /* { dg-error "used in untied task" } */ thr2 |= 4; /* { dg-error "used in untied task" } */ diff --git a/gcc/testsuite/gcc.dg/gomp/sharing-1.c b/gcc/testsuite/gcc.dg/gomp/sharing-1.c index 79abb64cdd7..2c6b01779d1 100644 --- a/gcc/testsuite/gcc.dg/gomp/sharing-1.c +++ b/gcc/testsuite/gcc.dg/gomp/sharing-1.c @@ -35,7 +35,7 @@ main (void) *p = 7; s = 6; l = 0; -#pragma omp parallel for /* { dg-error "enclosing 'parallel'" } */ \ +#pragma omp parallel for /* { dg-message "note: enclosing 'parallel'" } */ \ default (none) private (p) shared (s) for (i = 0; i < 64; i++) { diff --git a/gcc/testsuite/gcc.dg/gomp/vla-1.c b/gcc/testsuite/gcc.dg/gomp/vla-1.c index bb37f33e60f..dd42b9a0752 100644 --- a/gcc/testsuite/gcc.dg/gomp/vla-1.c +++ b/gcc/testsuite/gcc.dg/gomp/vla-1.c @@ -4,7 +4,7 @@ void foo(int n) { int A[n]; - #pragma omp parallel default(none) // { dg-error "enclosing" } + #pragma omp parallel default(none) // { dg-message "note: enclosing 'parallel'" } { A[0] = 0; // { dg-error "'A' not specified" } } diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 index 52a2cbb82da..3837aab6cca 100644 --- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 @@ -19,7 +19,7 @@ X=1 ! O.K. - X is THREADPRIVATE Z(I) = Y ! Error - cannot reference I or Y here ! { dg-error "'i' not specified" "" { target *-*-* } .-1 } */ -! { dg-error "enclosing 'parallel'" "" { target *-*-* } omp_parallel } */ +! { dg-message "note: enclosing 'parallel'" "" { target *-*-* } omp_parallel } */ ! { dg-error "'y' not specified" "" { target *-*-* } .-3 } */ !$OMP DO firstprivate(y) DO I = 1,10 diff --git a/gcc/testsuite/gfortran.dg/gomp/crayptr3.f90 b/gcc/testsuite/gfortran.dg/gomp/crayptr3.f90 index 15bf864997f..9a28bbc3cf2 100644 --- a/gcc/testsuite/gfortran.dg/gomp/crayptr3.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/crayptr3.f90 @@ -16,7 +16,7 @@ a = 1 !$omp end parallel -!$omp parallel default (none) ! { dg-error "enclosing 'parallel'" } +!$omp parallel default (none) ! { dg-message "note: enclosing 'parallel'" } a = 1 ! { dg-error "'ip' not specified in enclosing 'parallel'" } !$omp end parallel end diff --git a/gcc/testsuite/gfortran.dg/gomp/pr33439.f90 b/gcc/testsuite/gfortran.dg/gomp/pr33439.f90 index 42fa22184b3..12a73d22d1a 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr33439.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr33439.f90 @@ -5,7 +5,7 @@ subroutine pr33439_1 integer :: s, i s = 4 -!$omp parallel default(none) ! { dg-error "enclosing 'parallel'" } +!$omp parallel default(none) ! { dg-message "note: enclosing 'parallel'" } call somethingelse !$omp do schedule(static, s) ! { dg-error "not specified in enclosing 'parallel'" } do i = 1, 8 @@ -18,7 +18,7 @@ end subroutine pr33439_1 subroutine pr33439_2 integer :: s, i s = 4 -!$omp parallel default(none) ! { dg-error "enclosing 'parallel'" } +!$omp parallel default(none) ! { dg-message "note: enclosing 'parallel'" } !$omp do schedule(static, s) ! { dg-error "not specified in enclosing 'parallel'" } do i = 1, 8 call something @@ -30,7 +30,8 @@ end subroutine pr33439_2 subroutine pr33439_3 integer :: s, i s = 4 -!$omp parallel do default(none) schedule(static, s) ! { dg-error "enclosing 'parallel'" } +!$omp parallel do default(none) schedule(static, s) ! { dg-message "note: enclosing 'parallel'" } +! ! { dg-error "'s' not specified in enclosing 'parallel'" "" { target *-*-* } .-1 } do i = 1, 8 call something end do diff --git a/gcc/testsuite/gfortran.dg/gomp/pr44036-1.f90 b/gcc/testsuite/gfortran.dg/gomp/pr44036-1.f90 index 1caa93df8c3..ef90d132653 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr44036-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr44036-1.f90 @@ -11,14 +11,14 @@ subroutine foo(a, b) !$omp parallel default(none) private (x) x = a(4) !$omp end parallel -!$omp parallel default(none) private (x) ! { dg-error "enclosing 'parallel'" } +!$omp parallel default(none) private (x) ! { dg-message "note: enclosing 'parallel'" } x = b(5) ! { dg-error "not specified in" } !$omp end parallel !$omp parallel default(none) private (x) x = c(6) !$omp end parallel d => a -!$omp parallel default(none) private (x) ! { dg-error "enclosing 'parallel'" } +!$omp parallel default(none) private (x) ! { dg-message "note: enclosing 'parallel'" } x = d(7) ! { dg-error "not specified in" } !$omp end parallel end diff --git a/gcc/testsuite/gfortran.dg/gomp/pr44085.f90 b/gcc/testsuite/gfortran.dg/gomp/pr44085.f90 index db8fbbc9544..90094d6ef47 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr44085.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr44085.f90 @@ -8,7 +8,7 @@ common /thrs/ thr3, thr4 !$omp threadprivate (thr1, thr2, /thrs/) -!$omp task untied ! { dg-error "enclosing task" } +!$omp task untied ! { dg-message "note: enclosing task" } thr1 = thr1 + 1 ! { dg-error "used in untied task" } thr2 = thr2 + 2 ! { dg-error "used in untied task" } thr3 = thr3 + 3 ! { dg-error "used in untied task" } diff --git a/gcc/testsuite/gfortran.dg/gomp/pr44536.f90 b/gcc/testsuite/gfortran.dg/gomp/pr44536.f90 index 4fcf5d1102b..c1d83cdeae5 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr44536.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr44536.f90 @@ -4,7 +4,7 @@ subroutine foo (a, i, j) integer, dimension(:) :: a integer :: i, j -!$omp parallel default(none) shared(i, j) ! { dg-error "enclosing 'parallel'" } +!$omp parallel default(none) shared(i, j) ! { dg-message "note: enclosing 'parallel'" } j=a(i) ! { dg-error "not specified in" } !$omp end parallel end subroutine diff --git a/gcc/testsuite/gfortran.dg/gomp/pr94672.f90 b/gcc/testsuite/gfortran.dg/gomp/pr94672.f90 index 7b89c5df249..d1b066ca1ef 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr94672.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr94672.f90 @@ -93,35 +93,35 @@ end subroutine subroutine w1 (array) real, optional :: array(:) - !$omp parallel default(none) ! { dg-error "enclosing 'parallel'" } + !$omp parallel default(none) ! { dg-message "note: enclosing 'parallel'" } if (.not.present (array)) stop 1 ! { dg-error "'array' not specified in enclosing 'parallel'" } !$omp end parallel end subroutine subroutine w2 (array2) real, optional :: array2(*) - !$omp parallel default(none) ! { dg-error "enclosing 'parallel'" "TODO" { xfail *-*-* } } + !$omp parallel default(none) ! { dg-message "note: enclosing 'parallel'" "TODO" { xfail *-*-* } } if (.not.present (array2)) stop 2 ! { dg-error "'array2' not specified in enclosing 'parallel'" "TODO" { xfail *-*-* } } !$omp end parallel end subroutine subroutine w3 (arg) real, optional :: arg - !$omp parallel default(none) ! { dg-error "enclosing 'parallel'" } + !$omp parallel default(none) ! { dg-message "note: enclosing 'parallel'" } if (.not.present (arg)) stop 3 ! { dg-error "'arg' not specified in enclosing 'parallel'" } !$omp end parallel end subroutine subroutine w4 (arg2) real, value, optional :: arg2 - !$omp parallel default(none) ! { dg-error "enclosing 'parallel" "TODO" { xfail *-*-* } } + !$omp parallel default(none) ! { dg-message "note: enclosing 'parallel" "TODO" { xfail *-*-* } } if (.not.present (arg2)) stop 4 ! { dg-error "'arg2' not specified in enclosing 'parallel'" "TODO" { xfail *-*-*} } !$omp end parallel end subroutine subroutine w5 (array3) real, optional :: array3(..) - !$omp parallel default(none) ! { dg-error "enclosing 'parallel'" } + !$omp parallel default(none) ! { dg-message "note: enclosing 'parallel'" } if (.not.present (array3)) stop 5 ! { dg-error "'array3' not specified in enclosing 'parallel'" } !$omp end parallel end subroutine diff --git a/gcc/testsuite/gfortran.dg/gomp/sharing-1.f90 b/gcc/testsuite/gfortran.dg/gomp/sharing-1.f90 index ad9149ebe39..f4958b81d6c 100644 --- a/gcc/testsuite/gfortran.dg/gomp/sharing-1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/sharing-1.f90 @@ -9,7 +9,7 @@ !$omp threadprivate (/thrblk/, thrpriv) s = 1 !$omp parallel do default (none) & -!$omp & private (p) shared (s) ! { dg-error "enclosing 'parallel'" } +!$omp & private (p) shared (s) ! { dg-message "note: enclosing 'parallel'" } do i = 1, 64 call foo (thrpriv) ! Predetermined - threadprivate call foo (thr) ! Predetermined - threadprivate diff --git a/gcc/testsuite/gfortran.dg/gomp/sharing-2.f90 b/gcc/testsuite/gfortran.dg/gomp/sharing-2.f90 index bf5519070d4..acc8d37771c 100644 --- a/gcc/testsuite/gfortran.dg/gomp/sharing-2.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/sharing-2.f90 @@ -9,7 +9,7 @@ j = 8 end do !$omp end parallel do -!$omp parallel default (none) shared (a) ! { dg-error "enclosing 'parallel'" } +!$omp parallel default (none) shared (a) ! { dg-message "note: enclosing 'parallel'" } i = 1 j = 1 k = 1 @@ -28,7 +28,7 @@ end do !$omp end single !$omp end parallel -!$omp parallel default (none) shared (a) ! { dg-error "enclosing 'parallel'" } +!$omp parallel default (none) shared (a) ! { dg-message "note: enclosing 'parallel'" } i = 1 ! { dg-error "not specified in" } j = 1 ! { dg-error "not specified in" } k = 1 ! { dg-error "not specified in" } @@ -54,21 +54,21 @@ j = 1 k = 1 !$omp end parallel -!$omp parallel default (none) shared (a) ! { dg-error "enclosing 'parallel'" } +!$omp parallel default (none) shared (a) ! { dg-message "note: enclosing 'parallel'" } i = 1 ! { dg-error "not specified in" } !$omp do do i = 1, 10 a(i, 1) = i + 1 end do !$omp end parallel -!$omp parallel default (none) shared (a) ! { dg-error "enclosing 'parallel'" } +!$omp parallel default (none) shared (a) ! { dg-message "note: enclosing 'parallel'" } i = 1 ! { dg-error "not specified in" } !$omp parallel do default (none) shared (a) do i = 1, 10 a(i, 1) = i + 1 end do !$omp end parallel -!$omp parallel default (none) shared (a) ! { dg-error "enclosing 'parallel'" } +!$omp parallel default (none) shared (a) ! { dg-message "note: enclosing 'parallel'" } i = 1 ! { dg-error "not specified in" } !$omp parallel default (none) shared (a, i) i = 2 diff --git a/gcc/testsuite/gfortran.dg/gomp/sharing-3.f90 b/gcc/testsuite/gfortran.dg/gomp/sharing-3.f90 index 221ec002371..a9abc7b5a33 100644 --- a/gcc/testsuite/gfortran.dg/gomp/sharing-3.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/sharing-3.f90 @@ -25,7 +25,7 @@ subroutine foo (vara, varb, varc, vard, n) vard(1) = 1 vare(1) = 1 !$omp end parallel - !$omp parallel default(none) ! { dg-error "enclosing 'parallel'" } + !$omp parallel default(none) ! { dg-message "note: enclosing 'parallel'" } !$omp master vara(1) = 1 ! { dg-error "not specified" } varb(1) = 1 ! Assumed-size is predetermined