aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-12-07 06:05:09 +0100
committerTristan Gingold <tgingold@free.fr>2017-12-07 06:05:09 +0100
commitb85eed7c60560dc5d3027939e887180634f25168 (patch)
tree2bbbaad9f93b0b105f0010d4e4e08722495d2a0d /src
parent7dfd4db5b5e40cadef146e5df7e7d01463403a9a (diff)
downloadghdl-b85eed7c60560dc5d3027939e887180634f25168.tar.gz
ghdl-b85eed7c60560dc5d3027939e887180634f25168.tar.bz2
ghdl-b85eed7c60560dc5d3027939e887180634f25168.zip
simul: handle optional body for package instantiation.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/simulate/simul-elaboration.adb7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vhdl/simulate/simul-elaboration.adb b/src/vhdl/simulate/simul-elaboration.adb
index 21ec74a19..0eb6047c1 100644
--- a/src/vhdl/simulate/simul-elaboration.adb
+++ b/src/vhdl/simulate/simul-elaboration.adb
@@ -426,8 +426,11 @@ package body Simul.Elaboration is
Bod : constant Iir := Get_Package_Body (Uninst);
begin
Instance.Uninst_Scope := Get_Info (Uninst);
- Elaborate_Declarative_Part
- (Instance, Get_Declaration_Chain (Bod));
+ if Is_Valid (Bod) then
+ -- Body is optional.
+ Elaborate_Declarative_Part
+ (Instance, Get_Declaration_Chain (Bod));
+ end if;
end;
end if;
end if;