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. Tested on x86_64-pc-linux-gnu, committed on master. --- 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 7358d123313..e4642185b00 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 59ce81cc706..57ddfbcedcb 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 195a695d14b..c90760786ad 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 5e078796698..b3ecb46ac47 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 011dc903d7b..1e765ef5474 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 b0556ba44a2..40d791e8791 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 := -- 2.43.0