[Ada] Fix SPARK expansion of iterated_component_assoc in delta aggregate
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 9 Sep 2020 22:01:44 +0000 (00:01 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 26 Oct 2020 08:58:55 +0000 (04:58 -0400)
gcc/ada/

* exp_spark.adb (Expand_SPARK_Delta_Or_Update): Add missing call
to Enter_Name, just like it is called for
iterated_component_association in Expand_SPARK_N_Aggregate.

gcc/ada/exp_spark.adb

index 5e1fac210b7d16e3f961b47784f82c336436e92d..3041c736a2ffae0d88538cb2b6de8144092db3aa 100644 (file)
@@ -227,6 +227,7 @@ package body Exp_SPARK is
 
                if Nkind (Assoc) = N_Iterated_Component_Association then
                   Push_Scope (Scope (Defining_Identifier (Assoc)));
+                  Enter_Name (Defining_Identifier (Assoc));
                   Analyze_And_Resolve (Expr, Comp_Type);
                end if;