From a60a736bfd35ee19a90f4a69e299706079ac76a8 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 16 Apr 2020 17:51:24 +0200 Subject: synth-stmts: handle null assignments. Fix #1230 --- src/synth/synth-stmts.adb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index d994bc0ff..d9b81188d 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -434,6 +434,12 @@ package body Synth.Stmts is Synth_Assignment_Aggregate (Syn_Inst, Target.Aggr, Target.Targ_Type, V, Loc); when Target_Simple => + if V.Typ.Sz = 0 then + -- If there is nothing to assign (like a null slice), + -- return now. + return; + end if; + if Target.Obj.Val.Kind = Value_Wire then if Is_Static (V.Val) and then V.Typ.W = Target.Obj.Typ.W -- cgit v1.2.3