From 506315e9cc2996197b5e061e04511f7fa867749d Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 5 Jul 2021 18:28:34 +0200 Subject: vhdl-sem_stmts.adb: avoid a crash on invalid expression --- src/vhdl/vhdl-sem_stmts.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3