diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-11-08 19:30:04 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-11-11 20:25:24 +0100 |
commit | 023644a0eedf4ac919cae2e176ddc995d2e9afb5 (patch) | |
tree | a6678a19c84052387254297b8081ab49218590e4 /src | |
parent | f6ee4a75bfba5341a9116193810c5ccf771d1cf0 (diff) | |
download | ghdl-023644a0eedf4ac919cae2e176ddc995d2e9afb5.tar.gz ghdl-023644a0eedf4ac919cae2e176ddc995d2e9afb5.tar.bz2 ghdl-023644a0eedf4ac919cae2e176ddc995d2e9afb5.zip |
synth-decls: Only emit unused warnings on signals (and
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-decls.adb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/synth/synth-decls.adb b/src/synth/synth-decls.adb index e91849af0..834aef561 100644 --- a/src/synth/synth-decls.adb +++ b/src/synth/synth-decls.adb @@ -727,7 +727,7 @@ package body Synth.Decls is end loop; end Synth_Declarations; - procedure Finalize_Object (Syn_Inst : Synth_Instance_Acc; Decl : Node) + procedure Finalize_Signal (Syn_Inst : Synth_Instance_Acc; Decl : Node) is use Netlists.Gates; Val : Value_Acc; @@ -762,7 +762,7 @@ package body Synth.Decls is end if; Free_Wire (Val.W); - end Finalize_Object; + end Finalize_Signal; procedure Finalize_Declaration (Syn_Inst : Synth_Instance_Acc; Decl : Node; Is_Subprg : Boolean) is @@ -771,14 +771,18 @@ package body Synth.Decls is when Iir_Kind_Variable_Declaration | Iir_Kind_Interface_Variable_Declaration => if not Get_Instance_Const (Syn_Inst) then - Finalize_Object (Syn_Inst, Decl); + declare + Val : constant Value_Acc := Get_Value (Syn_Inst, Decl); + begin + Free_Wire (Val.W); + end; end if; when Iir_Kind_Constant_Declaration => null; when Iir_Kind_Signal_Declaration | Iir_Kind_Anonymous_Signal_Declaration => pragma Assert (not Is_Subprg); - Finalize_Object (Syn_Inst, Decl); + Finalize_Signal (Syn_Inst, Decl); when Iir_Kind_Object_Alias_Declaration => null; when Iir_Kind_Procedure_Declaration |