* [committed] Fortran: Fix OpenMP clause name in error message
@ 2022-05-27 12:42 Tobias Burnus
0 siblings, 0 replies; only message in thread
From: Tobias Burnus @ 2022-05-27 12:42 UTC (permalink / raw)
To: gcc-patches, fortran, Jakub Jelinek
[-- Attachment #1: Type: text/plain, Size: 891 bytes --]
This fix was part of the submitted patch + reviewed with minor comments
patch:
[PATCH, OpenMP 5.0] More implementation of the requires directive
https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563393.html
but that never got revised and applied.
Committed the most obvious parts as obvious, as
r13-800-g8af266501795dd76d05faef498dbd3472a01b305
Tobias
PS: The non-obvious parts need to be a bit revised (collect follow-up
patches, properly filter out requirements not fulfilled from the
available-devices list → cf. glossary of the current, post-5.2 OpenMP
specification git repository) etc.
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
[-- Attachment #2: committed.diff --]
[-- Type: text/x-patch, Size: 3090 bytes --]
commit 8af266501795dd76d05faef498dbd3472a01b305
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Fri May 27 13:12:45 2022 +0200
Fortran: Fix OpenMP clause name in error message
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 | 2 +-
gcc/testsuite/gfortran.dg/gomp/requires-4.f90 | 2 +-
gcc/testsuite/gfortran.dg/gomp/requires-8.f90 | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc
index 6172ec27687..efa62b64f2b 100644
--- a/gcc/fortran/openmp.cc
+++ b/gcc/fortran/openmp.cc
@@ -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))
diff --git a/gcc/testsuite/gfortran.dg/gomp/requires-4.f90 b/gcc/testsuite/gfortran.dg/gomp/requires-4.f90
index b17aceb898b..c870a2840d3 100644
--- a/gcc/testsuite/gfortran.dg/gomp/requires-4.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/requires-4.f90
@@ -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
diff --git a/gcc/testsuite/gfortran.dg/gomp/requires-8.f90 b/gcc/testsuite/gfortran.dg/gomp/requires-8.f90
index eadfcaf8609..e84d609ad29 100644
--- a/gcc/testsuite/gfortran.dg/gomp/requires-8.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/requires-8.f90
@@ -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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-27 12:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27 12:42 [committed] Fortran: Fix OpenMP clause name in error message Tobias Burnus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).