[all-commits] [llvm/llvm-project] 1a4f40: [flang] __fortran_builtins: Update __builtin_team_...
Dan Bonachea via All-commits
all-commits at lists.llvm.org
Fri Jun 12 02:06:23 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1a4f405c318131c79df259008f76b0d0730d6130
https://github.com/llvm/llvm-project/commit/1a4f405c318131c79df259008f76b0d0730d6130
Author: Dan Bonachea <dobonachea at lbl.gov>
Date: 2026-06-12 (Fri, 12 Jun 2026)
Changed paths:
M flang-rt/lib/runtime/__fortran_builtins.f90
M flang/CMakeLists.txt
Log Message:
-----------
[flang] __fortran_builtins: Update __builtin_team_type to meet PRIF specification (#202450)
The representation of `TEAM_TYPE` in the `ISO_FORTRAN_ENV` module is
opaque to the compiler, but the size (and alignment) needs to match the
PRIF specification for `prif_team_type` to ensure ABI compatibility with
the multi-image runtime library.
Flang's old definition as a derived type containing only an
`integer(int64)` component was leading to an 8-byte `TEAM_TYPE`. However
PRIF specifies the `prif_team_type` component as a `pointer` to an
opaque scalar type, which flang compiles to a 40-byte representation.
This mismatch was leading to incorrect behavior at runtime for programs
compiled with `-fcoarray` and using `TEAM_TYPE`, where `TEAM_TYPE`
values returned by PRIF were being silently truncated by the compiler.
Change the declaration of `__builtin_team_type` to match the PRIF
specification, thus ensuring the representation of `TEAM_TYPE` has the
required size.
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