aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-stmts.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-13 05:30:25 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-13 06:30:31 +0100
commit24876db04a0addf732bcd4589664edcc97cf9751 (patch)
tree22577daedb9c6aca73aa7a8e6c1a4bdcd5e3ef01 /src/synth/synth-stmts.adb
parent3561102557932a65ccd08e1383678c6c6c4d9a35 (diff)
downloadghdl-24876db04a0addf732bcd4589664edcc97cf9751.tar.gz
ghdl-24876db04a0addf732bcd4589664edcc97cf9751.tar.bz2
ghdl-24876db04a0addf732bcd4589664edcc97cf9751.zip
synth: propagate more errors.
Diffstat (limited to 'src/synth/synth-stmts.adb')
-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 d7fe43c78..c40eaadc6 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -680,6 +680,10 @@ package body Synth.Stmts is
Phi_False : Phi_Type;
begin
Cond_Val := Synth_Expression (C.Inst, Cond);
+ if Cond_Val = null then
+ Set_Error (C.Inst);
+ return;
+ end if;
if Is_Static (Cond_Val) then
Strip_Const (Cond_Val);
if Cond_Val.Scal = 1 then