aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-07-05 18:28:34 +0200
committerTristan Gingold <tgingold@free.fr>2021-07-05 18:28:34 +0200
commit506315e9cc2996197b5e061e04511f7fa867749d (patch)
treeb84a25f3131fde898c1726fb95e4eb405abe6cc4
parentd2fca803b1deefc37fe35cd1fa845125acec6034 (diff)
downloadghdl-506315e9cc2996197b5e061e04511f7fa867749d.tar.gz
ghdl-506315e9cc2996197b5e061e04511f7fa867749d.tar.bz2
ghdl-506315e9cc2996197b5e061e04511f7fa867749d.zip
vhdl-sem_stmts.adb: avoid a crash on invalid expression
-rw-r--r--src/vhdl/vhdl-sem_stmts.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_stmts.adb b/src/vhdl/vhdl-sem_stmts.adb
index b75202d90..287f54dab 100644
--- a/src/vhdl/vhdl-sem_stmts.adb
+++ b/src/vhdl/vhdl-sem_stmts.adb
@@ -1049,7 +1049,9 @@ package body Vhdl.Sem_Stmts is
Expr := Sem_Expression_Wildcard
(Expr, Stmt_Type, Constrained);
if Expr /= Null_Iir then
- if Is_Expr_Fully_Analyzed (Expr) then
+ if Is_Expr_Fully_Analyzed (Expr)
+ and then not Is_Error (Get_Type (Expr))
+ then
Check_Read (Expr);
Expr := Eval_Expr_If_Static (Expr);
end if;