diff options
| -rw-r--r-- | src/synth/synth-stmts.adb | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index 2f2b85fe6..7ac5053e2 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -526,7 +526,11 @@ package body Synth.Stmts is        --  If the width is not a multiple of 2, handle the last level.        if Wd mod 2 = 1 then -         Sub_Sel := Build_Extract_Bit (Build_Context, Sel, Wd - 1); +         if Wd = 1 then +            Sub_Sel := Sel; +         else +            Sub_Sel := Build_Extract_Bit (Build_Context, Sel, Wd - 1); +         end if;           Iels := Els'First;           Oels := Els'First;           while Iels <= Lels loop  | 
