aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-vhdl_insts.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-07-05 06:32:00 +0200
committerTristan Gingold <tgingold@free.fr>2022-07-05 06:32:00 +0200
commit16294762f5e521c6a159b7946794119615dc0b39 (patch)
tree0c87f5bb788c309967ef82821954ef641821d4db /src/synth/synth-vhdl_insts.adb
parent0529da6ce3ebe08e2f01f5916400adb2b9344bf8 (diff)
downloadghdl-16294762f5e521c6a159b7946794119615dc0b39.tar.gz
ghdl-16294762f5e521c6a159b7946794119615dc0b39.tar.bz2
ghdl-16294762f5e521c6a159b7946794119615dc0b39.zip
synth-vhdl_insts: do not crash on unconnected input. Fix #2124
Diffstat (limited to 'src/synth/synth-vhdl_insts.adb')
-rw-r--r--src/synth/synth-vhdl_insts.adb4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/synth/synth-vhdl_insts.adb b/src/synth/synth-vhdl_insts.adb
index 2d3f3360f..cf7814276 100644
--- a/src/synth/synth-vhdl_insts.adb
+++ b/src/synth/synth-vhdl_insts.adb
@@ -664,6 +664,10 @@ package body Synth.Vhdl_Insts is
when others =>
Vhdl.Errors.Error_Kind ("synth_single_input_assoc", Conv);
end case;
+ elsif Actual = Null_Node then
+ -- No actual, no default value.
+ Act := Create_Value_Net
+ (Build_Const_X (Ctxt, Inter_Typ.W), Inter_Typ);
else
Act := Synth_Expression_With_Type (Act_Inst, Actual, Inter_Typ);
end if;