aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt/grt-avhpi.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-05-26 07:45:49 +0200
committerTristan Gingold <tgingold@free.fr>2016-05-26 07:45:49 +0200
commit72321eff607f6b8f187cbc5c34a08c6ce5f89a3c (patch)
tree7d755636ba942055f2a01b939cb5f2cbb3f4bd75 /src/grt/grt-avhpi.adb
parent5ce9f062ab79bccf02f0ee08f9456749371a8af3 (diff)
downloadghdl-72321eff607f6b8f187cbc5c34a08c6ce5f89a3c.tar.gz
ghdl-72321eff607f6b8f187cbc5c34a08c6ce5f89a3c.tar.bz2
ghdl-72321eff607f6b8f187cbc5c34a08c6ce5f89a3c.zip
avhpi: handle unbound component
for issue 71.
Diffstat (limited to 'src/grt/grt-avhpi.adb')
-rw-r--r--src/grt/grt-avhpi.adb9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/grt/grt-avhpi.adb b/src/grt/grt-avhpi.adb
index 75bc946a5..31a60e85a 100644
--- a/src/grt/grt-avhpi.adb
+++ b/src/grt/grt-avhpi.adb
@@ -834,7 +834,14 @@ package body Grt.Avhpi is
Res := (Kind => VhpiArchBodyK,
Ctxt => Null_Context);
Get_Instance_Context (Ref.Inst, Ref.Ctxt, Res.Ctxt);
- pragma Assert (Ref.Ctxt.Block.Kind = Ghdl_Rtik_Architecture);
+ if Res.Ctxt = Null_Context then
+ -- Component is not bound.
+ Res := Null_Handle;
+ else
+ pragma Assert
+ (Ref.Ctxt.Block.Kind = Ghdl_Rtik_Architecture);
+ null;
+ end if;
Error := AvhpiErrorOk;
return;
when others =>