From: Yannick Moy <m...@adacore.com> gcc/ada/
* exp_spark.adb (Expand_SPARK_Delta_Or_Aggregate): Fix type. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_spark.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/exp_spark.adb b/gcc/ada/exp_spark.adb index c19aa201bde..ae0e616c797 100644 --- a/gcc/ada/exp_spark.adb +++ b/gcc/ada/exp_spark.adb @@ -200,7 +200,7 @@ package body Exp_SPARK is begin loop if Nkind (Pref) = N_Indexed_Component then - Index := First (Expressions (Choice)); + Index := First (Expressions (Pref)); Apply_Scalar_Range_Check (Index, Etype (Index)); elsif Is_Array_Type (Typ) -- 2.42.0