diff options
author | Tristan Gingold <gingold@adacore.com> | 2015-12-01 04:38:06 +0100 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2015-12-03 05:23:10 +0100 |
commit | f5a19fc488a0be8ef43a9952f8fa1337d66f8e6e (patch) | |
tree | 6da64355d9c894de2d6a847f61b5b48d8db012c1 | |
parent | 6b255aa71f81afeaf4e3c76350ec28793fa8e089 (diff) | |
download | ghdl-f5a19fc488a0be8ef43a9952f8fa1337d66f8e6e.tar.gz ghdl-f5a19fc488a0be8ef43a9952f8fa1337d66f8e6e.tar.bz2 ghdl-f5a19fc488a0be8ef43a9952f8fa1337d66f8e6e.zip |
errorout: fix crash on entity_aspect_entity.
-rw-r--r-- | src/vhdl/errorout.adb | 13 |
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 => |