From c17ae161fdb713652292d6dff7c9317cbac8bb25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Clement=20=28=E3=83=90=E3=83=AC=E3=83=B3?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=B3=20=E3=82=AF=E3=83=AC=E3=83=A1?= =?UTF-8?q?=E3=83=B3=29?= Date: Tue, 20 May 2025 11:04:06 -0700 Subject: [PATCH] [flang][cuda] Use nullptr for comparison (#140767) Comparison without explicit nullptr seems to bring false positives. Use explicit nullptr. --- flang-rt/lib/cuda/allocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang-rt/lib/cuda/allocator.cpp b/flang-rt/lib/cuda/allocator.cpp index f4289c55bd8d..05d97a5db045 100644 --- a/flang-rt/lib/cuda/allocator.cpp +++ b/flang-rt/lib/cuda/allocator.cpp @@ -150,7 +150,7 @@ void *CUFAllocDevice(std::size_t sizeInBytes, std::int64_t *asyncObject) { CUDA_REPORT_IF_ERROR( cudaMallocManaged((void **)&p, sizeInBytes, cudaMemAttachGlobal)); } else { - if (asyncObject == kNoAsyncObject) { + if (asyncObject == nullptr) { CUDA_REPORT_IF_ERROR(cudaMalloc(&p, sizeInBytes)); } else { CUDA_REPORT_IF_ERROR(