public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-13] Align a 'OMP_TARGET_OFFLOAD=mandatory' diagnostic with others
@ 2023-06-14 16:26 Tobias Burnus
0 siblings, 0 replies; only message in thread
From: Tobias Burnus @ 2023-06-14 16:26 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:bdfa9a8d2cd7db54c680585b9f973e557285e2af
commit bdfa9a8d2cd7db54c680585b9f973e557285e2af
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Wed Jun 14 18:06:16 2023 +0200
Align a 'OMP_TARGET_OFFLOAD=mandatory' diagnostic with others
On 2023-06-14T11:42:22+0200, Tobias Burnus <tobias@codesourcery.com> wrote:
> On 14.06.23 10:09, Thomas Schwinge wrote:
>> Let me know if I should also adjust the new 'target { ! offload_device }'
>> diagnostic "[...] MANDATORY but only the host device is available" to
>> include a comma before 'but', for consistency with the other existing
>> diagnostics (cited above)?
>
> I think it makes sense to be consistent. Thus: Yes, please add the commas.
Fix-up for recent commit 18c8b56c7d67a9e37acf28822587786f0fc0efbc
"OpenMP: Set default-device-var with OMP_TARGET_OFFLOAD=mandatory".
libgomp/
* target.c (resolve_device): Align a
'OMP_TARGET_OFFLOAD=mandatory' diagnostic with others.
* testsuite/libgomp.c/target-51.c: Adjust.
(cherry picked from commit f2ef1dabbc18eb6efc0eb47bbb0eebbc6d72e09e)
Diff:
---
libgomp/ChangeLog.omp | 9 +++++++++
libgomp/target.c | 4 ++--
libgomp/testsuite/libgomp.c/target-51.c | 2 +-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index e0b707d5ad4..60dc6c1f7c2 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,12 @@
+2023-06-14 Tobias Burnus <tobias@codesourcery.com>
+
+ Backported from mainline:
+ 2023-06-14 Thomas Schwinge <thomas@codesourcery.com>
+
+ * target.c (resolve_device): Align a
+ 'OMP_TARGET_OFFLOAD=mandatory' diagnostic with others.
+ * testsuite/libgomp.c/target-51.c: Adjust.
+
2023-06-14 Tobias Burnus <tobias@codesourcery.com>
Backported from mainline:
diff --git a/libgomp/target.c b/libgomp/target.c
index d4e2a5e4d6e..f8c992cf609 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -220,8 +220,8 @@ resolve_device (int device_id, bool remapped)
return NULL;
if (gomp_target_offload_var == GOMP_TARGET_OFFLOAD_MANDATORY
&& gomp_get_num_devices () == 0)
- gomp_fatal ("OMP_TARGET_OFFLOAD is set to MANDATORY but only the host "
- "device is available");
+ gomp_fatal ("OMP_TARGET_OFFLOAD is set to MANDATORY, "
+ "but only the host device is available");
else if (device_id == omp_invalid_device)
gomp_fatal ("omp_invalid_device encountered");
else if (gomp_target_offload_var == GOMP_TARGET_OFFLOAD_MANDATORY)
diff --git a/libgomp/testsuite/libgomp.c/target-51.c b/libgomp/testsuite/libgomp.c/target-51.c
index cf9e690263e..bbe9ade6e24 100644
--- a/libgomp/testsuite/libgomp.c/target-51.c
+++ b/libgomp/testsuite/libgomp.c/target-51.c
@@ -9,7 +9,7 @@
/* See comment in target-50.c/target-50.c for why the output differs. */
-/* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY but only the host device is available.*" { target { ! offload_device } } } */
+/* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but only the host device is available.*" { target { ! offload_device } } } */
/* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found.*" { target offload_device } } */
int
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-14 16:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14 16:26 [gcc/devel/omp/gcc-13] Align a 'OMP_TARGET_OFFLOAD=mandatory' diagnostic with others 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).