llvm-project
7dddddc3 - [flang-rt] Fix REAL(10)/COMPLEX(10) component sizes in runtime type info (#192049)

Commit
38 days ago
[flang-rt] Fix REAL(10)/COMPLEX(10) component sizes in runtime type info (#192049) This fixes a crash caused by incorrect component sizes in runtime type info. For REAL(10) and COMPLEX(10) components, `Component::GetElementByteSize()` was using the Fortran kind value as the byte size. On x86-64 that underestimates the actual storage size, so component size computation can be wrong for extended-precision types. This patch routes REAL and COMPLEX component sizes through `Descriptor::BytesFor()`, which matches the runtime’s existing storage-size handling. I also added a runtime unit test covering the relevant `Descriptor::BytesFor()` storage-size behavior for REAL and COMPLEX kinds, including kind 10. Fixes #192085 --------- Co-authored-by: Sairudra More <moresair@pe31.hpc.amslabs.hpecorp.net>
Author
Parents
Loading