https://gcc.gnu.org/g:00e854417d841d015a491eb8e8c58e471a643e0e
commit r15-6201-g00e854417d841d015a491eb8e8c58e471a643e0e Author: Marc Poulhiès <poulh...@adacore.com> Date: Fri Nov 29 09:15:42 2024 +0100 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. Diff: --- gcc/ada/libgnat/a-tifiio.adb | 48 +++++++++++++++----------- gcc/ada/libgnat/a-tifiio__128.adb | 72 +++++++++++++++++++++++---------------- gcc/ada/libgnat/a-wtfiio.adb | 48 +++++++++++++++----------- gcc/ada/libgnat/a-wtfiio__128.adb | 72 +++++++++++++++++++++++---------------- gcc/ada/libgnat/a-ztfiio.adb | 48 +++++++++++++++----------- 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 7358d1233137..e4642185b003 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 59ce81cc706c..57ddfbcedcb5 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 195a695d14bf..c90760786ad1 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 5e0787966988..b3ecb46ac470 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 011dc903d7b1..1e765ef54741 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 b0556ba44a2c..40d791e8791a 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 :=