GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc/ada

Resolves incorrect validity check for array components

This commit fixes a bug where the compiler incorrectly reported validity check failures for floating-point components within arrays having reverse storage orde…

The Ada front end no longer incorrectly flags validity check failures for floating-point components in arrays stored with reverse storage order. The previous logic in Sem_Util.In_Reverse_Storage_Order_Object erroneously considered outer composite types, leading to false positives. The revised predicate now accurately identifies only the innermost composite type, eliminating these bogus error reports. Developers will see fewer incorrect compilation errors related to array validity.

In Details

Ada allows for specifying the storage order of array components. Sem_Util.In_Reverse_Storage_Order_Object is a utility function in the Ada front end that determines if an object is stored in reverse order. This commit fixes a 'thinko' (conceptual error) in this function, specifically concerning floating-point components (FP) within arrays that utilize reverse storage order (SSO - Standard Storage Order with a reverse setting). The previous implementation incorrectly checked outer composite types, leading to false positives for validity checks. The fix streamlines the predicate to only c…

For Context

When you write a program and define an array of numbers, the computer stores those numbers in memory in a specific order. Sometimes, for performance or compatibility reasons, the order might be 'reversed'. This change in the GCC Ada compiler fixes a bug related to how it checks the 'validity' of numbers, especially floating-point numbers, within these reverse-ordered arrays. Previously, the compiler would sometimes incorrectly report errors, thinking there was a problem with the data when there wasn't. This fix adjusts the compiler's internal logic so that it more accurately determines if the data is valid in these specific array configurations, eliminating false error messages for developers.

Filed Under: bugfixadatype-system