aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/netlists.adb')
-rw-r--r--src/synth/netlists.adb8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/synth/netlists.adb b/src/synth/netlists.adb
index 09a01f841..aa32138c3 100644
--- a/src/synth/netlists.adb
+++ b/src/synth/netlists.adb
@@ -529,9 +529,15 @@ package body Netlists is
procedure Free_Instance (Inst : Instance)
is
pragma Assert (Is_Valid (Inst));
+ Inst_Rec : Instance_Record renames Instances_Table.Table (Inst);
begin
pragma Assert (not Check_Connected (Inst));
- Instances_Table.Table (Inst).Klass := Free_Module;
+
+ -- Instance must not be linked anymore.
+ pragma Assert (Inst_Rec.Prev_Instance = No_Instance);
+ pragma Assert (Inst_Rec.Next_Instance = No_Instance);
+
+ Inst_Rec.Klass := Free_Module;
end Free_Instance;
function Get_Module (Inst : Instance) return Module is