diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-05-17 09:44:32 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-05-17 09:44:32 +0200 |
commit | 291fde96273b8b2b6520b7834ff5a9d9623a48f4 (patch) | |
tree | 37d911ca9cf91fa8f5117217a8480e251618aa56 /src | |
parent | 4102926024ee05f09f02954c6defe50195711301 (diff) | |
download | ghdl-291fde96273b8b2b6520b7834ff5a9d9623a48f4.tar.gz ghdl-291fde96273b8b2b6520b7834ff5a9d9623a48f4.tar.bz2 ghdl-291fde96273b8b2b6520b7834ff5a9d9623a48f4.zip |
netlists-inference: avoid a crash for assertions in case statement. Fix #1317
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/netlists-inference.adb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/synth/netlists-inference.adb b/src/synth/netlists-inference.adb index 6ba244888..4e79e7680 100644 --- a/src/synth/netlists-inference.adb +++ b/src/synth/netlists-inference.adb @@ -939,10 +939,15 @@ package body Netlists.Inference is First_Inst := Get_Net_Parent (Val); Inst := First_Inst; loop - if Get_Id (Inst) /= Id_Mux2 then - pragma Assert (Get_Id (Inst) = Id_Const_UB32); - return Val; - end if; + case Get_Id (Inst) is + when Id_Mux2 => + null; + when Id_Const_UB32 + | Id_Pmux => + return Val; + when others => + raise Internal_Error; + end case; Extract_Clock (Ctxt, Get_Input_Net (Inst, 0), Clk, En); exit when Clk /= No_Net; |