Skip to content

[flang][cuda] Fix not declared terminator #114866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

clementval
Copy link
Contributor

No description provided.

@llvmbot llvmbot added flang:runtime flang Flang issues not falling into any other category labels Nov 4, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 4, 2024

@llvm/pr-subscribers-flang-runtime

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

Changes

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

1 Files Affected:

  • (modified) flang/runtime/CUDA/memory.cpp (+1-1)
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(

@clementval clementval merged commit c949500 into llvm:main Nov 4, 2024
7 of 8 checks passed
@clementval clementval deleted the cuf_fix_terminator branch November 4, 2024 20:38
PhilippRados pushed a commit to PhilippRados/llvm-project that referenced this pull request Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:runtime flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants