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

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Mon Nov 4 12:36:53 PST 2024


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

None

>From 4de839700ba4b7b17c55af85164a821b397aa2c3 Mon Sep 17 00:00:00 2001
From: Valentin Clement <clementval at gmail.com>
Date: Mon, 4 Nov 2024 12:36:19 -0800
Subject: [PATCH] [flang][cuda] Fix not declared terminator

---
 flang/runtime/CUDA/memory.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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(



More information about the flang-commits mailing list