From d4853c3c2fee6dfabb5ff2ed56690c94af6e1124 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 6 Aug 2020 19:53:58 +0200 Subject: synth-oper: propagate errors from unsupported operations. --- src/synth/synth-oper.adb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/synth') diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb index fde0f3123..c68f3e26c 100644 --- a/src/synth/synth-oper.adb +++ b/src/synth/synth-oper.adb @@ -1766,6 +1766,7 @@ package body Synth.Oper is M : Areapools.Mark_Type; Static : Boolean; Res : Valtyp; + Mt : Memtyp; begin Areapools.Mark (M, Instance_Pool.all); Subprg_Inst := Make_Instance (Syn_Inst, Imp); @@ -1788,8 +1789,12 @@ package body Synth.Oper is end loop; if Static then - Res := Create_Value_Memtyp - (Synth_Static_Predefined_Function_Call (Subprg_Inst, Expr)); + Mt := Synth_Static_Predefined_Function_Call (Subprg_Inst, Expr); + if Mt /= Null_Memtyp then + Res := Create_Value_Memtyp (Mt); + else + Res := No_Valtyp; + end if; else Res := Synth_Dynamic_Predefined_Function_Call (Subprg_Inst, Expr); end if; -- cgit v1.2.3