Landing: 0c0c58310180

Project / Subsystem

gcc / fortran

Date

2026-05-07

Author

Mikael Morin

Commit

0c0c58310180b75a4ff23044006f7ddabe7f894c

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
fortran
patch_id
commit_hash
0c0c58310180b75a4ff23044006f7ddabe7f894c
source_type
github
headline
Fortran: Generate array bounds checks in the scalarizer block.
tldr
Moves array bounds checking code to the scalarizer block in gfc_conv_expr_descriptor to avoid use-before-definition issues.
author
Mikael Morin
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • fortran
  • bounds checking
  • scalarizer
discussion_id_link
bugzilla_pr
date
2026-05-07T00:00:00.000Z

This change refactors array bounds checking in the Fortran compiler to ensure that the bounds checking code is added to the same block the scalarizer uses to generate the array descriptor reference. Previously, the bounds checking code was added to the root block, which could lead to use-before-definition issues if the descriptor reference used variables generated by the scalarizer. This resolves PR125192 and PR125198.