[all-commits] [llvm/llvm-project] cf4f33: [flang][flang-rt] Treat REAL(2)/COMPLEX(2) as C-in...

Eugene Epshteyn via All-commits all-commits at lists.llvm.org
Mon Jun 8 03:11:16 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf4f3340ba062cdb3ce95c4a600c61bec2862c5c
      https://github.com/llvm/llvm-project/commit/cf4f3340ba062cdb3ce95c4a600c61bec2862c5c
  Author: Eugene Epshteyn <eepshteyn at nvidia.com>
  Date:   2026-06-08 (Mon, 08 Jun 2026)

  Changed paths:
    M flang-rt/lib/runtime/iso_c_binding.f90
    M flang/docs/Extensions.md
    M flang/lib/Evaluate/type.cpp
    A flang/test/Semantics/bind-c-real2.f90
    M flang/test/Semantics/bind-c06.f90

  Log Message:
  -----------
  [flang][flang-rt] Treat REAL(2)/COMPLEX(2) as C-interoperable types (#201888)

IEEE-754 binary16 ("half") maps cleanly to the C `_Float16` type
(ISO/IEC TS 18661-3), but flang previously rejected `REAL(KIND=2)` and
`COMPLEX(KIND=2)` in C-interoperable contexts. Make `REAL(KIND=2)` and
`COMPLEX(KIND=2)` into actual interoperable types.

`ISO_C_BINDING` now exports the gfortran-compatible named constants
`c_float16` and `c_float16_complex` (both value 2), the kind parameter
for the half-precision C interoperable types.

Assisted-by: AI



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