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

Vladimir Vereschaka via flang-commits flang-commits at lists.llvm.org
Tue Dec 30 14:36:58 PST 2025


vvereschaka wrote:

Hi @clementval ,

looks like this PR causes the following build error on [flang-runtime-cuda-clang](https://lab.llvm.org/staging/#/builders/65) builder :
```
45.329 [6/1/126] Building CXX object flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/dot-product.cpp.o
FAILED: flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/dot-product.cpp.o 
/home/buildbot/worker/as-builder-7/flang-runtime-cuda-clang/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_NO_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DOMP_OFFLOAD_BUILD -I/home/buildbot/worker/as-builder-7/flang-runtime-cuda-clang/llvm-project/flang-rt/include -I/home/buildbot/worker/as-builder-7/flang-runtime-cuda-clang/llvm-project/flang-rt/../flang/include -I/home/buildbot/worker/as-builder-7/flang-runtime-cuda-clang/build/runtimes/runtimes-bins/flang-rt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=gnu++17 -UNDEBUG -fno-lto -fno-exceptions -fno-rtti -funwind-tables -fno-asynchronous-unwind-tables "-D_GLIBCXX_THROW_OR_ABORT(_EXC)=(__builtin_abort())" -Wp,-U_GLIBCXX_ASSERTIONS -Wp,-U_LIBCPP_ENABLE_ASSERTIONS -fopenmp -fvisibility=hidden -fopenmp-cuda-mode --offload-arch=sm_50,sm_60,sm_70,sm_80 -foffload-lto -MD -MT flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/dot-product.cpp.o -MF flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/dot-product.cpp.o.d -o flang-rt/lib/runtime/CMakeFiles/flang_rt.runtime.static.dir/dot-product.cpp.o -c /home/buildbot/worker/as-builder-7/flang-runtime-cuda-clang/llvm-project/flang-rt/lib/runtime/dot-product.cpp
In file included from /home/buildbot/worker/as-builder-7/flang-runtime-cuda-clang/llvm-project/flang-rt/lib/runtime/dot-product.cpp:12:
In file included from /home/buildbot/worker/as-builder-7/flang-runtime-cuda-clang/llvm-project/flang-rt/include/flang-rt/runtime/tools.h:18:
/home/buildbot/worker/as-builder-7/flang-runtime-cuda-clang/llvm-project/flang-rt/../flang/include/flang/Runtime/freestanding-tools.h:186:10: error: cannot initialize return object of type 'void *' with an rvalue of type 'void'
  186 |   return Fortran::runtime::memcpy(dest, src, count);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

```
https://lab.llvm.org/staging/#/builders/65/builds/121

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


More information about the flang-commits mailing list