diff options
Diffstat (limited to 'simulate/elaboration.adb')
-rw-r--r-- | simulate/elaboration.adb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/simulate/elaboration.adb b/simulate/elaboration.adb index dc3a6250c..1b7b9cd3a 100644 --- a/simulate/elaboration.adb +++ b/simulate/elaboration.adb @@ -411,8 +411,15 @@ package body Elaboration is Inst := Create_Subprogram_Instance (Block, Bod); Protected_Table.Table (Res.Prot) := Inst; + + -- Temporary put the instancce on the stack in case of function calls + -- during the elaboration of the protected object. + Current_Process.Instance := Inst; + Elaborate_Declarative_Part (Inst, Get_Declaration_Chain (Bod)); + Current_Process.Instance := Block; + return Res; end Create_Protected_Object; |