From afbffcb6f8e2ebc9786c6fc0c237ed32b900a310 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 4 Jan 2023 08:02:25 +0100 Subject: synth: check length of selector in case statement --- src/synth/synth-vhdl_stmts.adb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/synth') diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb index 794f4ca97..098448ba2 100644 --- a/src/synth/synth-vhdl_stmts.adb +++ b/src/synth/synth-vhdl_stmts.adb @@ -1582,6 +1582,10 @@ package body Synth.Vhdl_Stmts is if Is_Equal (Sel_Val, Sel) then return Stmts; end if; + if Sel_Val.Typ.Abound.Len /= Sel.Typ.Abound.Len then + Error_Msg_Synth (Inst, Choice, "incorrect selector length"); + -- TODO: what value should be returned ? + end if; when Iir_Kind_Choice_By_Others => return Stmts; when others => -- cgit v1.2.3