aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-evaluation.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-09-18 17:39:40 +0200
committerTristan Gingold <tgingold@free.fr>2021-09-18 17:39:40 +0200
commitc55c477f49dcdeaccd2100cda96635bbc62ea4e6 (patch)
tree45f8228786de1c34f08512071cb4acfb12feed31 /src/vhdl/vhdl-evaluation.adb
parentfe9d66eb5c5dd26aecb999eaaacf2eafd744b364 (diff)
downloadghdl-c55c477f49dcdeaccd2100cda96635bbc62ea4e6.tar.gz
ghdl-c55c477f49dcdeaccd2100cda96635bbc62ea4e6.tar.bz2
ghdl-c55c477f49dcdeaccd2100cda96635bbc62ea4e6.zip
vhdl-evaluation.adb: handle iir_kind_aggregate in build_constant. Fix #543
Diffstat (limited to 'src/vhdl/vhdl-evaluation.adb')
-rw-r--r--src/vhdl/vhdl-evaluation.adb11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-evaluation.adb b/src/vhdl/vhdl-evaluation.adb
index 1b74d6987..6305cdbae 100644
--- a/src/vhdl/vhdl-evaluation.adb
+++ b/src/vhdl/vhdl-evaluation.adb
@@ -248,6 +248,17 @@ package body Vhdl.Evaluation is
Res := Create_Iir (Iir_Kind_Simple_Aggregate);
Set_Simple_Aggregate_List (Res, Get_Simple_Aggregate_List (Val));
+ when Iir_Kind_Aggregate =>
+ -- FIXME: ownership violation: both RES and VAL are parents of
+ -- association_choices_chain and aggregate_info.
+ -- But this aggregate is always temporary.
+ -- TODO: add maybe_ref_chain.
+ Res := Create_Iir (Iir_Kind_Aggregate);
+ Set_Association_Choices_Chain
+ (Res, Get_Association_Choices_Chain (Val));
+ Set_Aggregate_Info (Res, Get_Aggregate_Info (Val));
+ Set_Aggregate_Expand_Flag (Res, Get_Aggregate_Expand_Flag (Val));
+
when Iir_Kind_Overflow_Literal =>
Res := Create_Iir (Iir_Kind_Overflow_Literal);