[flang-commits] [flang] [llvm] Reland "[flang][cuda] Add support for derived-type initialization on device #172568" (PR #172741)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Thu Dec 18 07:29:09 PST 2025


================
@@ -173,12 +174,17 @@ using std::memmove;
 #endif // !STD_MEMMOVE_UNSUPPORTED
 
 using MemmoveFct = void *(*)(void *, const void *, std::size_t);
+using MemcpyFct = void *(*)(void *, const void *, std::size_t);
 
 #ifdef RT_DEVICE_COMPILATION
 [[maybe_unused]] static RT_API_ATTRS void *MemmoveWrapper(
     void *dest, const void *src, std::size_t count) {
   return Fortran::runtime::memmove(dest, src, count);
 }
+[[maybe_unused]] static RT_API_ATTRS void MemcpyWrapper(
+    void *dest, const void *src, std::size_t count) {
+  Fortran::runtime::memcpy(dest, src, count);
+}
----------------
clementval wrote:

```suggestion
[[maybe_unused]] static RT_API_ATTRS void *MemcpyWrapper(
    void *dest, const void *src, std::size_t count) {
  return Fortran::runtime::memcpy(dest, src, count);
}
```

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


More information about the flang-commits mailing list