Landing: 9decb8a07ac7

Project / Subsystem

gcc / fortran

Date

2026-07-08

Author

Jerry DeLisle

Commit

9decb8a07ac764f2a39885b2a5905515f188da06

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
fortran
patch_id
commit_hash
9decb8a07ac764f2a39885b2a5905515f188da06
source_type
github
headline
Fortran: Fix derived type rank for array allocation with mold
tldr
Corrects an issue where the rank of an array within a derived type was not set when using the `mold` keyword during allocation.
author
Jerry DeLisle
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • fortran
  • compiler
  • allocation
discussion_id_link
bugzilla_pr
date
2026-07-08T00:00:00.000Z

This change fixes a bug in Fortran’s array allocation where the rank of an array inside a derived type was not correctly determined when the mold keyword was used. The gfc_array_init_size function in trans-array.cc has been updated to ensure the rank is properly set, preventing potential errors in derived type initialization. New test cases have been added to verify the fix.