Landing: d0e630221524

Project / Subsystem

gcc / fortran

Date

2026-08-14

Author

Jerry DeLisle

Commit

d0e6302215241b785064f84959b3458bc1518b92

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
fortran
patch_id
—
commit_hash
d0e6302215241b785064f84959b3458bc1518b92
source_type
github
headline
fortran: Fix TEAM_NUMBER intrinsic for -fcoarray=single and -fcoarray=lib [PR126777].
tldr
fortran: Corrects TEAM_NUMBER intrinsic behavior with -fcoarray=single and -fcoarray=lib.
author
Jerry DeLisle
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • fortran
  • • compiler
  • • bugfix
  • • coarrays
discussion_id_link
—
bugzilla_pr
—
date
2026-08-14T00:00:00.000Z

Two defects related to the TEAM_NUMBER intrinsic in Fortran coarrays have been fixed, stemming from work on PR126777. First, when using -fcoarray=single, conv_intrinsic_team_number incorrectly returned the team handle instead of -1 for the initial team; this is now corrected to always return -1 in this mode. Second, when using -fcoarray=lib with -lcaf_single, the _gfortran_caf_team_number function would dereference a null team handle, causing a segfault; this is now fixed to handle null handles correctly, treating them as the current team. Documentation and a new test case are also updated.