From 1fd1663e94f9d1c14fb8ccf8f1ee034827f7c31a Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 24 Mar 2018 17:44:11 +0100 Subject: Avoid crash after error. For #381 --- src/vhdl/errorout.adb | 2 +- src/vhdl/sem_stmts.adb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/vhdl') diff --git a/src/vhdl/errorout.adb b/src/vhdl/errorout.adb index a230e8dc3..e068e113c 100644 --- a/src/vhdl/errorout.adb +++ b/src/vhdl/errorout.adb @@ -810,7 +810,7 @@ package body Errorout is begin Decl := Get_Type_Declarator (Node); if Decl = Null_Iir then - return "the anonymous " & Str + return "anonymous " & Str & " defined at " & Disp_Location (Node); else return Disp_Identifier (Decl, Str); diff --git a/src/vhdl/sem_stmts.adb b/src/vhdl/sem_stmts.adb index f80a28cde..79e5d2e31 100644 --- a/src/vhdl/sem_stmts.adb +++ b/src/vhdl/sem_stmts.adb @@ -503,6 +503,10 @@ package body Sem_Stmts is Set_We_Value (We, Expr); Merge_Wildcard_Type (Expr, Waveform_Type); + else + Expr := Get_We_Value (We); + Expr := Create_Error_Expr (Expr, Waveform_Type); + Set_We_Value (We, Expr); end if; end if; -- cgit v1.2.3