aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-expands.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-13 05:32:56 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-13 06:30:33 +0100
commitc138b798d1830e255b4d8a9b229fe620db363919 (patch)
tree1ad53a47e19b07d167314ac4d2f2f40b743af15c /src/synth/netlists-expands.adb
parent138516ead7cf495551b7056cc31cc06ed655be8e (diff)
downloadghdl-c138b798d1830e255b4d8a9b229fe620db363919.tar.gz
ghdl-c138b798d1830e255b4d8a9b229fe620db363919.tar.bz2
ghdl-c138b798d1830e255b4d8a9b229fe620db363919.zip
netlists: handle more case of 0 sized nets.
Diffstat (limited to 'src/synth/netlists-expands.adb')
-rw-r--r--src/synth/netlists-expands.adb5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/synth/netlists-expands.adb b/src/synth/netlists-expands.adb
index 37ff24bf7..09ff5d9c4 100644
--- a/src/synth/netlists-expands.adb
+++ b/src/synth/netlists-expands.adb
@@ -236,6 +236,11 @@ package body Netlists.Expands is
J : Int32;
Step : Int32;
begin
+ if W = 0 then
+ Net_Arr (0) := Build_Const_UB32 (Ctxt, 1, 1);
+ return;
+ end if;
+
for I in reverse 0 .. W - 1 loop
V1 := Build_Extract_Bit (Ctxt, Addr, I);
V0 := Build_Monadic (Ctxt, Id_Not, V1);