Landing: 110e034f8b58

Project / Subsystem

gcc / fortran

Date

2026-08-24

Author

Jerry DeLisle

Commit

110e034f8b58529576c7168bfcda6d42336fbf89

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
fortran
patch_id
—
commit_hash
110e034f8b58529576c7168bfcda6d42336fbf89
source_type
github
headline
Fortran: Add deep copy mode to subreference array argument conversion.
tldr
New deep copy mode for Fortran array arguments in subreferences improves handling of allocatable components.
author
Jerry DeLisle
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • fortran
  • • optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-08-24T00:00:00.000Z

A new DEEP_COPY mode has been added to the gfc_conv_subref_array_arg function in GCC’s Fortran front-end. This mode, defaulting to false, allows temporary array arguments to have their own distinct allocatable components, rather than sharing them with the original argument. This change, which does not affect existing callers, ensures proper memory management for allocatable components by deallocating them after the call, and also fixes two latent issues in the pass_optional path related to descriptor assignment and string length handling.