diff options
author | Marc Poulhiès <poulhies@adacore.com> | 2024-11-29 09:15:42 +0100 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-12-13 09:36:02 +0100 |
commit | 00e854417d841d015a491eb8e8c58e471a643e0e (patch) | |
tree | b21aeaa178edc028ad544ca8aaf675bcd6267afa /gcc | |
parent | cee3cf1841d1ecc7e48cba32469d73af4bc62bb6 (diff) | |
download | gcc-00e854417d841d015a491eb8e8c58e471a643e0e.zip gcc-00e854417d841d015a491eb8e8c58e471a643e0e.tar.gz gcc-00e854417d841d015a491eb8e8c58e471a643e0e.tar.bz2 |
ada: Fix fixed point text-io when subtype has dynamic range
When the fixed point subtype has dynamic range, for example in the
context of a generic procedure Test where Fixed_Type is a type formal:
procedure Test (Low, High : Fixed_Type) is
type New_Subtype is new Fixed_Type range Low .. High;
package New_Io is new Text_IO.Fixed_IO (New_Subtype);
the compiler would complain with:
non-static universal integer value out of range
Have the check use the Base type for checking what integer type can be
used. If a given integer type can be used for a base type, it can
also be used for any of its subtypes.
gcc/ada/ChangeLog:
* libgnat/a-tifiio.adb (OK_Get_32): Use 'Base.
(OK_Put_32, OK_Get_64, OK_Put_64): Likewise.
* libgnat/a-tifiio__128.adb (OK_Get_32, OK_Put_32, OK_Get_64)
(OK_Put_64, OK_Get_128, OK_Put_128): Likewise.
* libgnat/a-wtfiio.adb (OK_Get_32): Likewise.
(OK_Put_32, OK_Get_64, OK_Put_64): Likewise.
* libgnat/a-wtfiio__128.adb (OK_Get_32, OK_Put_32, OK_Get_64)
(OK_Put_64, OK_Get_128, OK_Put_128): Likewise.
* libgnat/a-ztfiio.adb (OK_Get_32): Likewise.
(OK_Put_32, OK_Get_64, OK_Put_64): Likewise.
* libgnat/a-ztfiio__128.adb (OK_Get_32, OK_Put_32, OK_Get_64)
(OK_Put_64, OK_Get_128, OK_Put_128): Likewise.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/libgnat/a-tifiio.adb | 48 | ||||
-rw-r--r-- | gcc/ada/libgnat/a-tifiio__128.adb | 72 | ||||
-rw-r--r-- | gcc/ada/libgnat/a-wtfiio.adb | 48 | ||||
-rw-r--r-- | gcc/ada/libgnat/a-wtfiio__128.adb | 72 | ||||
-rw-r--r-- | gcc/ada/libgnat/a-ztfiio.adb | 48 | ||||
-rw-r--r-- | gcc/ada/libgnat/a-ztfiio__128.adb | 72 |
6 files changed, 210 insertions, 150 deletions
diff --git a/gcc/ada/libgnat/a-tifiio.adb b/gcc/ada/libgnat/a-tifiio.adb index 7358d12..e464218 100644 --- a/gcc/ada/libgnat/a-tifiio.adb +++ b/gcc/ada/libgnat/a-tifiio.adb @@ -191,51 +191,59 @@ package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is OK_Get_32 : constant Boolean := Num'Base'Object_Size <= 32 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**31) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**31) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**31) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**31) or else - (Num'Small_Numerator <= 2**27 - and then Num'Small_Denominator <= 2**27)); + (Num'Base'Small_Numerator <= 2**27 + and then Num'Base'Small_Denominator <= 2**27)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_32 : constant Boolean := Num'Base'Object_Size <= 32 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**31) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**31) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**31) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**31) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**27) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**27) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**25)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**25)); -- These conditions are derived from the prerequisites of System.Image_F OK_Get_64 : constant Boolean := Num'Base'Object_Size <= 64 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**63) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**63) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**63) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**63) or else - (Num'Small_Numerator <= 2**59 - and then Num'Small_Denominator <= 2**59)); + (Num'Base'Small_Numerator <= 2**59 + and then Num'Base'Small_Denominator <= 2**59)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_64 : constant Boolean := Num'Base'Object_Size <= 64 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**63) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**63) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**63) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**63) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**59) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**59) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**53)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**53)); -- These conditions are derived from the prerequisites of System.Image_F E : constant Natural := 63 - 32 * Boolean'Pos (OK_Put_32); diff --git a/gcc/ada/libgnat/a-tifiio__128.adb b/gcc/ada/libgnat/a-tifiio__128.adb index 59ce81c..57ddfbc 100644 --- a/gcc/ada/libgnat/a-tifiio__128.adb +++ b/gcc/ada/libgnat/a-tifiio__128.adb @@ -198,76 +198,88 @@ package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is OK_Get_32 : constant Boolean := Num'Base'Object_Size <= 32 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**31) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**31) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**31) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**31) or else - (Num'Small_Numerator <= 2**27 - and then Num'Small_Denominator <= 2**27)); + (Num'Base'Small_Numerator <= 2**27 + and then Num'Base'Small_Denominator <= 2**27)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_32 : constant Boolean := Num'Base'Object_Size <= 32 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**31) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**31) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**31) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**31) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**27) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**27) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**25)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**25)); -- These conditions are derived from the prerequisites of System.Image_F OK_Get_64 : constant Boolean := Num'Base'Object_Size <= 64 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**63) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**63) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**63) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**63) or else - (Num'Small_Numerator <= 2**59 - and then Num'Small_Denominator <= 2**59)); + (Num'Base'Small_Numerator <= 2**59 + and then Num'Base'Small_Denominator <= 2**59)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_64 : constant Boolean := Num'Base'Object_Size <= 64 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**63) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**63) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**63) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**63) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**59) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**59) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**53)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**53)); -- These conditions are derived from the prerequisites of System.Image_F OK_Get_128 : constant Boolean := Num'Base'Object_Size <= 128 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**127) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**127) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**127) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**127) or else - (Num'Small_Numerator <= 2**123 - and then Num'Small_Denominator <= 2**123)); + (Num'Base'Small_Numerator <= 2**123 + and then Num'Base'Small_Denominator <= 2**123)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_128 : constant Boolean := Num'Base'Object_Size <= 128 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**127) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**127) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**127) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**127) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**123) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**123) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**122)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**122)); -- These conditions are derived from the prerequisites of System.Image_F E : constant Natural := diff --git a/gcc/ada/libgnat/a-wtfiio.adb b/gcc/ada/libgnat/a-wtfiio.adb index 195a695..c907607 100644 --- a/gcc/ada/libgnat/a-wtfiio.adb +++ b/gcc/ada/libgnat/a-wtfiio.adb @@ -70,51 +70,59 @@ package body Ada.Wide_Text_IO.Fixed_IO is OK_Get_32 : constant Boolean := Num'Base'Object_Size <= 32 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**31) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**31) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**31) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**31) or else - (Num'Small_Numerator <= 2**27 - and then Num'Small_Denominator <= 2**27)); + (Num'Base'Small_Numerator <= 2**27 + and then Num'Base'Small_Denominator <= 2**27)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_32 : constant Boolean := Num'Base'Object_Size <= 32 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**31) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**31) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**31) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**31) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**27) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**27) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**25)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**25)); -- These conditions are derived from the prerequisites of System.Image_F OK_Get_64 : constant Boolean := Num'Base'Object_Size <= 64 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**63) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**63) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**63) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**63) or else - (Num'Small_Numerator <= 2**59 - and then Num'Small_Denominator <= 2**59)); + (Num'Base'Small_Numerator <= 2**59 + and then Num'Base'Small_Denominator <= 2**59)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_64 : constant Boolean := Num'Base'Object_Size <= 64 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**63) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**63) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**63) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**63) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**59) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**59) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**53)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**53)); -- These conditions are derived from the prerequisites of System.Image_F E : constant Natural := 63 - 32 * Boolean'Pos (OK_Put_32); diff --git a/gcc/ada/libgnat/a-wtfiio__128.adb b/gcc/ada/libgnat/a-wtfiio__128.adb index 5e07879..b3ecb46 100644 --- a/gcc/ada/libgnat/a-wtfiio__128.adb +++ b/gcc/ada/libgnat/a-wtfiio__128.adb @@ -77,76 +77,88 @@ package body Ada.Wide_Text_IO.Fixed_IO is OK_Get_32 : constant Boolean := Num'Base'Object_Size <= 32 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**31) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**31) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**31) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**31) or else - (Num'Small_Numerator <= 2**27 - and then Num'Small_Denominator <= 2**27)); + (Num'Base'Small_Numerator <= 2**27 + and then Num'Base'Small_Denominator <= 2**27)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_32 : constant Boolean := Num'Base'Object_Size <= 32 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**31) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**31) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**31) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**31) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**27) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**27) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**25)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**25)); -- These conditions are derived from the prerequisites of System.Image_F OK_Get_64 : constant Boolean := Num'Base'Object_Size <= 64 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**63) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**63) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**63) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**63) or else - (Num'Small_Numerator <= 2**59 - and then Num'Small_Denominator <= 2**59)); + (Num'Base'Small_Numerator <= 2**59 + and then Num'Base'Small_Denominator <= 2**59)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_64 : constant Boolean := Num'Base'Object_Size <= 64 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**63) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**63) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**63) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**63) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**59) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**59) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**53)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**53)); -- These conditions are derived from the prerequisites of System.Image_F OK_Get_128 : constant Boolean := Num'Base'Object_Size <= 128 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**127) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**127) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**127) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**127) or else - (Num'Small_Numerator <= 2**123 - and then Num'Small_Denominator <= 2**123)); + (Num'Base'Small_Numerator <= 2**123 + and then Num'Base'Small_Denominator <= 2**123)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_128 : constant Boolean := Num'Base'Object_Size <= 128 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**127) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**127) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**127) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**127) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**123) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**123) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**122)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**122)); -- These conditions are derived from the prerequisites of System.Image_F E : constant Natural := diff --git a/gcc/ada/libgnat/a-ztfiio.adb b/gcc/ada/libgnat/a-ztfiio.adb index 011dc90..1e765ef 100644 --- a/gcc/ada/libgnat/a-ztfiio.adb +++ b/gcc/ada/libgnat/a-ztfiio.adb @@ -70,51 +70,59 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is OK_Get_32 : constant Boolean := Num'Base'Object_Size <= 32 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**31) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**31) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**31) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**31) or else - (Num'Small_Numerator <= 2**27 - and then Num'Small_Denominator <= 2**27)); + (Num'Base'Small_Numerator <= 2**27 + and then Num'Base'Small_Denominator <= 2**27)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_32 : constant Boolean := Num'Base'Object_Size <= 32 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**31) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**31) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**31) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**31) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**27) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**27) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**25)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**25)); -- These conditions are derived from the prerequisites of System.Image_F OK_Get_64 : constant Boolean := Num'Base'Object_Size <= 64 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**63) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**63) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**63) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**63) or else - (Num'Small_Numerator <= 2**59 - and then Num'Small_Denominator <= 2**59)); + (Num'Base'Small_Numerator <= 2**59 + and then Num'Base'Small_Denominator <= 2**59)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_64 : constant Boolean := Num'Base'Object_Size <= 64 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**63) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**63) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**63) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**63) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**59) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**59) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**53)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**53)); -- These conditions are derived from the prerequisites of System.Image_F E : constant Natural := 63 - 32 * Boolean'Pos (OK_Put_32); diff --git a/gcc/ada/libgnat/a-ztfiio__128.adb b/gcc/ada/libgnat/a-ztfiio__128.adb index b0556ba..40d791e 100644 --- a/gcc/ada/libgnat/a-ztfiio__128.adb +++ b/gcc/ada/libgnat/a-ztfiio__128.adb @@ -78,76 +78,88 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is OK_Get_32 : constant Boolean := Num'Base'Object_Size <= 32 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**31) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**31) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**31) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**31) or else - (Num'Small_Numerator <= 2**27 - and then Num'Small_Denominator <= 2**27)); + (Num'Base'Small_Numerator <= 2**27 + and then Num'Base'Small_Denominator <= 2**27)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_32 : constant Boolean := Num'Base'Object_Size <= 32 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**31) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**31) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**31) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**31) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**27) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**27) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**25)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**25)); -- These conditions are derived from the prerequisites of System.Image_F OK_Get_64 : constant Boolean := Num'Base'Object_Size <= 64 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**63) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**63) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**63) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**63) or else - (Num'Small_Numerator <= 2**59 - and then Num'Small_Denominator <= 2**59)); + (Num'Base'Small_Numerator <= 2**59 + and then Num'Base'Small_Denominator <= 2**59)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_64 : constant Boolean := Num'Base'Object_Size <= 64 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**63) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**63) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**63) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**63) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**59) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**59) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**53)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**53)); -- These conditions are derived from the prerequisites of System.Image_F OK_Get_128 : constant Boolean := Num'Base'Object_Size <= 128 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**127) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**127) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**127) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**127) or else - (Num'Small_Numerator <= 2**123 - and then Num'Small_Denominator <= 2**123)); + (Num'Base'Small_Numerator <= 2**123 + and then Num'Base'Small_Denominator <= 2**123)); -- These conditions are derived from the prerequisites of System.Value_F OK_Put_128 : constant Boolean := Num'Base'Object_Size <= 128 and then - ((Num'Small_Numerator = 1 and then Num'Small_Denominator <= 2**127) + ((Num'Base'Small_Numerator = 1 + and then Num'Base'Small_Denominator <= 2**127) or else - (Num'Small_Denominator = 1 and then Num'Small_Numerator <= 2**127) + (Num'Base'Small_Denominator = 1 + and then Num'Base'Small_Numerator <= 2**127) or else - (Num'Small_Numerator < Num'Small_Denominator - and then Num'Small_Denominator <= 2**123) + (Num'Base'Small_Numerator < Num'Base'Small_Denominator + and then Num'Base'Small_Denominator <= 2**123) or else - (Num'Small_Denominator < Num'Small_Numerator - and then Num'Small_Numerator <= 2**122)); + (Num'Base'Small_Denominator < Num'Base'Small_Numerator + and then Num'Base'Small_Numerator <= 2**122)); -- These conditions are derived from the prerequisites of System.Image_F E : constant Natural := |