aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-09-28 18:30:25 +0200
committerTristan Gingold <tgingold@free.fr>2020-09-28 19:07:52 +0200
commit7e7f0b08072381b9a4f1ae89172352ee7ee7fab8 (patch)
tree7d927385085da0924bea6ff7443d308ec9ff2e94 /src/vhdl
parent6cf78dc917710a6e6d962f2d7ddaa6137b34ab6d (diff)
downloadghdl-7e7f0b08072381b9a4f1ae89172352ee7ee7fab8.tar.gz
ghdl-7e7f0b08072381b9a4f1ae89172352ee7ee7fab8.tar.bz2
ghdl-7e7f0b08072381b9a4f1ae89172352ee7ee7fab8.zip
vhdl-sem_psl: fix crash in case of error in assert statement. Fix #1480
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/vhdl-sem_psl.adb7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vhdl/vhdl-sem_psl.adb b/src/vhdl/vhdl-sem_psl.adb
index bcdce2239..341e937a5 100644
--- a/src/vhdl/vhdl-sem_psl.adb
+++ b/src/vhdl/vhdl-sem_psl.adb
@@ -394,10 +394,13 @@ package body Vhdl.Sem_Psl is
if Expr = Null_Iir then
return N;
end if;
- Free_Node (N);
Expr_Type := Get_Type (Expr);
+ if Expr_Type = Null_Iir then
+ return N;
+ end if;
+ Free_Node (N);
if not Is_Overload_List (Expr_Type)
- and then not Is_Psl_Boolean_Type (Expr_Type)
+ and then not Is_Psl_Boolean_Type (Expr_Type)
then
Error_Msg_Sem (+Expr, "type of expression must be boolean");
return PSL.Hash.Get_PSL_Node (HDL_Node (Expr), Get_Location (Expr));