[flang-commits] [flang] [flang][cuda] Fix not declared terminator (PR #114866)

via flang-commits flang-commits at lists.llvm.org
Mon Nov 4 12:37:27 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-runtime

Author: Valentin Clement (バレンタイン クレメン) (clementval)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/114866.diff


1 Files Affected:

- (modified) flang/runtime/CUDA/memory.cpp (+1-1) 


``````````diff
diff --git a/flang/runtime/CUDA/memory.cpp b/flang/runtime/CUDA/memory.cpp
index 5aa7ac5c3cccd1..34442d05f495d3 100644
--- a/flang/runtime/CUDA/memory.cpp
+++ b/flang/runtime/CUDA/memory.cpp
@@ -112,6 +112,7 @@ void RTDEF(CUFDataTransferPtrDesc)(void *addr, Descriptor *desc,
 void RTDECL(CUFDataTransferDescDesc)(Descriptor *dstDesc, Descriptor *srcDesc,
     unsigned mode, const char *sourceFile, int sourceLine) {
   MemmoveFct memmoveFct;
+  Terminator terminator{sourceFile, sourceLine};
   if (mode == kHostToDevice) {
     memmoveFct = &MemmoveHostToDevice;
   } else if (mode == kDeviceToHost) {
@@ -119,7 +120,6 @@ void RTDECL(CUFDataTransferDescDesc)(Descriptor *dstDesc, Descriptor *srcDesc,
   } else if (mode == kDeviceToDevice) {
     memmoveFct = &MemmoveDeviceToDevice;
   } else {
-    Terminator terminator{sourceFile, sourceLine};
     terminator.Crash("host to host copy not supported");
   }
   Fortran::runtime::Assign(

``````````

</details>


https://github.com/llvm/llvm-project/pull/114866


More information about the flang-commits mailing list