diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-03-24 17:44:11 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-03-24 17:44:11 +0100 |
commit | 1fd1663e94f9d1c14fb8ccf8f1ee034827f7c31a (patch) | |
tree | d90833605979c0d66b320ac74c61d4e5cd01f870 /src/vhdl | |
parent | 427aa85684a4d7c58fa9c0078aea04b455902fcd (diff) | |
download | ghdl-1fd1663e94f9d1c14fb8ccf8f1ee034827f7c31a.tar.gz ghdl-1fd1663e94f9d1c14fb8ccf8f1ee034827f7c31a.tar.bz2 ghdl-1fd1663e94f9d1c14fb8ccf8f1ee034827f7c31a.zip |
Avoid crash after error. For #381
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/errorout.adb | 2 | ||||
-rw-r--r-- | src/vhdl/sem_stmts.adb | 4 |
2 files changed, 5 insertions, 1 deletions
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; |