aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-oper.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-26 11:20:56 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-26 11:20:56 +0200
commit3576656ceb010ca9bd67ecb5c49c65ae6afcc099 (patch)
treee8e45334625952efadec5e29917ee6c1fef225fc /src/synth/synth-oper.adb
parentc95cfdf958d9708d3e99c33aa76ba9e80c7ab32a (diff)
downloadghdl-3576656ceb010ca9bd67ecb5c49c65ae6afcc099.tar.gz
ghdl-3576656ceb010ca9bd67ecb5c49c65ae6afcc099.tar.bz2
ghdl-3576656ceb010ca9bd67ecb5c49c65ae6afcc099.zip
synth-oper: propagate error.
Diffstat (limited to 'src/synth/synth-oper.adb')
-rw-r--r--src/synth/synth-oper.adb12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb
index 8b7b8a57c..11932a897 100644
--- a/src/synth/synth-oper.adb
+++ b/src/synth/synth-oper.adb
@@ -379,6 +379,7 @@ package body Synth.Oper is
Right_Typ : constant Type_Acc :=
Get_Subtype_Object (Syn_Inst, Right_Type);
Expr_Typ : constant Type_Acc := Get_Subtype_Object (Syn_Inst, Expr_Type);
+ Srec : Memtyp;
Left : Valtyp;
Right : Valtyp;
@@ -670,10 +671,13 @@ package body Synth.Oper is
Right := Synth_Subtype_Conversion (Right, Right_Typ, False, Expr);
if Is_Static_Val (Left.Val) and Is_Static_Val (Right.Val) then
- return Create_Value_Memtyp
- (Synth_Static_Dyadic_Predefined (Syn_Inst, Imp,
- Get_Value_Memtyp (Left),
- Get_Value_Memtyp (Right), Expr));
+ Srec := Synth_Static_Dyadic_Predefined
+ (Syn_Inst, Imp,
+ Get_Value_Memtyp (Left), Get_Value_Memtyp (Right), Expr);
+ if Srec = Null_Memtyp then
+ return No_Valtyp;
+ end if;
+ return Create_Value_Memtyp (Srec);
end if;
Strip_Const (Left);