From 4de839700ba4b7b17c55af85164a821b397aa2c3 Mon Sep 17 00:00:00 2001 From: Valentin Clement 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 5aa7ac5c3cccd..34442d05f495d 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(