summaryrefslogtreecommitdiff
path: root/flang-rt
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-08-29 16:00:24 -0700
committerKazu Hirata <kazu@google.com>2025-08-29 16:00:24 -0700
commitda7ce5268026c178e62cef5072bbcba3ab387794 (patch)
treeebee8c539c6f6eb4597532fbc7ff557a1b46122c /flang-rt
parent794f82edfcec16df3f8ab97efd6901d0e6c62468 (diff)
[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]
Diffstat (limited to 'flang-rt')
-rw-r--r--flang-rt/lib/runtime/descriptor.cpp2
1 files changed, 1 insertions, 1 deletions
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<void *>(this), &that, that.SizeInBytes());
return *this;
}