aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/translate/trans-chap3.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vhdl/translate/trans-chap3.adb b/src/vhdl/translate/trans-chap3.adb
index 7556f2b23..66e897660 100644
--- a/src/vhdl/translate/trans-chap3.adb
+++ b/src/vhdl/translate/trans-chap3.adb
@@ -345,7 +345,9 @@ package body Trans.Chap3 is
Get_Low_High_Limit (Get_Range_Constraint (St), L, H);
Lv := Get_Value (L);
Hv := Get_Value (H);
- if Lv >= -(2 ** 31) and then Hv <= (2 ** 31 - 1) then
+ if Lv in -(2 ** 31) .. 2 ** 31 - 1
+ and then Hv in -(2 ** 31) .. 2 ** 31 - 1
+ then
return Precision_32;
else
if Translation.Flag_Only_32b then