aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/synth/elab-vhdl_context.adb8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/synth/elab-vhdl_context.adb b/src/synth/elab-vhdl_context.adb
index f46418a6d..95b9ddf29 100644
--- a/src/synth/elab-vhdl_context.adb
+++ b/src/synth/elab-vhdl_context.adb
@@ -513,7 +513,9 @@ package body Elab.Vhdl_Context is
function Get_Instance_By_Scope
(Syn_Inst: Synth_Instance_Acc; Scope: Sim_Info_Acc)
- return Synth_Instance_Acc is
+ return Synth_Instance_Acc
+ is
+ pragma Assert (Scope /= null);
begin
case Scope.Kind is
when Kind_Block
@@ -524,7 +526,9 @@ package body Elab.Vhdl_Context is
begin
Current := Syn_Inst;
while Current /= null loop
- if Current.Block_Scope = Scope then
+ if Current.Block_Scope = Scope
+ or else Current.Uninst_Scope = Scope
+ then
return Current;
end if;
Current := Current.Up_Block;