aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-02-27 10:27:04 +0100
committerTristan Gingold <tgingold@free.fr>2021-02-27 13:11:48 +0100
commit8c6736780bea5459f7a605f50b69a9db22cde821 (patch)
tree0e41e678cdee599f4d4cd6ff85dc723ca4be2b64 /src
parentba23c5a260abe033908677bf92516f1ce934fc41 (diff)
downloadghdl-8c6736780bea5459f7a605f50b69a9db22cde821.tar.gz
ghdl-8c6736780bea5459f7a605f50b69a9db22cde821.tar.bz2
ghdl-8c6736780bea5459f7a605f50b69a9db22cde821.zip
vhdl-sem_expr: detect incorrect condition for vhdl08. Fix #1664
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/vhdl-sem_expr.adb3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb
index 02c620bf5..8ed0a8c0e 100644
--- a/src/vhdl/vhdl-sem_expr.adb
+++ b/src/vhdl/vhdl-sem_expr.adb
@@ -5725,6 +5725,9 @@ package body Vhdl.Sem_Expr is
if Res = Null_Iir then
-- Error occurred.
return Null_Iir;
+ elsif Get_Type (Res) = Null_Iir then
+ Error_Msg_Sem (+Res, "incorrect type for condition");
+ return Null_Iir;
end if;
return Sem_Condition_Pass2 (Res);