diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-05-10 21:56:42 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-07-07 05:26:54 -0400 |
commit | 845c49360bca4553676d5a33603d5099e7cf6d85 (patch) | |
tree | 1dd41828bf90e9f39c01f603ad141a967713326b | |
parent | c78efe921c1fab590293476ae9910e1bb5b090c4 (diff) | |
download | gcc-845c49360bca4553676d5a33603d5099e7cf6d85.zip gcc-845c49360bca4553676d5a33603d5099e7cf6d85.tar.gz gcc-845c49360bca4553676d5a33603d5099e7cf6d85.tar.bz2 |
[Ada] Change local object from variable to constant
gcc/ada/
* sem_aggr.adb (Resolve_Delta_Array_Aggregate): Make Index_Type
a constant.
-rw-r--r-- | gcc/ada/sem_aggr.adb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index a17f156..9e2801a 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -2660,15 +2660,13 @@ package body Sem_Aggr is ----------------------------------- procedure Resolve_Delta_Array_Aggregate (N : Node_Id; Typ : Entity_Id) is - Deltas : constant List_Id := Component_Associations (N); + Deltas : constant List_Id := Component_Associations (N); + Index_Type : constant Entity_Id := Etype (First_Index (Typ)); - Assoc : Node_Id; - Choice : Node_Id; - Index_Type : Entity_Id; + Assoc : Node_Id; + Choice : Node_Id; begin - Index_Type := Etype (First_Index (Typ)); - Assoc := First (Deltas); while Present (Assoc) loop if Nkind (Assoc) = N_Iterated_Component_Association then |