aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-oper.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-18 18:59:05 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-18 18:59:05 +0200
commitacc1a9f189e1f53489dfe02a86e03277bb23e890 (patch)
tree39d1f29e93f0f4adaa51e2d8d1b6e581e4658840 /src/synth/synth-oper.adb
parentea367247d8a57e899eaea5f8507149e83e41a56f (diff)
downloadghdl-acc1a9f189e1f53489dfe02a86e03277bb23e890.tar.gz
ghdl-acc1a9f189e1f53489dfe02a86e03277bb23e890.tar.bz2
ghdl-acc1a9f189e1f53489dfe02a86e03277bb23e890.zip
synth-oper: check that dyadic logical operands have same length. Fix #1243
Diffstat (limited to 'src/synth/synth-oper.adb')
-rw-r--r--src/synth/synth-oper.adb5
1 files changed, 4 insertions, 1 deletions
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);