GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
ada

Ada: Fix extension aggregate rejection with inherited discriminant

Correctly handles extension aggregates with inherited discriminants in expression functions, preventing double analysis.

This change fixes an issue where Ada extension aggregates with inherited discriminants were wrongly rejected. The problem occurred in expression functions due to elements being analyzed twice non-idempotently. The fix ensures that the discriminant is not returned early if already present and removes inherited discriminants from the rewritten aggregate’s component list.

In Details

Fixes an idempotency issue in sem_aggr.adb where Discriminant_Present and Resolve_Record_Aggregate were not robust to repeated analysis of extension aggregates containing inherited discriminants, especially within expression functions.

Filed Under: adacompilerbugfix