aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-stmts.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-07-27 06:54:43 +0200
committerTristan Gingold <tgingold@free.fr>2020-07-27 06:54:43 +0200
commit5a7f21194a2f7353a70570cbbab0f2cac06ed020 (patch)
treece65a55720aa5c7006873439f5dc08eaa0c02a47 /src/synth/synth-stmts.adb
parent21c48deed26771df4aef961e71acf31724e23310 (diff)
downloadghdl-5a7f21194a2f7353a70570cbbab0f2cac06ed020.tar.gz
ghdl-5a7f21194a2f7353a70570cbbab0f2cac06ed020.tar.bz2
ghdl-5a7f21194a2f7353a70570cbbab0f2cac06ed020.zip
synth-stmts: improve support of instantiated subprograms. Fix #1408
Diffstat (limited to 'src/synth/synth-stmts.adb')
-rw-r--r--src/synth/synth-stmts.adb6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb
index 8570225bd..1dc25d67c 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -2004,14 +2004,14 @@ package body Synth.Stmts is
function Synth_Static_Subprogram_Call (Syn_Inst : Synth_Instance_Acc;
Sub_Inst : Synth_Instance_Acc;
- Call : Node;
+ Call : Node;
+ Bod : Node;
Init : Association_Iterator_Init;
Infos : Target_Info_Array)
return Valtyp
is
Imp : constant Node := Get_Implementation (Call);
Is_Func : constant Boolean := Is_Function_Declaration (Imp);
- Bod : constant Node := Get_Subprogram_Body (Imp);
Res : Valtyp;
C : Seq_Context (Mode_Static);
begin
@@ -2094,7 +2094,7 @@ package body Synth.Stmts is
if Get_Instance_Const (Sub_Inst) then
Res := Synth_Static_Subprogram_Call
- (Syn_Inst, Sub_Inst, Call, Init, Infos);
+ (Syn_Inst, Sub_Inst, Call, Bod, Init, Infos);
else
Res := Synth_Dynamic_Subprogram_Call
(Syn_Inst, Sub_Inst, Call, Init, Infos);