diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-08-06 19:53:58 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-08-06 19:53:58 +0200 |
commit | d4853c3c2fee6dfabb5ff2ed56690c94af6e1124 (patch) | |
tree | c911445172d5d34f38d87a307db6242b0c02f873 /src | |
parent | 3055b10198071f23e3b6eb2b7c2a1587c9cb4ec8 (diff) | |
download | ghdl-d4853c3c2fee6dfabb5ff2ed56690c94af6e1124.tar.gz ghdl-d4853c3c2fee6dfabb5ff2ed56690c94af6e1124.tar.bz2 ghdl-d4853c3c2fee6dfabb5ff2ed56690c94af6e1124.zip |
synth-oper: propagate errors from unsupported operations.
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-oper.adb | 9 |
1 files changed, 7 insertions, 2 deletions
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; |