diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-02-27 10:27:04 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-02-27 13:11:48 +0100 |
commit | 8c6736780bea5459f7a605f50b69a9db22cde821 (patch) | |
tree | 0e41e678cdee599f4d4cd6ff85dc723ca4be2b64 | |
parent | ba23c5a260abe033908677bf92516f1ce934fc41 (diff) | |
download | ghdl-8c6736780bea5459f7a605f50b69a9db22cde821.tar.gz ghdl-8c6736780bea5459f7a605f50b69a9db22cde821.tar.bz2 ghdl-8c6736780bea5459f7a605f50b69a9db22cde821.zip |
vhdl-sem_expr: detect incorrect condition for vhdl08. Fix #1664
-rw-r--r-- | src/vhdl/vhdl-sem_expr.adb | 3 |
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); |