]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: improve error message for conflicting OpenMP clauses [PR107122]
authorHarald Anlauf <anlauf@gmx.de>
Mon, 20 Jan 2025 20:21:48 +0000 (21:21 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Mon, 20 Jan 2025 20:21:48 +0000 (21:21 +0100)
PR fortran/107122

gcc/fortran/ChangeLog:

* openmp.cc (resolve_omp_clauses): Add 'with' to error message text.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/order-8.f90: Adjust pattern.

gcc/fortran/openmp.cc
gcc/testsuite/gfortran.dg/gomp/order-8.f90

index e51ff1f4d29ed45d26721e6f1b03b8456f883ad1..be78aa1ab27582e7efb97dc07c345af80974daf2 100644 (file)
@@ -8171,7 +8171,7 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses,
     gfc_error ("ORDERED clause parameter is less than COLLAPSE at %L",
               &code->loc);
   if (omp_clauses->order_concurrent && omp_clauses->ordered)
-    gfc_error ("ORDER clause must not be used together ORDERED at %L",
+    gfc_error ("ORDER clause must not be used together with ORDERED at %L",
               &code->loc);
   if (omp_clauses->if_expr)
     {
index c753886d621e433ccc3b6344dff15fae23f312f4..80b4b722be0ac53639e9063959ece258b0963d4c 100644 (file)
@@ -36,24 +36,24 @@ subroutine f2 (a)
   do i = 1, 128
     a(i) = a(i) + 1
   end do
-  !$omp do order(concurrent) ordered   ! { dg-error "ORDER clause must not be used together ORDERED" }
+  !$omp do order(concurrent) ordered   ! { dg-error "ORDER clause must not be used together with ORDERED" }
   do i = 1, 128
       !$omp ordered
       a(i) = a(i) + 1
       !$omp end ordered
   end do
-  !$omp do ordered order(concurrent)   ! { dg-error "ORDER clause must not be used together ORDERED" }
+  !$omp do ordered order(concurrent)   ! { dg-error "ORDER clause must not be used together with ORDERED" }
   do i = 1, 128
       !$omp ordered
       a(i) = a(i) + 1
       !$omp end ordered
   end do
-  !$omp do ordered (1) order(concurrent)       ! { dg-error "ORDER clause must not be used together ORDERED" }
+  !$omp do ordered (1) order(concurrent)       ! { dg-error "ORDER clause must not be used together with ORDERED" }
   do i = 1, 128
       !$omp ordered depend (sink: i - 1)
       !$omp ordered depend (source)
   end do
-  !$omp do order(concurrent)ordered (1)        ! { dg-error "ORDER clause must not be used together ORDERED" }
+  !$omp do order(concurrent)ordered (1)        ! { dg-error "ORDER clause must not be used together with ORDERED" }
   do i = 1, 128
       !$omp ordered depend (sink: i - 1)
       !$omp ordered depend (source)