aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Chen <cdchen@ca.ibm.com>2025-07-18 14:14:27 -0400
committerGitHub <noreply@github.com>2025-07-18 14:14:27 -0400
commit4bf4e87576688c942b7b337f24fb098247dc4642 (patch)
treec06d7fa6884ed3ce5ac294440c3e84efc2ffd170
parentf6641e2f233b809958e4f558f5ad2514bc812cb8 (diff)
downloadllvm-4bf4e87576688c942b7b337f24fb098247dc4642.zip
llvm-4bf4e87576688c942b7b337f24fb098247dc4642.tar.gz
llvm-4bf4e87576688c942b7b337f24fb098247dc4642.tar.bz2
Static_cast std::size_t to build flang_rt in 32-bit. (#149529)
-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 b723acd..e9301bd 100644
--- a/flang-rt/lib/runtime/descriptor.cpp
+++ b/flang-rt/lib/runtime/descriptor.cpp
@@ -85,7 +85,7 @@ RT_API_ATTRS void Descriptor::Establish(int characterKind,
RT_API_ATTRS void Descriptor::Establish(const typeInfo::DerivedType &dt,
void *p, int rank, const SubscriptValue *extent,
ISO::CFI_attribute_t attribute) {
- std::size_t elementBytes{dt.sizeInBytes()};
+ auto elementBytes{static_cast<std::size_t>(dt.sizeInBytes())};
ISO::EstablishDescriptor(
&raw_, p, attribute, CFI_type_struct, elementBytes, rank, extent);
if (elementBytes == 0) {