Landing: 02e6f6740ae0

Project / Subsystem

gcc / fortran

Date

2026-08-27

Author

Jerry DeLisle

Commit

02e6f6740ae069c9355dcb59d764235465f09a61

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
fortran
patch_id
—
commit_hash
02e6f6740ae069c9355dcb59d764235465f09a61
source_type
github
headline
Fortran: Fix incorrect code generation for allocatable character array components
tldr
Corrects an issue where copying allocatable character arrays with differing lengths resulted in corrupted data.
author
Jerry DeLisle
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • fortran
  • • compiler bug
  • • code generation
discussion_id_link
—
bugzilla_pr
—
date
2026-08-27T00:00:00.000Z

A bug in Fortran’s code generation for structure constructors has been fixed. When copying an allocatable character array into an explicit-length allocatable character array component, the previous implementation used a bitwise copy which failed when source and destination element lengths differed. This change replaces the bitwise copy with an element-by-element string copy, ensuring correct padding or truncation.