Landing: dc5689c9c077
Project / Subsystem
gcc / ada
Date
2026-01-13
Author
Eric Botcazou
Commit
dc5689c9c077d6ae7fa7d4eff6293ccf5be67ac4
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- ada
- patch_id
- —
- commit_hash
- dc5689c9c077d6ae7fa7d4eff6293ccf5be67ac4
- source_type
- github
- headline
- Ada: Improve freezing of tagged types by expression functions in nested packages
- tldr
- Delays the generation of stand-alone expression functions to fix freezing issues with tagged types in nested packages.
- author
- Eric Botcazou
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • ada
- • compiler
- • freezing
- • tagged types
- • expression functions
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-01-13T00:00:00.000Z
This commit addresses a long-standing issue in the Ada compiler related to how expression functions interact with the freezing of tagged types, especially within nested packages. The compiler’s freezing model requires types to be frozen before code generation. To address inconsistencies with Ada 95’s freezing model, the compiler now inserts the generated body of stand-alone expression functions at the next freezing point, which resolves issues in nested packages. This approach involves treating the generated body as an inlined body, requiring a more comprehensive implementation of the freezing rules for expression functions.