From acc1a9f189e1f53489dfe02a86e03277bb23e890 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 18 Apr 2020 18:59:05 +0200 Subject: synth-oper: check that dyadic logical operands have same length. Fix #1243 --- src/synth/synth-oper.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb index 3f633fe6d..c87a61235 100644 --- a/src/synth/synth-oper.adb +++ b/src/synth/synth-oper.adb @@ -481,7 +481,10 @@ package body Synth.Oper is is N : Net; begin - -- FIXME: check same length. + if Left.Typ.W /= Right.Typ.W then + Error_Msg_Synth (+Expr, "operands don't have the same length"); + return No_Valtyp; + end if; N := Build_Dyadic (Build_Context, Id, Get_Net (Left), Get_Net (Right)); Set_Location (N, Expr); -- cgit v1.2.3