Ada: Fix type mismatch for reduction expression with non-integer index
Fixes a regression in Ada's reduction expression resolution to correctly handle non-integer indices.
This commit corrects a regression in Ada’s reduction expression resolution that incorrectly flagged type mismatches. The issue stemmed from the resolution of array type prefixes built on the fly. The fix restores previous behavior by performing a full resolution of the reducer, even when not overloaded, to catch illegal cases while avoiding unnecessary prefix resolution for aggregates.
In Details
The Resolve_Attribute pass in GCC's Ada front-end had a regression in handling reduction expressions with non-integer array indices. Specifically, the on-the-fly resolution of aggregate prefixes for array types was faulty. This change reverts to a more robust resolution strategy for the reduction expression itself, ensuring correct error detection while avoiding over-resolution of aggregate prefixes.