From ec3a4334e1d6e2d0874da9ae84ed0aabf5ff7d5f Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 14 Mar 2020 09:27:03 +0100 Subject: synth-static_oper: handle minimum/maximum for integers. Fix #1158 --- src/synth/synth-static_oper.adb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/synth/synth-static_oper.adb b/src/synth/synth-static_oper.adb index 251e25693..270260b71 100644 --- a/src/synth/synth-static_oper.adb +++ b/src/synth/synth-static_oper.adb @@ -441,12 +441,14 @@ package body Synth.Static_Oper is when Iir_Predefined_Integer_Exp => return Create_Value_Discrete (Left.Scal ** Natural (Right.Scal), Res_Typ); - when Iir_Predefined_Physical_Minimum => + when Iir_Predefined_Physical_Minimum + | Iir_Predefined_Integer_Minimum => return Create_Value_Discrete (Int64'Min (Get_Static_Discrete (Left), Get_Static_Discrete (Right)), Res_Typ); - when Iir_Predefined_Physical_Maximum => + when Iir_Predefined_Physical_Maximum + | Iir_Predefined_Integer_Maximum => return Create_Value_Discrete (Int64'Max (Get_Static_Discrete (Left), Get_Static_Discrete (Right)), -- cgit v1.2.3