diff --git a/flang-rt/unittests/Runtime/CUDA/AllocatorCUF.cpp b/flang-rt/unittests/Runtime/CUDA/AllocatorCUF.cpp index d76fca2c4250e..4b22e29cc8172 100644 --- a/flang-rt/unittests/Runtime/CUDA/AllocatorCUF.cpp +++ b/flang-rt/unittests/Runtime/CUDA/AllocatorCUF.cpp @@ -79,6 +79,7 @@ TEST(AllocatableCUFTest, CUFSetAllocatorIndex) { // REAL(4), DEVICE, ALLOCATABLE :: a(:) auto a{createAllocatable(TypeCategory::Real, 4)}; EXPECT_EQ((int)kDefaultAllocator, a->GetAllocIdx()); - RTNAME(CUFSetAllocatorIndex)(a, kDeviceAllocatorPos, __FILE__, __LINE__); + RTNAME(CUFSetAllocatorIndex)( + a.get(), kDeviceAllocatorPos, __FILE__, __LINE__); EXPECT_EQ((int)kDeviceAllocatorPos, a->GetAllocIdx()); }