diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-10-13 18:52:59 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-10-13 18:54:26 +0200 |
commit | 090420bd1a57ba496f0d59bf7a119d05a68ea1e3 (patch) | |
tree | dc1bfa1533f5b4efa221f7f234e17689dea4a68f | |
parent | 226b976541d854bf2b6066179daa034a4ae9485b (diff) | |
download | ghdl-090420bd1a57ba496f0d59bf7a119d05a68ea1e3.tar.gz ghdl-090420bd1a57ba496f0d59bf7a119d05a68ea1e3.tar.bz2 ghdl-090420bd1a57ba496f0d59bf7a119d05a68ea1e3.zip |
synth-stmts: fix thinko (need to adjust type for indexed a 1-bit array).
-rw-r--r-- | src/synth/synth-stmts.adb | 7 |
1 files changed, 5 insertions, 2 deletions
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); |