aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/synth/synth-oper.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb
index d98e925a4..07bcc7dbc 100644
--- a/src/synth/synth-oper.adb
+++ b/src/synth/synth-oper.adb
@@ -733,9 +733,9 @@ package body Synth.Oper is
return Synth_Int_Dyadic (Id_Add);
end if;
when Iir_Predefined_Integer_Minus =>
- if Is_Const (Left) and then Is_Const (Right) then
+ if Is_Const_Val (Left) and then Is_Const_Val (Right) then
return Create_Value_Discrete
- (Left.Scal - Right.Scal,
+ (Get_Const_Discrete (Left) - Get_Const_Discrete (Right),
Get_Value_Type (Syn_Inst, Get_Type (Expr)));
else
return Synth_Int_Dyadic (Id_Sub);