]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix type for SPARK expansion on deep delta aggregates
authorYannick Moy <moy@adacore.com>
Mon, 30 Oct 2023 09:25:46 +0000 (10:25 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 21 Nov 2023 09:57:42 +0000 (10:57 +0100)
gcc/ada/

* exp_spark.adb (Expand_SPARK_Delta_Or_Aggregate): Fix type.

gcc/ada/exp_spark.adb

index c19aa201bde9c4b80bf52f6c92f0706b2ef94704..ae0e616c79705f7b73623f29ab3063d8d10f3bb3 100644 (file)
@@ -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)