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

Fix Ada Must_Slide predicate for aggregates with Others_Clause.

Corrected Ada compiler's Must_Slide check to accurately handle aggregates containing only an Others_Clause.

A recent fix for Ada aggregates missed a case where the Must_Slide predicate incorrectly returned true for aggregates containing only an Others_Clause. This commit adjusts the predicate to correctly identify such cases, ensuring proper code generation for Ada aggregates.

In Details

The Must_Slide predicate in exp_aggr.adb has been refined. It previously returned True for unconstrained aggregates containing solely an Others_Clause. The fix ensures this check is performed only after other negative tests, accurately reflecting that such aggregates do not require sliding.

For Context
Ada
A structured, statically typed, imperative, and object-oriented high-level programming language, designed for large, long-lived, and high-integrity systems.
aggregate
In Ada, an aggregate is a record or array construction that specifies values for components.
Others_Clause
In Ada, an Others clause within an aggregate allows specifying a default value for all components not explicitly mentioned.
Must_Slide
A predicate in the Ada front-end that determines if a particular data structure or construction requires a 'slide' operation, likely related to memory management or object layout.
Filed Under: adacompiler bugfix