aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-07 18:35:10 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-07 18:35:10 +0100
commit15ad354882b2cda02cc32aa9826385508d743c55 (patch)
tree5645897931bef600a64cad2e9a11893de761f06c /src
parent55d3c747da48e490aa558089b9809fd9dc488bf5 (diff)
downloadghdl-15ad354882b2cda02cc32aa9826385508d743c55.tar.gz
ghdl-15ad354882b2cda02cc32aa9826385508d743c55.tar.bz2
ghdl-15ad354882b2cda02cc32aa9826385508d743c55.zip
vhdl-configuration: avoid crash on parse error.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/vhdl-configuration.adb7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vhdl/vhdl-configuration.adb b/src/vhdl/vhdl-configuration.adb
index faafe0d4f..d583597e2 100644
--- a/src/vhdl/vhdl-configuration.adb
+++ b/src/vhdl/vhdl-configuration.adb
@@ -908,10 +908,13 @@ package body Vhdl.Configuration is
declare
use Vhdl.Sem_Scopes;
Comp : constant Iir := Get_Named_Entity (Inst);
- Interp : constant Name_Interpretation_Type :=
- Get_Interpretation (Get_Identifier (Comp));
+ Interp : Name_Interpretation_Type;
Decl : Iir;
begin
+ if Is_Error (Comp) then
+ return Walk_Continue;
+ end if;
+ Interp := Get_Interpretation (Get_Identifier (Comp));
if Valid_Interpretation (Interp) then
Decl := Get_Declaration (Interp);
pragma Assert