[COMMITTED] ada: Fix type for SPARK expansion on deep delta aggregates
Checks
Commit Message
From: Yannick Moy <moy@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(-)
@@ -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)