GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
ada

Ada compiler fixes name resolution for generic instances

Fixes a regression in Ada generic unit instances where names in iterated aggregate expressions were resolved incorrectly.

This Ada compiler patch corrects a regression affecting generic units. It ensures that global names within iterated component associations of aggregates are correctly resolved when used inside instances of generic units. A new test case verifies the fix.

In Details

This commit addresses a name resolution issue in sem_aggr.adb within the GCC Ada front-end. Specifically, when an aggregate contains an iterated component association, global names used within the expression for that association were being incorrectly resolved in the context of a generic unit instance. The fix involves pre-analyzing the expression directly within the generic unit's scope.

For Context
Ada
A structured, statically typed, imperative programming language designed for reliability and efficiency, often used in high-integrity systems.
generic unit
In Ada, a construct that allows a procedure, function, or package to be parameterized by types or values, enabling code reuse.
aggregate
In Ada, a composite value constructor, typically used for records or arrays.
iterated component association
An Ada syntax for aggregates where a sub-expression is iterated to initialize multiple components.
name resolution
The process by which the compiler determines the meaning and scope of identifiers (names) in the source code.
Filed Under: adaregressiongeneric