aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2015-12-01 04:38:06 +0100
committerTristan Gingold <gingold@adacore.com>2015-12-03 05:23:10 +0100
commitf5a19fc488a0be8ef43a9952f8fa1337d66f8e6e (patch)
tree6da64355d9c894de2d6a847f61b5b48d8db012c1 /src
parent6b255aa71f81afeaf4e3c76350ec28793fa8e089 (diff)
downloadghdl-f5a19fc488a0be8ef43a9952f8fa1337d66f8e6e.tar.gz
ghdl-f5a19fc488a0be8ef43a9952f8fa1337d66f8e6e.tar.bz2
ghdl-f5a19fc488a0be8ef43a9952f8fa1337d66f8e6e.zip
errorout: fix crash on entity_aspect_entity.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/errorout.adb13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/vhdl/errorout.adb b/src/vhdl/errorout.adb
index 7982a9d1b..531dda469 100644
--- a/src/vhdl/errorout.adb
+++ b/src/vhdl/errorout.adb
@@ -496,8 +496,17 @@ package body Errorout is
return "pathname element";
when Iir_Kind_Entity_Aspect_Entity =>
- return "aspect " & Disp_Node (Get_Entity (Node))
- & '(' & Image_Identifier (Get_Architecture (Node)) & ')';
+ declare
+ Arch : constant Iir := Get_Architecture (Node);
+ Ent : constant Iir := Get_Entity (Node);
+ begin
+ if Arch = Null_Iir then
+ return "aspect " & Disp_Node (Ent);
+ else
+ return "aspect " & Disp_Node (Ent)
+ & '(' & Image_Identifier (Arch) & ')';
+ end if;
+ end;
when Iir_Kind_Entity_Aspect_Configuration =>
return "configuration entity aspect";
when Iir_Kind_Entity_Aspect_Open =>