diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-06-19 06:28:16 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-06-19 06:28:16 +0200 |
commit | 8ea10774e2643e653dc6b5a07a6abd43fd01055d (patch) | |
tree | afbe4982e1515e64ce0e8ca3a276d8f538cace08 /src/synth/synth-stmts.adb | |
parent | 5c4dd6ea37990668c5cd29713a91d462943d89c2 (diff) | |
download | ghdl-8ea10774e2643e653dc6b5a07a6abd43fd01055d.tar.gz ghdl-8ea10774e2643e653dc6b5a07a6abd43fd01055d.tar.bz2 ghdl-8ea10774e2643e653dc6b5a07a6abd43fd01055d.zip |
synth: avoid crash on invalid range. For ghdl/ghdl-yosys-plugin#126
Diffstat (limited to 'src/synth/synth-stmts.adb')
-rw-r--r-- | src/synth/synth-stmts.adb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index af9f89143..16c70466c 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -3015,14 +3015,16 @@ package body Synth.Stmts is Set_Wire_Gate (C.W_En, Build_Control_Signal (Syn_Inst, 1, Proc)); Phi_Assign_Static (C.W_En, Bit1); - case Iir_Kinds_Process_Statement (Get_Kind (Proc)) is - when Iir_Kind_Sensitized_Process_Statement => - Synth_Sequential_Statements - (C, Get_Sequential_Statement_Chain (Proc)); - -- FIXME: check sensitivity list. - when Iir_Kind_Process_Statement => - Synth_Process_Sequential_Statements (C, Proc); - end case; + if not Is_Error (C.Inst) then + case Iir_Kinds_Process_Statement (Get_Kind (Proc)) is + when Iir_Kind_Sensitized_Process_Statement => + Synth_Sequential_Statements + (C, Get_Sequential_Statement_Chain (Proc)); + -- FIXME: check sensitivity list. + when Iir_Kind_Process_Statement => + Synth_Process_Sequential_Statements (C, Proc); + end case; + end if; -- FIXME: free W_En ? |