diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-09 07:51:05 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-09 07:52:18 +0100 |
commit | ebb526e2ec4187c1463b87c9db5b2417c6399793 (patch) | |
tree | b76c47198301a9ba6251858527b00204b1612d8f /src/synth/synth-vhdl_decls.adb | |
parent | 3049de704edfc40c539896b6e6416fa1ce4c9cd9 (diff) | |
download | ghdl-ebb526e2ec4187c1463b87c9db5b2417c6399793.tar.gz ghdl-ebb526e2ec4187c1463b87c9db5b2417c6399793.tar.bz2 ghdl-ebb526e2ec4187c1463b87c9db5b2417c6399793.zip |
synth: always create shared variables
Diffstat (limited to 'src/synth/synth-vhdl_decls.adb')
-rw-r--r-- | src/synth/synth-vhdl_decls.adb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/synth/synth-vhdl_decls.adb b/src/synth/synth-vhdl_decls.adb index ed0a62ace..5c9e62f37 100644 --- a/src/synth/synth-vhdl_decls.adb +++ b/src/synth/synth-vhdl_decls.adb @@ -534,13 +534,14 @@ package body Synth.Vhdl_Decls is if Init.Typ.Kind = Type_Protected then Error_Msg_Synth (Syn_Inst, Decl, "protected type not supported"); Set_Error (Syn_Inst); - else - if Init.Val = null then - Mark_Expr_Pool (Marker); - Init := Create_Value_Default (Init.Typ); - Init := Unshare (Init, Instance_Pool); - Release_Expr_Pool (Marker); - end if; + return; + end if; + + if Init.Val = null then + Mark_Expr_Pool (Marker); + Init := Create_Value_Default (Init.Typ); + Init := Unshare (Init, Instance_Pool); + Release_Expr_Pool (Marker); end if; Val := Create_Var_Wire (Syn_Inst, Decl, Wire_Variable, Init); |