From 090420bd1a57ba496f0d59bf7a119d05a68ea1e3 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 13 Oct 2019 18:52:59 +0200 Subject: synth-stmts: fix thinko (need to adjust type for indexed a 1-bit array). --- src/synth/synth-stmts.adb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index 8297e5242..ed289ba12 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -405,8 +405,11 @@ package body Synth.Stmts is N := Build_Dyn_Extract (Get_Build (Syn_Inst), Get_Net (Obj), Voff, Off, Typ.W); else - if Off = 0 and then Typ.W = Obj.Typ.W then - -- Nothing to do if extracting the whole object. + if Off = 0 + and then Typ.W = Obj.Typ.W + and then Typ /= Get_Array_Element (Obj.Typ) + then + -- Nothing to do if extracting the whole object as a slice. return Obj; end if; N := Build_Extract (Get_Build (Syn_Inst), Get_Net (Obj), Off, Typ.W); -- cgit v1.2.3