aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-iterators.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-11 18:42:53 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-13 18:54:22 +0200
commitf7300b2906b6c918c83b6037d7223e7409dd440e (patch)
treedf9f4979f3eab24936fa05322598722e363334a4 /src/synth/netlists-iterators.adb
parent81fd63ab8cb8e3ddb0ff93fb5f8551834da1a210 (diff)
downloadghdl-f7300b2906b6c918c83b6037d7223e7409dd440e.tar.gz
ghdl-f7300b2906b6c918c83b6037d7223e7409dd440e.tar.bz2
ghdl-f7300b2906b6c918c83b6037d7223e7409dd440e.zip
netlists-iterators: avoid a crash if no ports.
Diffstat (limited to 'src/synth/netlists-iterators.adb')
-rw-r--r--src/synth/netlists-iterators.adb4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/synth/netlists-iterators.adb b/src/synth/netlists-iterators.adb
index 2bb1c8c05..4468a889e 100644
--- a/src/synth/netlists-iterators.adb
+++ b/src/synth/netlists-iterators.adb
@@ -316,9 +316,7 @@ package body Netlists.Iterators is
Inst := Get_Next_Instance (Inst);
exit when Inst = No_Instance;
Num := Get_Nbr_Outputs (Inst);
- if Num = 0 then
- pragma Assert (Get_Id (Get_Module (Inst)) = Id_Free);
- else
+ if Num /= 0 then
return Nets_Cursor'(Inst => Inst,
N => Get_First_Output (Inst),
Num => Num);