From 1a9e48e9d72bfd4c027ab2fb852f83c67ae9ce6c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 15 Nov 2021 07:55:01 +0100 Subject: vhdl-sem_expr: improve code generation for multi-dim aggregates --- src/vhdl/vhdl-sem_expr.adb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb index 79aa853e3..21e7b2237 100644 --- a/src/vhdl/vhdl-sem_expr.adb +++ b/src/vhdl/vhdl-sem_expr.adb @@ -3734,6 +3734,9 @@ package body Vhdl.Sem_Expr is begin -- Analyze choices (for aggregate but not for strings). if Get_Kind (Aggr) = Iir_Kind_Aggregate then + -- By default, consider the aggregate can be statically built. + Set_Aggregate_Expand_Flag (Aggr, True); + Assoc_Chain := Get_Association_Choices_Chain (Aggr); Sem_Choices_Range (Assoc_Chain, Index_Type, Low, High, Get_Location (Aggr), not Constrained, False); @@ -4102,9 +4105,6 @@ package body Vhdl.Sem_Expr is Info, Prev_Info : Iir_Aggregate_Info; Type_Staticness : Iir_Staticness; begin - -- By default, consider the aggregate can be statically built. - Set_Aggregate_Expand_Flag (Aggr, True); - -- Analyze the aggregate. Sem_Array_Aggregate_1 (Aggr, Aggr_Type, Infos, Constrained, 1); -- cgit v1.2.3