aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_aggr.adb
diff options
context:
space:
mode:
authorPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2017-12-05 11:58:13 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2017-12-05 11:58:13 +0000
commit6cbd45e40605d0f77cdc4d31f5b80c1e3d656055 (patch)
tree89cd500cfbe44b2b886476d955874f5a0821e398 /gcc/ada/exp_aggr.adb
parentf4ac86dd5c3569dac8b395e823296ed89a2030e9 (diff)
downloadgcc-6cbd45e40605d0f77cdc4d31f5b80c1e3d656055.zip
gcc-6cbd45e40605d0f77cdc4d31f5b80c1e3d656055.tar.gz
gcc-6cbd45e40605d0f77cdc4d31f5b80c1e3d656055.tar.bz2
[multiple changes]
2017-12-05 Eric Botcazou <ebotcazou@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use the SLOC of the iteration scheme throughout, except for the new loop statement(s). 2017-12-05 Ed Schonberg <schonberg@adacore.com> * exp_aggr.adb (Gen_Assign): Do not analyze the expressionn of the assignment if it is part of an Iterated_Component_Association: the analysis needs to take place once the loop structure is analyzed and the loop parameter made visible, because references to it typically appear in the corresponding expression. This is necessary if the expression is an aggregate, because previous pre-analysis of the expression does not handle nested aggregates properly. 2017-12-05 Bob Duff <duff@adacore.com> * sem_res.adb (Resolve_Allocator): Avoid coextension processing for an allocator that is the expansion of a build-in-place function call. 2017-12-05 Olivier Hainque <hainque@adacore.com> libgnat/ * s-trasym__dwarf.adb (spec of Module_Name.Get): Instead of possibly adjusting the lookup address by a load address, expect a extra argument through which the load address can be conveyed separately. (Multi_Module_Symbolic_Traceback): Adjust accordingly. Pass the retrieved load address to Init_Module. * s-tsmona__linux.adb (Get): Honor the new interface. * s-tsmona__mingw.adb (Get): Likewise. * s-dwalin.ads: Adjust comments to be explicit about which addresses are from module info and which are run-time addresses, offsetted by the module load address. * s-dwalin.adb (Set_Load_Address): Simply set C.Load_Slide. Do not alter the module Low and High (relative) addresses. (Is_Inside): Improve documentation regarding the kinds of addresses at hand and correct the test. (Symbolic_Traceback): Use separate variables with explicit names for the address in traceback (run-time value) and the address to lookup within the shared object (module-relative). Adjust the computation of address passed to Symbolic_Address for symbolization. From-SVN: r255411
Diffstat (limited to 'gcc/ada/exp_aggr.adb')
-rw-r--r--gcc/ada/exp_aggr.adb13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index 919f46f..581e31c 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -1533,7 +1533,14 @@ package body Exp_Aggr is
-- the analysis of non-array aggregates now in order to get the
-- value of Expansion_Delayed flag for the inner aggregate ???
- if Present (Comp_Typ) and then not Is_Array_Type (Comp_Typ) then
+ -- In the case of an iterated component association, the analysis
+ -- of the generated loop will analyze the expression in the
+ -- proper context, in which the loop parameter is visible.
+
+ if Present (Comp_Typ) and then not Is_Array_Type (Comp_Typ)
+ and then
+ Nkind (Parent (Expr_Q)) /= N_Iterated_Component_Association
+ then
Analyze_And_Resolve (Expr_Q, Comp_Typ);
end if;
@@ -5366,6 +5373,10 @@ package body Exp_Aggr is
Expr : Node_Id;
begin
+ if Nkind (Parent (Aggr)) = N_Iterated_Component_Association then
+ return False;
+ end if;
+
if Present (Expressions (Aggr)) then
Expr := First (Expressions (Aggr));
while Present (Expr) loop