]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: Fix OpenMP clause name in error message
authorTobias Burnus <tobias@codesourcery.com>
Fri, 27 May 2022 11:12:45 +0000 (13:12 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Fri, 27 May 2022 12:37:54 +0000 (14:37 +0200)
gcc/fortran/ChangeLog:

* openmp.cc (gfc_check_omp_requires): Fix clause name in error.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/requires-4.f90: Update dg-error.
* gfortran.dg/gomp/requires-8.f90: Update dg-error.

Co-authored-by: Chung-Lin Tang <cltang@codesourcery.com>
gcc/fortran/openmp.cc
gcc/testsuite/gfortran.dg/gomp/requires-4.f90
gcc/testsuite/gfortran.dg/gomp/requires-8.f90

index 6172ec27687708c6e263868c3a439da3ba544835..efa62b64f2beedd58d59bb0a0f363a3ff98b333c 100644 (file)
@@ -5272,7 +5272,7 @@ gfc_check_omp_requires (gfc_namespace *ns, int ref_omp_requires)
       if ((ref_omp_requires & OMP_REQ_REVERSE_OFFLOAD)
          && !(ns->omp_requires & OMP_REQ_REVERSE_OFFLOAD))
        gfc_error ("Program unit at %L has OpenMP device constructs/routines "
-                  "but does not set !$OMP REQUIRES REVERSE_OFFSET but other "
+                  "but does not set !$OMP REQUIRES REVERSE_OFFLOAD but other "
                   "program units do", &ns->proc_name->declared_at);
       if ((ref_omp_requires & OMP_REQ_UNIFIED_ADDRESS)
          && !(ns->omp_requires & OMP_REQ_UNIFIED_ADDRESS))
index b17aceb898b43dec9050155402395b657365e613..c870a2840d3ccc0ebb6dcc0b610097e00a47ee4b 100644 (file)
@@ -9,7 +9,7 @@ end module m
 subroutine foo
   !$omp target
   !$omp end target
-! { dg-error "OpenMP device constructs/routines but does not set !.OMP REQUIRES REVERSE_OFFSET but other program units do" "" { target *-*-* } 9 }
+! { dg-error "OpenMP device constructs/routines but does not set !.OMP REQUIRES REVERSE_OFFLOAD but other program units do" "" { target *-*-* } 9 }
 ! { dg-error "OpenMP device constructs/routines but does not set !.OMP REQUIRES UNIFIED_ADDRESS but other program units do" "" { target *-*-* } 9 }
 ! { dg-error "OpenMP device constructs/routines but does not set !.OMP REQUIRES UNIFIED_SHARED_MEMORY but other program units do" "" { target *-*-* } 9 }
 end
index eadfcaf8609b8499ad12d93242fb3be34d21b957..e84d609ad298cf79ce66e0284d66f61436bb7290 100644 (file)
@@ -13,7 +13,7 @@ contains
  end subroutine foo
 end module m
 
-subroutine bar  ! { dg-error "has OpenMP device constructs/routines but does not set !.OMP REQUIRES REVERSE_OFFSET but other program units do" }
+subroutine bar  ! { dg-error "has OpenMP device constructs/routines but does not set !.OMP REQUIRES REVERSE_OFFLOAD but other program units do" }
   !use m
   !$omp requires unified_shared_memory
   !$omp declare target