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; }