diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-05-18 14:17:35 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-05-18 14:17:56 +0200 |
commit | 754c9ad605bc94bcc377a3b1666fb7fb4bcf72c2 (patch) | |
tree | 0b1f81701676ad9ad9b80e8327a4c17c2b5f9727 /src/synth/synth-vhdl_stmts.adb | |
parent | 91162dc0553f088967d85633c6db0d78ab16f873 (diff) | |
download | ghdl-754c9ad605bc94bcc377a3b1666fb7fb4bcf72c2.tar.gz ghdl-754c9ad605bc94bcc377a3b1666fb7fb4bcf72c2.tar.bz2 ghdl-754c9ad605bc94bcc377a3b1666fb7fb4bcf72c2.zip |
synth-vhdl_stmts: avoid a crash after an error. Fix #2063
Diffstat (limited to 'src/synth/synth-vhdl_stmts.adb')
-rw-r--r-- | src/synth/synth-vhdl_stmts.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb index 75080125f..8a71cc5db 100644 --- a/src/synth/synth-vhdl_stmts.adb +++ b/src/synth/synth-vhdl_stmts.adb @@ -481,7 +481,10 @@ package body Synth.Vhdl_Stmts is return; end if; - if Target.Obj.Val.Kind = Value_Wire then + if Target.Obj = No_Valtyp then + -- There was an error. + null; + elsif Target.Obj.Val.Kind = Value_Wire then W := Get_Value_Wire (Target.Obj.Val); if Is_Static (V.Val) and then V.Typ.Sz = Target.Obj.Typ.Sz |