gcc/ada/
* exp_spark.adb (Expand_SPARK_Delta_Or_Update): Apply scalar
range checks against the base type of an index type, not against
the index type itself.
if Nkind (Index) = N_Range then
Apply_Scalar_Range_Check
- (Low_Bound (Index), Etype (Index_Typ));
+ (Low_Bound (Index), Base_Type (Etype (Index_Typ)));
Apply_Scalar_Range_Check
- (High_Bound (Index), Etype (Index_Typ));
+ (High_Bound (Index), Base_Type (Etype (Index_Typ)));
-- Otherwise the index denotes a single element