Landing: d4a985f88b45

Project / Subsystem

gcc / fortran

Date

2026-08-09

Author

Paul Thomas

Commit

d4a985f88b45bef56a5ad3be00af53dfa8136422

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
fortran
patch_id
—
commit_hash
d4a985f88b45bef56a5ad3be00af53dfa8136422
source_type
github
headline
Fix missing vptrs for Fortran class allocations.
tldr
Correctly initializes virtual pointers for Fortran class allocations, resolving a bug and adding a test case.
author
Paul Thomas
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • fortran
  • • bugfix
  • • oop
discussion_id_link
—
bugzilla_pr
—
date
2026-08-09T00:00:00.000Z

This commit addresses a bug in Fortran’s handling of class allocations where virtual pointers (vptrs) were not being correctly initialized. Changes in trans-array.cc and trans-stmt.cc ensure proper array descriptor usage and assignment for class sources. A new test case, allocate_class_5.f90, is added to verify the fix.