Landing: 656d97bbc4b0

Project / Subsystem

gcc / fortran

Date

2026-05-28

Author

Sandra Loosemore

Commit

656d97bbc4b0f4614f1f074ab3ca7c425fe569d2

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
fortran
patch_id
commit_hash
656d97bbc4b0f4614f1f074ab3ca7c425fe569d2
source_type
github
headline
Fortran's f_c_string Intrinsic Gets Performance and Docs Boost
tldr
Improves efficiency of the `f_c_string` intrinsic in Fortran, adds constant string folding, and provides documentation.
author
Sandra Loosemore
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • fortran
  • interoperability
  • optimization
  • documentation
discussion_id_link
bugzilla_pr
date
2026-05-28T00:00:00.000Z

The f_c_string intrinsic in Fortran was reimplemented for better efficiency. The old implementation performed multiple allocations and copies; the new version folds constant string arguments and uses a single allocation and copy for other cases. This reduces overhead when interoperating with C code. The commit also adds missing documentation for the intrinsic to the gfortran manual.