aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-stmts.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-02-17 18:37:36 +0100
committerTristan Gingold <tgingold@free.fr>2020-02-17 18:37:42 +0100
commit55f28c3f2473cf41f83ae63ef52223e8cbfe9016 (patch)
tree0f16e006f012d7850f0c53cfc5df334d488bfa03 /src/synth/synth-stmts.adb
parent5b9ccf680b139a94bd164bd0fba57b1e4a5535d3 (diff)
downloadghdl-55f28c3f2473cf41f83ae63ef52223e8cbfe9016.tar.gz
ghdl-55f28c3f2473cf41f83ae63ef52223e8cbfe9016.tar.bz2
ghdl-55f28c3f2473cf41f83ae63ef52223e8cbfe9016.zip
synth: allow constant condition for if-generate statement.
For #1076
Diffstat (limited to 'src/synth/synth-stmts.adb')
-rw-r--r--src/synth/synth-stmts.adb1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb
index fbca6e852..88501a684 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -2869,6 +2869,7 @@ package body Synth.Stmts is
Icond := Get_Condition (Gen);
if Icond /= Null_Node then
Cond := Synth_Expression (Syn_Inst, Icond);
+ Strip_Const (Cond);
pragma Assert (Cond.Kind = Value_Discrete);
else
-- It is the else generate.