public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <Tobias_Burnus@mentor.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>,
	fortran <fortran@gcc.gnu.org>, Jakub Jelinek <jakub@redhat.com>
Subject: [committed] Fortran: Fix OpenMP clause name in error message
Date: Fri, 27 May 2022 14:42:55 +0200	[thread overview]
Message-ID: <656353ac-f385-fd36-d848-b02a6041852e@mentor.com> (raw)

[-- 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

                 reply	other threads:[~2022-05-27 12:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=656353ac-f385-fd36-d848-b02a6041852e@mentor.com \
    --to=tobias_burnus@mentor.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).