[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.
This commit is contained in:
Valentin Clement (バレンタイン クレメン) 2025-07-23 20:01:15 +09:00 committed by GitHub
parent d449d3dc13
commit 283fd3f09a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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());
}