diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-oper.adb | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb index 79f5ea743..b66f7dda3 100644 --- a/src/synth/synth-oper.adb +++ b/src/synth/synth-oper.adb @@ -1646,21 +1646,25 @@ package body Synth.Oper is Synth_Subprogram_Association (Subprg_Inst, Syn_Inst, Inter_Chain, Assoc_Chain); - -- If all operands are static, handle the call differently. - Static := True; - Inter := Inter_Chain; - while Inter /= Null_Node loop - if not Is_Static (Get_Value (Subprg_Inst, Inter).Val) then - Static := False; - exit; - end if; - Inter := Get_Chain (Inter); - end loop; - - if Static then - Res := Synth_Static_Predefined_Function_Call (Subprg_Inst, Expr); + if Is_Error (Subprg_Inst) then + Res := No_Valtyp; else - Res := Synth_Dynamic_Predefined_Function_Call (Subprg_Inst, Expr); + -- If all operands are static, handle the call differently. + Static := True; + Inter := Inter_Chain; + while Inter /= Null_Node loop + if not Is_Static (Get_Value (Subprg_Inst, Inter).Val) then + Static := False; + exit; + end if; + Inter := Get_Chain (Inter); + end loop; + + if Static then + Res := Synth_Static_Predefined_Function_Call (Subprg_Inst, Expr); + else + Res := Synth_Dynamic_Predefined_Function_Call (Subprg_Inst, Expr); + end if; end if; Free_Instance (Subprg_Inst); |