aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-11-13 18:33:33 +0100
committerTristan Gingold <tgingold@free.fr>2019-11-13 18:33:33 +0100
commitbd26e10bc1d31cf0a781371710ef3be46bb23a4c (patch)
tree5900a7a0361acec866a0c7c94a0eaa49f7cb4572
parentc4443c4e9d9d747296d2be351927825ca692ff70 (diff)
downloadghdl-bd26e10bc1d31cf0a781371710ef3be46bb23a4c.tar.gz
ghdl-bd26e10bc1d31cf0a781371710ef3be46bb23a4c.tar.bz2
ghdl-bd26e10bc1d31cf0a781371710ef3be46bb23a4c.zip
synth-stmts: handle constant exit in for-loops.
-rw-r--r--src/synth/synth-stmts.adb4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb
index 227ae00b3..cd9bee0d7 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -1794,8 +1794,12 @@ package body Synth.Stmts is
while In_Range (It_Rng.Drange, Val.Scal) loop
Synth_Sequential_Statements (C, Stmts);
+
Update_Index (It_Rng.Drange, Val.Scal);
Loop_Control_Update (C);
+
+ -- Constant exit.
+ exit when Get_Current_Value (null, C.W_En) = Get_Inst_Bit0 (C.Inst);
end loop;
Loop_Control_Finish (C);