[all-commits] [llvm/llvm-project] 7ddddd: [flang-rt] Fix REAL(10)/COMPLEX(10) component size...

Sairudra More via All-commits all-commits at lists.llvm.org
Fri Apr 17 05:17:27 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7dddddc3185da662c70cac5ca14f60480b211ef0
      https://github.com/llvm/llvm-project/commit/7dddddc3185da662c70cac5ca14f60480b211ef0
  Author: Sairudra More <sairudra60 at gmail.com>
  Date:   2026-04-17 (Fri, 17 Apr 2026)

  Changed paths:
    M flang-rt/lib/runtime/type-info.cpp
    M flang-rt/unittests/Runtime/Descriptor.cpp

  Log Message:
  -----------
  [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 at pe31.hpc.amslabs.hpecorp.net>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list