diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-08-08 05:23:02 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-08-08 05:23:02 +0200 |
commit | 16eb29c7ca5928517d7a49c77deae6d1f6c9437b (patch) | |
tree | 0a2925191a75b20c7aec1ed0860594293badb3ef /src/synth/synth-stmts.adb | |
parent | 2c7024f1845bab48157b49eccb3660c2af156f5b (diff) | |
download | ghdl-16eb29c7ca5928517d7a49c77deae6d1f6c9437b.tar.gz ghdl-16eb29c7ca5928517d7a49c77deae6d1f6c9437b.tar.bz2 ghdl-16eb29c7ca5928517d7a49c77deae6d1f6c9437b.zip |
synth: fix crash when assignment target is an aggregate.
For tgingold/ghdlsynth-beta#26
Diffstat (limited to 'src/synth/synth-stmts.adb')
-rw-r--r-- | src/synth/synth-stmts.adb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index f3623960a..85b4ed9d2 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -215,11 +215,13 @@ package body Synth.Stmts is Val : Value_Acc; begin -- FIXME: correctly handle target type when it is a slice. - if Get_Kind (Target) = Iir_Kind_Slice_Name then - Wf_Type := Null_Node; - else - Wf_Type := Get_Type (Target); - end if; + case Get_Kind (Target) is + when Iir_Kind_Slice_Name + | Iir_Kind_Aggregate => + Wf_Type := Null_Node; + when others => + Wf_Type := Get_Type (Target); + end case; Val := Synth_Waveform (Syn_Inst, Get_Waveform_Chain (Stmt), Wf_Type); Synth_Assignment (Syn_Inst, Target, Val, Stmt); end Synth_Simple_Signal_Assignment; |