https://gcc.gnu.org/g:b64e38fd78282511462d305057c9005fff25e771

commit r17-2627-gb64e38fd78282511462d305057c9005fff25e771
Author: Thomas Schwinge <[email protected]>
Date:   Wed Jul 22 20:10:21 2026 +0200

    libgomp: Add by-device capabilities for OpenMP 'omp requires' handling: Fix 
OpenMP reverse offload capability checking
    
    I noticed that as of commit 7cb252f60c1f600066300ede2781a2c9e3808adb
    "libgomp: Add by-device capabilities for OpenMP 'omp requires' handling",
    'libgomp.fortran/reverse-offload-5.f90' no longer XFAILs NVIDIA GPU 
offloading
    execution, no matter whether non-USM or USM single-GPU system.  That was
    suspicious, given that this commit shouldn't cause any such difference in
    behavior, per my understanding.  Well, turns out, this commit indeed didn't
    magically fix the failure, but it's just another case of non-existing static
    type checking of flag values...
    
            libgomp/
            * target.c (gomp_target_init): Fix OpenMP reverse offload
            capability checking.

Diff:
---
 libgomp/target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgomp/target.c b/libgomp/target.c
index 637601dc8161..2abb364244e7 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -6503,7 +6503,7 @@ gomp_target_init (void)
                    if (((omp_requires_mask & GOMP_REQUIRES_UNIFIED_ADDRESS)
                         && !(dev_caps & GOMP_OFFLOAD_CAP_UNIFIED_ADDR))
                        || ((omp_requires_mask & GOMP_REQUIRES_REVERSE_OFFLOAD)
-                           && !(dev_caps & GOMP_REQUIRES_REVERSE_OFFLOAD)))
+                           && !(dev_caps & GOMP_OFFLOAD_CAP_REV_OFFLOAD)))
                      continue;
 
                    if (omp_requires_mask & (GOMP_REQUIRES_UNIFIED_SHARED_MEMORY

Reply via email to