Skip to content

Commit 283fd3f

Browse files
authored
[flang][cuda] Use get() to get raw pointer (#150205)
Fix issue reported in #150136. `createAllocatable` returns an OwingPtr. Use `get()` to get the raw pointer has it is done in the `flang-rt/unittests/Runtime/CUDA/Memory.cpp` tests.
1 parent d449d3d commit 283fd3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flang-rt/unittests/Runtime/CUDA/AllocatorCUF.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ TEST(AllocatableCUFTest, CUFSetAllocatorIndex) {
7979
// REAL(4), DEVICE, ALLOCATABLE :: a(:)
8080
auto a{createAllocatable(TypeCategory::Real, 4)};
8181
EXPECT_EQ((int)kDefaultAllocator, a->GetAllocIdx());
82-
RTNAME(CUFSetAllocatorIndex)(a, kDeviceAllocatorPos, __FILE__, __LINE__);
82+
RTNAME(CUFSetAllocatorIndex)(
83+
a.get(), kDeviceAllocatorPos, __FILE__, __LINE__);
8384
EXPECT_EQ((int)kDeviceAllocatorPos, a->GetAllocIdx());
8485
}

0 commit comments

Comments
 (0)