Message ID | 87pm5y31p6.fsf@euler.schwinge.homeip.net |
---|---|
State | New |
Headers | show |
Series | Fix typo in 'libgomp.c/target-51.c' (was: [patch] OpenMP: Set default-device-var with OMP_TARGET_OFFLOAD=mandatory) | expand |
On 14.06.23 10:09, Thomas Schwinge wrote: > This reminds me of the (unresolved)https://gcc.gnu.org/PR81886 > "Means to determine at runtime foffload targets specified at compile time". I think there is the problem that we also support offloading in libraries. Thus, if you compile the main program without offloading and then link in a shared offloading-providing library (possibly with dlopen), it comes (too) late. Thus, we either exclude devices which could be later used – or we have to live with providing devices (existing in hardware and with libgomp support) for which no executable code is available. As long as the number of devices is not a dynamic property, I guess we can only handle one or the other. > I intend to push the attached "Fix typo in 'libgomp.c/target-51.c'" > after testing. > 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. Thanks, Tobias ----------------- 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
From 2464d87db542b87a1d276637f334e9c6eb35be64 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <thomas@codesourcery.com> Date: Wed, 14 Jun 2023 09:25:15 +0200 Subject: [PATCH] Fix typo in 'libgomp.c/target-51.c' ..., and therefore, given 'target offload_device': PASS: libgomp.c/target-51.c (test for excess errors) PASS: libgomp.c/target-51.c execution test [-FAIL:-]{+PASS:+} libgomp.c/target-51.c output pattern test Fix-up for recent commit 18c8b56c7d67a9e37acf28822587786f0fc0efbc "OpenMP: Set default-device-var with OMP_TARGET_OFFLOAD=mandatory". libgomp/ * testsuite/libgomp.c/target-51.c: Fix typo. --- libgomp/testsuite/libgomp.c/target-51.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgomp/testsuite/libgomp.c/target-51.c b/libgomp/testsuite/libgomp.c/target-51.c index 7d09bceacd58..cf9e690263e9 100644 --- a/libgomp/testsuite/libgomp.c/target-51.c +++ b/libgomp/testsuite/libgomp.c/target-51.c @@ -10,7 +10,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 device not found.*" { target offload_device } } */ +/* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found.*" { target offload_device } } */ int main () -- 2.39.2