https://gcc.gnu.org/g:58a3cb529b1e29991c6714b654205c2d553ce545

commit 58a3cb529b1e29991c6714b654205c2d553ce545
Author: Tobias Burnus <tbur...@baylibre.com>
Date:   Mon Nov 18 11:06:58 2024 +0100

    libgomp/plugin/plugin-nvptx.c: Change false to NULL to fix C23 
wrong-return-type error [PR117626]
    
    libgomp/ChangeLog:
    
            PR libgomp/117626
            * plugin/plugin-nvptx.c (nvptx_open_device): Use 'CUDA_CALL_ERET'
            with 'NULL' as error return instead of 'CUDA_CALL' that returns 
false.
    
    (cherry picked from commit e7e3d1838f7cfb4a9fca711d735d8f5ea47d16dc)

Diff:
---
 libgomp/ChangeLog.omp         | 9 +++++++++
 libgomp/plugin/plugin-nvptx.c | 6 ++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index bda7382a3b45..1e6d298c40e6 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,12 @@
+2024-12-18  Thomas Schwinge  <tschwi...@baylibre.com>
+
+       Backported from trunk:
+       2024-11-18  Tobias Burnus  <tbur...@baylibre.com>
+
+       PR libgomp/117626
+       * plugin/plugin-nvptx.c (nvptx_open_device): Use 'CUDA_CALL_ERET'
+       with 'NULL' as error return instead of 'CUDA_CALL' that returns false.
+
 2024-08-01  Tobias Burnus  <tbur...@baylibre.com>
 
        Backported from master:
diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c
index b3293b8ebec4..5dc1f7cb9f5e 100644
--- a/libgomp/plugin/plugin-nvptx.c
+++ b/libgomp/plugin/plugin-nvptx.c
@@ -604,8 +604,10 @@ nvptx_open_device (int n)
       GOMP_PLUGIN_debug (0, "Setting \"native\" GPU thread stack size"
                         " ('CU_LIMIT_STACK_SIZE') to %u bytes\n",
                         native_gpu_thread_stack_size);
-      CUDA_CALL (cuCtxSetLimit,
-                CU_LIMIT_STACK_SIZE, (size_t) native_gpu_thread_stack_size);
+      CUDA_CALL_ERET (NULL,
+                     cuCtxSetLimit,
+                     CU_LIMIT_STACK_SIZE,
+                     (size_t) native_gpu_thread_stack_size);
     }
 
   /* OpenMP "soft stacks".  */

Reply via email to