diff options
-rw-r--r-- | src/synth/synth-vhdl_stmts.adb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb index 0f2694e06..dbb6b10a9 100644 --- a/src/synth/synth-vhdl_stmts.adb +++ b/src/synth/synth-vhdl_stmts.adb @@ -571,12 +571,10 @@ package body Synth.Vhdl_Stmts is N := Get_Net (Ctxt, Obj); if Dyn.Voff /= No_Net then Synth.Source.Set_Location_Maybe (N, Loc); - if Dyn.Pfx_Off.Net_Off /= 0 then - N := Build2_Extract (Ctxt, N, Dyn.Pfx_Off.Net_Off, Dyn.Pfx_Typ.W); - end if; if Res_Typ.W /= 0 then -- Do not try to extract if the net is null. - N := Build_Dyn_Extract (Ctxt, N, Dyn.Voff, Off, Res_Typ.W); + N := Build_Dyn_Extract (Ctxt, N, Dyn.Voff, + Off + Dyn.Pfx_Off.Net_Off, Res_Typ.W); end if; else pragma Assert (not Is_Static (Obj.Val)); |