diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-08-14 21:42:05 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-08-14 21:42:05 +0200 |
commit | 56a15442f1690b7b996880f098bcf3eec47e9254 (patch) | |
tree | c77115554cc86650dd25c7095ac84da295ba018f | |
parent | 73256b07e3884622e1c8e3cce4b958e26dd3beb5 (diff) | |
download | ghdl-56a15442f1690b7b996880f098bcf3eec47e9254.tar.gz ghdl-56a15442f1690b7b996880f098bcf3eec47e9254.tar.bz2 ghdl-56a15442f1690b7b996880f098bcf3eec47e9254.zip |
synth-vhdl_context: fix handling of alias in get_net. Fix #2177
-rw-r--r-- | src/synth/synth-vhdl_context.adb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/synth/synth-vhdl_context.adb b/src/synth/synth-vhdl_context.adb index 90e618e1e..1d7aa5538 100644 --- a/src/synth/synth-vhdl_context.adb +++ b/src/synth/synth-vhdl_context.adb @@ -412,12 +412,11 @@ package body Synth.Vhdl_Context is if Val.Val.A_Obj.Kind = Value_Wire then Res := Get_Current_Value (Ctxt, Get_Value_Wire (Val.Val.A_Obj)); - return Build2_Extract - (Ctxt, Res, Val.Val.A_Off.Net_Off, Val.Typ.W); else - pragma Assert (Val.Val.A_Off.Net_Off = 0); - return Get_Net (Ctxt, (Val.Typ, Val.Val.A_Obj)); + Res := Get_Net (Ctxt, (Val.Typ, Val.Val.A_Obj)); end if; + return Build2_Extract + (Ctxt, Res, Val.Val.A_Off.Net_Off, Val.Typ.W); end; when Value_Const => declare |