Hi! This makes it clearer to translators and users that parallel, teams etc. are keywords.
Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2017-03-30 Jakub Jelinek <ja...@redhat.com> PR translation/80189 * gimplify.c (omp_default_clause): Use %qs instead of %s in diagnostic messages. testsuite/ * g++.dg/gomp/predetermined-1.C: Adjust expected diagnostics. * g++.dg/gomp/sharing-1.C: Likewise. * gfortran.dg/gomp/pr44536.f90: Likewise. * gfortran.dg/gomp/pr44036-1.f90: Likewise. * gfortran.dg/gomp/sharing-3.f90: Likewise. * gfortran.dg/gomp/crayptr3.f90: Likewise. * gfortran.dg/gomp/pr33439.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.24.1.f90: Likewise. * gfortran.dg/gomp/sharing-1.f90: Likewise. * gfortran.dg/gomp/sharing-2.f90: Likewise. * gcc.dg/gomp/appendix-a/a.24.1.c: Likewise. * gcc.dg/gomp/sharing-1.c: Likewise. --- gcc/gimplify.c.jj 2017-03-23 15:49:56.000000000 +0100 +++ gcc/gimplify.c 2017-03-30 10:51:13.807725987 +0200 @@ -6847,9 +6847,9 @@ omp_default_clause (struct gimplify_omp_ else gcc_unreachable (); - error ("%qE not specified in enclosing %s", + error ("%qE not specified in enclosing %qs", DECL_NAME (lang_hooks.decls.omp_report_decl (decl)), rtype); - error_at (ctx->location, "enclosing %s", rtype); + error_at (ctx->location, "enclosing %qs", rtype); } /* FALLTHRU */ case OMP_CLAUSE_DEFAULT_SHARED: --- gcc/testsuite/g++.dg/gomp/predetermined-1.C.jj 2008-09-05 12:55:06.000000000 +0200 +++ gcc/testsuite/g++.dg/gomp/predetermined-1.C 2017-03-30 12:08:20.688180275 +0200 @@ -19,15 +19,15 @@ const A foo (const A d, const C e) bar (&a); #pragma omp parallel default (none) bar (&b); - #pragma omp parallel default (none) // { dg-error "enclosing parallel" } + #pragma omp parallel default (none) // { dg-error "enclosing 'parallel'" } bar (&c); // { dg-error "not specified" } #pragma omp parallel default (none) bar (&d); - #pragma omp parallel default (none) // { dg-error "enclosing parallel" } + #pragma omp parallel default (none) // { dg-error "enclosing 'parallel'" } bar (&e); // { dg-error "not specified" } #pragma omp parallel default (none) bar (&f); - #pragma omp parallel default (none) // { dg-error "enclosing parallel" } + #pragma omp parallel default (none) // { dg-error "enclosing 'parallel'" } bar (&g); // { dg-error "not specified" } return f; } --- gcc/testsuite/g++.dg/gomp/sharing-1.C.jj 2010-07-28 10:35:53.000000000 +0200 +++ gcc/testsuite/g++.dg/gomp/sharing-1.C 2017-03-30 12:07:54.785519542 +0200 @@ -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-error "enclosing 'parallel'" } */ \ default (none) private (p) shared (s) for (i = 0; i < 64; i++) { --- gcc/testsuite/gfortran.dg/gomp/pr44536.f90.jj 2010-06-16 10:23:58.000000000 +0200 +++ gcc/testsuite/gfortran.dg/gomp/pr44536.f90 2017-03-30 12:08:56.148715822 +0200 @@ -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-error "enclosing 'parallel'" } j=a(i) ! { dg-error "not specified in" } !$omp end parallel end subroutine --- gcc/testsuite/gfortran.dg/gomp/pr44036-1.f90.jj 2010-05-17 07:51:59.000000000 +0200 +++ gcc/testsuite/gfortran.dg/gomp/pr44036-1.f90 2017-03-30 12:10:01.746856635 +0200 @@ -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-error "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-error "enclosing 'parallel'" } x = d(7) ! { dg-error "not specified in" } !$omp end parallel end --- gcc/testsuite/gfortran.dg/gomp/sharing-3.f90.jj 2010-06-16 10:23:58.000000000 +0200 +++ gcc/testsuite/gfortran.dg/gomp/sharing-3.f90 2017-03-30 12:11:30.198698115 +0200 @@ -25,7 +25,7 @@ subroutine foo (vara, varb, varc, vard, vard(1) = 1 vare(1) = 1 !$omp end parallel - !$omp parallel default(none) ! { dg-error "enclosing parallel" } + !$omp parallel default(none) ! { dg-error "enclosing 'parallel'" } !$omp master vara(1) = 1 ! { dg-error "not specified" } varb(1) = 1 ! Assumed-size is predetermined --- gcc/testsuite/gfortran.dg/gomp/crayptr3.f90.jj 2008-09-05 12:55:10.000000000 +0200 +++ gcc/testsuite/gfortran.dg/gomp/crayptr3.f90 2017-03-30 12:09:39.877143079 +0200 @@ -16,7 +16,7 @@ a = 1 !$omp end parallel -!$omp parallel default (none) ! { dg-error "enclosing parallel" } - a = 1 ! { dg-error "'ip' not specified in enclosing parallel" } +!$omp parallel default (none) ! { dg-error "enclosing 'parallel'" } + a = 1 ! { dg-error "'ip' not specified in enclosing 'parallel'" } !$omp end parallel end --- gcc/testsuite/gfortran.dg/gomp/pr33439.f90.jj 2008-09-05 12:55:10.000000000 +0200 +++ gcc/testsuite/gfortran.dg/gomp/pr33439.f90 2017-03-30 12:10:32.119458822 +0200 @@ -5,9 +5,9 @@ subroutine pr33439_1 integer :: s, i s = 4 -!$omp parallel default(none) ! { dg-error "enclosing parallel" } +!$omp parallel default(none) ! { dg-error "enclosing 'parallel'" } call somethingelse -!$omp do schedule(static, s) ! { dg-error "not specified in enclosing parallel" } +!$omp do schedule(static, s) ! { dg-error "not specified in enclosing 'parallel'" } do i = 1, 8 call something end do @@ -18,8 +18,8 @@ end subroutine pr33439_1 subroutine pr33439_2 integer :: s, i s = 4 -!$omp parallel default(none) ! { dg-error "enclosing parallel" } -!$omp do schedule(static, s) ! { dg-error "not specified in enclosing parallel" } +!$omp parallel default(none) ! { dg-error "enclosing 'parallel'" } +!$omp do schedule(static, s) ! { dg-error "not specified in enclosing 'parallel'" } do i = 1, 8 call something end do @@ -30,7 +30,7 @@ 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-error "enclosing 'parallel'" } do i = 1, 8 call something end do --- gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90.jj 2010-07-28 10:35:54.000000000 +0200 +++ gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 2017-03-30 12:09:15.880457381 +0200 @@ -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 *-*-* } 20 } */ -! { dg-error "enclosing parallel" "" { target *-*-* } 14 } */ +! { dg-error "enclosing 'parallel'" "" { target *-*-* } 14 } */ ! { dg-error "'y' not specified" "" { target *-*-* } 20 } */ !$OMP DO firstprivate(y) DO I = 1,10 --- gcc/testsuite/gfortran.dg/gomp/sharing-1.f90.jj 2010-07-28 10:35:54.000000000 +0200 +++ gcc/testsuite/gfortran.dg/gomp/sharing-1.f90 2017-03-30 12:10:52.032198010 +0200 @@ -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-error "enclosing 'parallel'" } do i = 1, 64 call foo (thrpriv) ! Predetermined - threadprivate call foo (thr) ! Predetermined - threadprivate --- gcc/testsuite/gfortran.dg/gomp/sharing-2.f90.jj 2010-04-27 08:47:05.000000000 +0200 +++ gcc/testsuite/gfortran.dg/gomp/sharing-2.f90 2017-03-30 12:11:12.249933204 +0200 @@ -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-error "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-error "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-error "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-error "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-error "enclosing 'parallel'" } i = 1 ! { dg-error "not specified in" } !$omp parallel default (none) shared (a, i) i = 2 --- gcc/testsuite/gcc.dg/gomp/appendix-a/a.24.1.c.jj 2014-01-04 09:48:20.000000000 +0100 +++ gcc/testsuite/gcc.dg/gomp/appendix-a/a.24.1.c 2017-03-30 12:06:57.258273019 +0200 @@ -20,7 +20,7 @@ a24 (int a) /* - c has const-qualified type */ z[i] = y; /* { dg-error "'i' not specified" "" { target *-*-* } 21 } */ - /* { dg-error "enclosing parallel" "" { target *-*-* } 13 } */ + /* { dg-error "enclosing 'parallel'" "" { target *-*-* } 13 } */ /* { dg-error "'y' not specified" "" { target *-*-* } 21 } */ #pragma omp for firstprivate(y) for (i = 0; i < 10; i++) --- gcc/testsuite/gcc.dg/gomp/sharing-1.c.jj 2010-07-28 10:35:50.000000000 +0200 +++ gcc/testsuite/gcc.dg/gomp/sharing-1.c 2017-03-30 12:07:24.476916516 +0200 @@ -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-error "enclosing 'parallel'" } */ \ default (none) private (p) shared (s) for (i = 0; i < 64; i++) { Jakub