From da7ce5268026c178e62cef5072bbcba3ab387794 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 29 Aug 2025 16:00:24 -0700 Subject: [PATCH] [flang] Fix a warning This patch fixes: flang-rt/lib/runtime/descriptor.cpp:30:19: error: first argument in call to 'memcpy' is a pointer to non-trivially copyable type 'Fortran::runtime::Descriptor' [-Werror,-Wnontrivial-memcall] --- flang-rt/lib/runtime/descriptor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang-rt/lib/runtime/descriptor.cpp b/flang-rt/lib/runtime/descriptor.cpp index e4b5bd2e74db..45191bfbe3ad 100644 --- a/flang-rt/lib/runtime/descriptor.cpp +++ b/flang-rt/lib/runtime/descriptor.cpp @@ -27,7 +27,7 @@ RT_OFFLOAD_API_GROUP_BEGIN RT_API_ATTRS Descriptor::Descriptor(const Descriptor &that) { *this = that; } RT_API_ATTRS Descriptor &Descriptor::operator=(const Descriptor &that) { - runtime::memcpy(this, &that, that.SizeInBytes()); + runtime::memcpy(reinterpret_cast(this), &that, that.SizeInBytes()); return *this; }