[flang-commits] [flang] c08d70a - [flang][runtime] Temporary fix for unresolved reference in CUDA F18 runtime. (#85294)
via flang-commits
flang-commits at lists.llvm.org
Thu Mar 14 13:00:49 PDT 2024
Author: Slava Zakharin
Date: 2024-03-14T13:00:46-07:00
New Revision: c08d70a5cbc61efc5c8636c8788f39270f59dec5
URL: https://github.com/llvm/llvm-project/commit/c08d70a5cbc61efc5c8636c8788f39270f59dec5
DIFF: https://github.com/llvm/llvm-project/commit/c08d70a5cbc61efc5c8636c8788f39270f59dec5.diff
LOG: [flang][runtime] Temporary fix for unresolved reference in CUDA F18 runtime. (#85294)
Avoid referencing executionEnvironment in the device code, since
environment.cpp is not part of the CUDA build yet.
This is a temporary fix before #85182 is merged.
Added:
Modified:
flang/runtime/pointer.cpp
Removed:
################################################################################
diff --git a/flang/runtime/pointer.cpp b/flang/runtime/pointer.cpp
index 08a1223764f393..b01735dc30e691 100644
--- a/flang/runtime/pointer.cpp
+++ b/flang/runtime/pointer.cpp
@@ -185,6 +185,7 @@ int RTDEF(PointerDeallocate)(Descriptor &pointer, bool hasStat,
if (!pointer.IsAllocated()) {
return ReturnError(terminator, StatBaseNull, errMsg, hasStat);
}
+#if !defined(RT_DEVICE_COMPILATION)
if (executionEnvironment.checkPointerDeallocation) {
// Validate the footer. This should fail if the pointer doesn't
// span the entire object, or the object was not allocated as a
@@ -200,6 +201,7 @@ int RTDEF(PointerDeallocate)(Descriptor &pointer, bool hasStat,
terminator, StatBadPointerDeallocation, errMsg, hasStat);
}
}
+#endif
return ReturnError(terminator,
pointer.Destroy(/*finalize=*/true, /*destroyPointers=*/true, &terminator),
errMsg, hasStat);
More information about the flang-commits
mailing list