Landing: 34762afa322a
Project / Subsystem
gcc / fortran
Date
2026-08-23
Author
Paul Thomas
Commit
34762afa322a6556adfc7a83381a6f6ba5c3137b
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- fortran
- patch_id
- —
- commit_hash
- 34762afa322a6556adfc7a83381a6f6ba5c3137b
- source_type
- github
- headline
- Fortran: Fix lost statement label in CONTAINS sections
- tldr
- Corrects a bug where statement labels were lost in Fortran programs with CONTAINS sections.
- author
- Paul Thomas
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • fortran
- • parser
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-23T00:00:00.000Z
This commit fixes a bug in the Fortran compiler where statement labels were not correctly preserved in programs containing a CONTAINS section. The issue arose because a new namespace was created after the CONTAINS block, causing labels to be associated with the wrong scope. The fix ensures that statement labels are correctly assigned to the containing namespace and that labelled RETURN statements are properly handled.