aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-11-06 03:39:43 +0100
committerTristan Gingold <tgingold@free.fr>2019-11-06 03:39:43 +0100
commit51e84968803814de78a47a3b78b3599e9efb0708 (patch)
tree1a03c58f17f44c83694f971b82b4ec3a19b28599 /src/synth
parent302fa62d98718b8c3fa59ca745705c9caebd1f01 (diff)
downloadghdl-51e84968803814de78a47a3b78b3599e9efb0708.tar.gz
ghdl-51e84968803814de78a47a3b78b3599e9efb0708.tar.bz2
ghdl-51e84968803814de78a47a3b78b3599e9efb0708.zip
netlists-cleanup: do not remove the self-instance.
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/netlists-cleanup.adb2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/synth/netlists-cleanup.adb b/src/synth/netlists-cleanup.adb
index 207a8a63e..21d6f94d1 100644
--- a/src/synth/netlists-cleanup.adb
+++ b/src/synth/netlists-cleanup.adb
@@ -64,6 +64,8 @@ package body Netlists.Cleanup is
List := No_Instance;
Inst := Get_First_Instance (M);
+ -- But keep the self-instance.
+ Inst := Get_Next_Instance (Inst);
while Inst /= No_Instance loop
Next_Inst := Get_Next_Instance (Inst);
Extract_If_Unused (Inst, List);