summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_aggr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/exp_aggr.adb')
-rw-r--r--gcc/ada/exp_aggr.adb3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index fe9cef08289..037a8dcc6ea 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -5215,9 +5215,10 @@ package body Exp_Aggr is
-------------------------
function Top_Level_Aggregate (N : Node_Id) return Node_Id is
- Aggr : Node_Id := N;
+ Aggr : Node_Id;
begin
+ Aggr := N;
while Present (Parent (Aggr))
and then Nkind_In (Parent (Aggr), N_Component_Association,
N_Aggregate)