aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-13 20:52:01 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-13 20:52:01 +0200
commitf987870925b5dc1875a935b4ed33bd257ce315db (patch)
tree5cec94435b398dd658952857692e2fec55c7afa3
parent28aa91c2f917e86ce202b548be558dc031e816fd (diff)
downloadghdl-f987870925b5dc1875a935b4ed33bd257ce315db.tar.gz
ghdl-f987870925b5dc1875a935b4ed33bd257ce315db.tar.bz2
ghdl-f987870925b5dc1875a935b4ed33bd257ce315db.zip
synth-stmts: propagate more errors.
-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 a7ed70f71..e1d25384b 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -2157,6 +2157,10 @@ package body Synth.Stmts is
begin
if Cond /= Null_Node then
Cond_Val := Synth_Expression (C.Inst, Cond);
+ if Cond_Val = No_Valtyp then
+ Set_Error (C.Inst);
+ return;
+ end if;
pragma Assert (Is_Static_Val (Cond_Val.Val));
if Get_Static_Discrete (Cond_Val) = 0 then
-- Not executed.