Landing: 11be877aea73
Project / Subsystem
gcc / fortran
Date
2026-07-08
Author
Jerry DeLisle
Commit
11be877aea73b0b26638078908a42dd0f97d81d7
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- fortran
- patch_id
- —
- commit_hash
- 11be877aea73b0b26638078908a42dd0f97d81d7
- source_type
- github
- headline
- Fortran: Fix NEWUNIT state corruption during internal file I/O
- tldr
- Internal file I/O operations no longer corrupt the unit management table in libgfortran.
- author
- Jerry DeLisle
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • fortran
- • compiler
- • runtime
- • io
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-08T00:00:00.000Z
A bug in libgfortran’s internal unit management corrupted its state when performing internal file I/O, such as writing to a character variable. This commit introduces a new boolean flag in the gfc_unit structure to track units designated for internal I/O, preventing corruption and ensuring correct behavior. A new test case validates this fix.