aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-13 18:52:59 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-13 18:54:26 +0200
commit090420bd1a57ba496f0d59bf7a119d05a68ea1e3 (patch)
treedc1bfa1533f5b4efa221f7f234e17689dea4a68f /src
parent226b976541d854bf2b6066179daa034a4ae9485b (diff)
downloadghdl-090420bd1a57ba496f0d59bf7a119d05a68ea1e3.tar.gz
ghdl-090420bd1a57ba496f0d59bf7a119d05a68ea1e3.tar.bz2
ghdl-090420bd1a57ba496f0d59bf7a119d05a68ea1e3.zip
synth-stmts: fix thinko (need to adjust type for indexed a 1-bit array).
Diffstat (limited to 'src')
-rw-r--r--src/synth/synth-stmts.adb7
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);