Landing: 81092921c639
Project / Subsystem
gcc / fortran
Date
2026-09-07
Author
Jerry DeLisle
Commit
81092921c6393d4ed39aacb354228c55fc406d52
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- fortran
- patch_id
- —
- commit_hash
- 81092921c6393d4ed39aacb354228c55fc406d52
- source_type
- github
- headline
- Fortran: [PR126964] Fold element spacing into field alignment
- tldr
- Fortran alignment calculations now consider the minimum alignment of a component's type, fixing issues with non-standard alignments.
- author
- Jerry DeLisle
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • fortran
- • alignment
- • abi
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-07T00:00:00.000Z
This change addresses a bug where Fortran’s alignment calculations for components did not always account for the minimum required alignment of the component’s type. For example, the i386 ABI aligns real(8) to 4 bytes, leading to incorrect spacing calculations. The fix compares element length against min_align_of_type instead of just the alignment, improving accuracy for structures with non-standard component alignments. New test cases are included.