diff --git a/flang-rt/lib/runtime/assign.cpp b/flang-rt/lib/runtime/assign.cpp index f936a4192a33c..2ca4952b0fcc9 100644 --- a/flang-rt/lib/runtime/assign.cpp +++ b/flang-rt/lib/runtime/assign.cpp @@ -598,7 +598,8 @@ RT_API_ATTRS int DerivedAssignTicket::Continue( std::size_t componentByteSize{ this->component_->SizeInBytes(this->instance_)}; if (IS_COMPONENTWISE && toIsContiguous_ && fromIsContiguous_) { - std::size_t offset{this->component_->offset()}; + std::size_t offset{ + static_cast(this->component_->offset())}; char *to{this->instance_.template OffsetElement(offset)}; const char *from{ this->from_->template OffsetElement(offset)}; @@ -630,7 +631,8 @@ RT_API_ATTRS int DerivedAssignTicket::Continue( std::size_t componentByteSize{ this->component_->SizeInBytes(this->instance_)}; if (IS_COMPONENTWISE && toIsContiguous_ && fromIsContiguous_) { - std::size_t offset{this->component_->offset()}; + std::size_t offset{ + static_cast(this->component_->offset())}; char *to{this->instance_.template OffsetElement(offset)}; const char *from{ this->from_->template OffsetElement(offset)}; diff --git a/flang-rt/lib/runtime/type-info.cpp b/flang-rt/lib/runtime/type-info.cpp index d023c3392d559..3e1d7c9c3c788 100644 --- a/flang-rt/lib/runtime/type-info.cpp +++ b/flang-rt/lib/runtime/type-info.cpp @@ -140,7 +140,7 @@ RT_API_ATTRS void Component::CreatePointerDescriptor(Descriptor &descriptor, const SubscriptValue *subscripts) const { RUNTIME_CHECK(terminator, genre_ == Genre::Data); EstablishDescriptor(descriptor, container, terminator); - std::size_t offset{offset_}; + std::size_t offset{static_cast(offset_)}; if (subscripts) { offset += container.SubscriptsToByteOffset(subscripts); }