diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-02-11 15:02:44 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-02-11 15:02:44 -0800 |
commit | 9a510fb0970d3d9a4201bce8965cabe67850386b (patch) | |
tree | 43d7fd2bbfd7ad8c9625a718a5e8718889351994 /gcc/ada/libgnat | |
parent | a6d3012b274f38b20e2a57162106f625746af6c6 (diff) | |
parent | 8dc2499aa62f768c6395c9754b8cabc1ce25c494 (diff) | |
download | gcc-9a510fb0970d3d9a4201bce8965cabe67850386b.zip gcc-9a510fb0970d3d9a4201bce8965cabe67850386b.tar.gz gcc-9a510fb0970d3d9a4201bce8965cabe67850386b.tar.bz2 |
Merge from trunk revision 8dc2499aa62f768c6395c9754b8cabc1ce25c494
Diffstat (limited to 'gcc/ada/libgnat')
1484 files changed, 10198 insertions, 4193 deletions
diff --git a/gcc/ada/libgnat/a-assert.adb b/gcc/ada/libgnat/a-assert.adb index cbb97ac..6cce053 100644 --- a/gcc/ada/libgnat/a-assert.adb +++ b/gcc/ada/libgnat/a-assert.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-assert.ads b/gcc/ada/libgnat/a-assert.ads index 0a590d6..5bd8907 100644 --- a/gcc/ada/libgnat/a-assert.ads +++ b/gcc/ada/libgnat/a-assert.ads @@ -4,7 +4,7 @@ -- -- -- A D A . A S S E R T I O N S -- -- -- --- Copyright (C) 2015-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-2022, Free Software Foundation, Inc. -- -- -- -- S p e c -- -- -- @@ -39,8 +39,6 @@ pragma Assertion_Policy (Pre => Ignore); -pragma Compiler_Unit_Warning; - package Ada.Assertions with SPARK_Mode, Pure is diff --git a/gcc/ada/libgnat/a-btgbso.adb b/gcc/ada/libgnat/a-btgbso.adb index 0620a87..9df8743 100644 --- a/gcc/ada/libgnat/a-btgbso.adb +++ b/gcc/ada/libgnat/a-btgbso.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-btgbso.ads b/gcc/ada/libgnat/a-btgbso.ads index da47c49..259e0d4 100644 --- a/gcc/ada/libgnat/a-btgbso.ads +++ b/gcc/ada/libgnat/a-btgbso.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-calari.adb b/gcc/ada/libgnat/a-calari.adb index 31b9c74..bb31a6f 100644 --- a/gcc/ada/libgnat/a-calari.adb +++ b/gcc/ada/libgnat/a-calari.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2006-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-calari.ads b/gcc/ada/libgnat/a-calari.ads index ad1fff4..498684a 100644 --- a/gcc/ada/libgnat/a-calari.ads +++ b/gcc/ada/libgnat/a-calari.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- diff --git a/gcc/ada/libgnat/a-calcon.adb b/gcc/ada/libgnat/a-calcon.adb index 6a017a9..56b6b06 100644 --- a/gcc/ada/libgnat/a-calcon.adb +++ b/gcc/ada/libgnat/a-calcon.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-calcon.ads b/gcc/ada/libgnat/a-calcon.ads index 5a8a19a..11bb350 100644 --- a/gcc/ada/libgnat/a-calcon.ads +++ b/gcc/ada/libgnat/a-calcon.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-caldel.adb b/gcc/ada/libgnat/a-caldel.adb index 70877d0..3b91e31 100644 --- a/gcc/ada/libgnat/a-caldel.adb +++ b/gcc/ada/libgnat/a-caldel.adb @@ -7,7 +7,7 @@ -- B o d y -- -- -- -- Copyright (C) 1991-2017, Florida State University -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-caldel.ads b/gcc/ada/libgnat/a-caldel.ads index eba238e..a15d531 100644 --- a/gcc/ada/libgnat/a-caldel.ads +++ b/gcc/ada/libgnat/a-caldel.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-calend.adb b/gcc/ada/libgnat/a-calend.adb index b24e95d..5e738b6 100644 --- a/gcc/ada/libgnat/a-calend.adb +++ b/gcc/ada/libgnat/a-calend.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -206,14 +206,14 @@ is Cumulative_Days_Before_Month : constant array (Month_Number) of Natural := - (0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334); + [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; -- The following table contains the hard time values of all existing leap -- seconds. The values are produced by the utility program xleaps.adb. This -- must be updated when additional leap second times are defined. Leap_Second_Times : constant array (1 .. Leap_Seconds_Count) of Time_Rep := - (-5601484800000000000, + [-5601484800000000000, -5585587199000000000, -5554051198000000000, -5522515197000000000, @@ -239,7 +239,7 @@ is -4449513577000000000, -4339180776000000000, -4244572775000000000, - -4197052774000000000); + -4197052774000000000]; --------- -- "+" -- @@ -490,7 +490,6 @@ is Y : Year_Number; M : Month_Number; S : Day_Duration; - pragma Unreferenced (Y, M, S); begin Split (Date, Y, M, D, S); return D; @@ -537,7 +536,6 @@ is M : Month_Number; D : Day_Number; S : Day_Duration; - pragma Unreferenced (Y, D, S); begin Split (Date, Y, M, D, S); return M; @@ -552,7 +550,6 @@ is M : Month_Number; D : Day_Number; S : Day_Duration; - pragma Unreferenced (Y, M, D); begin Split (Date, Y, M, D, S); return S; @@ -575,8 +572,6 @@ is Ss : Duration; Le : Boolean; - pragma Unreferenced (H, M, Se, Ss, Le); - begin -- Even though the input time zone is UTC (0), the flag Use_TZ will -- ensure that Split picks up the local time zone. @@ -769,7 +764,6 @@ is M : Month_Number; D : Day_Number; S : Day_Duration; - pragma Unreferenced (M, D, S); begin Split (Date, Y, M, D, S); return Y; diff --git a/gcc/ada/libgnat/a-calend.ads b/gcc/ada/libgnat/a-calend.ads index cd3fed5..a01bbd6 100644 --- a/gcc/ada/libgnat/a-calend.ads +++ b/gcc/ada/libgnat/a-calend.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -242,7 +242,7 @@ private -- epoch) expressed in nanoseconds. Note that year 2100 is non-leap. Days_In_Month : constant array (Month_Number) of Day_Number := - (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); + [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -- Days in month for non-leap year, leap year case is adjusted in code Invalid_Time_Zone_Offset : Long_Integer; diff --git a/gcc/ada/libgnat/a-calfor.adb b/gcc/ada/libgnat/a-calfor.adb index cb6c179..4b122ae 100644 --- a/gcc/ada/libgnat/a-calfor.adb +++ b/gcc/ada/libgnat/a-calfor.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2006-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,6 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Calendar; use Ada.Calendar; with Ada.Calendar.Time_Zones; use Ada.Calendar.Time_Zones; package body Ada.Calendar.Formatting is @@ -100,8 +99,6 @@ package body Ada.Calendar.Formatting is Ss : Second_Duration; Le : Boolean; - pragma Unreferenced (Y, Mo, H, Mi); - begin Split (Date, Y, Mo, D, H, Mi, Se, Ss, Le, Time_Zone); return D; @@ -133,8 +130,6 @@ package body Ada.Calendar.Formatting is Ss : Second_Duration; Le : Boolean; - pragma Unreferenced (Y, Mo, D, Mi); - begin Split (Date, Y, Mo, D, H, Mi, Se, Ss, Le, Time_Zone); return H; @@ -291,8 +286,6 @@ package body Ada.Calendar.Formatting is Ss : Second_Duration; Le : Boolean; - pragma Unreferenced (Y, Mo, D, H); - begin Split (Date, Y, Mo, D, H, Mi, Se, Ss, Le, Time_Zone); return Mi; @@ -315,8 +308,6 @@ package body Ada.Calendar.Formatting is Ss : Second_Duration; Le : Boolean; - pragma Unreferenced (Y, D, H, Mi); - begin Split (Date, Y, Mo, D, H, Mi, Se, Ss, Le, Time_Zone); return Mo; @@ -336,8 +327,6 @@ package body Ada.Calendar.Formatting is Ss : Second_Duration; Le : Boolean; - pragma Unreferenced (Y, Mo, D, H, Mi); - begin Split (Date, Y, Mo, D, H, Mi, Se, Ss, Le); return Se; @@ -584,8 +573,6 @@ package body Ada.Calendar.Formatting is Ss : Second_Duration; Le : Boolean; - pragma Unreferenced (Y, Mo, D, H, Mi); - begin Split (Date, Y, Mo, D, H, Mi, Se, Ss, Le); return Ss; @@ -898,8 +885,6 @@ package body Ada.Calendar.Formatting is Ss : Second_Duration; Le : Boolean; - pragma Unreferenced (Mo, D, H, Mi); - begin Split (Date, Y, Mo, D, H, Mi, Se, Ss, Le, Time_Zone); return Y; diff --git a/gcc/ada/libgnat/a-calfor.ads b/gcc/ada/libgnat/a-calfor.ads index 2bc030b..b3f98d6 100644 --- a/gcc/ada/libgnat/a-calfor.ads +++ b/gcc/ada/libgnat/a-calfor.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- diff --git a/gcc/ada/libgnat/a-catizo.adb b/gcc/ada/libgnat/a-catizo.adb index ec70122..5bd04be 100644 --- a/gcc/ada/libgnat/a-catizo.adb +++ b/gcc/ada/libgnat/a-catizo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cbdlli.adb b/gcc/ada/libgnat/a-cbdlli.adb index 3752ca9..540fc93 100644 --- a/gcc/ada/libgnat/a-cbdlli.adb +++ b/gcc/ada/libgnat/a-cbdlli.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -995,7 +995,6 @@ is Count : Count_Type := 1) is Position : Cursor; - pragma Unreferenced (Position); begin Insert (Container, Before, New_Item, Position, Count); end Insert; diff --git a/gcc/ada/libgnat/a-cbdlli.ads b/gcc/ada/libgnat/a-cbdlli.ads index f4086ea..10be7ab 100644 --- a/gcc/ada/libgnat/a-cbdlli.ads +++ b/gcc/ada/libgnat/a-cbdlli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -56,8 +56,8 @@ is Variable_Indexing => Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type, - Aggregate => (Empty => Empty, - Add_Unnamed => Append), + Aggregate => (Empty => Empty, + Add_Unnamed => Append), Preelaborable_Initialization => Element_Type'Preelaborable_Initialization; diff --git a/gcc/ada/libgnat/a-cbhama.adb b/gcc/ada/libgnat/a-cbhama.adb index 26c01f5..59c4c7e 100644 --- a/gcc/ada/libgnat/a-cbhama.adb +++ b/gcc/ada/libgnat/a-cbhama.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -697,8 +697,6 @@ is New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin diff --git a/gcc/ada/libgnat/a-cbhama.ads b/gcc/ada/libgnat/a-cbhama.ads index cdd4135..6891a2f 100644 --- a/gcc/ada/libgnat/a-cbhama.ads +++ b/gcc/ada/libgnat/a-cbhama.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cbhase.adb b/gcc/ada/libgnat/a-cbhase.adb index d6ab353..3c1c7b4 100644 --- a/gcc/ada/libgnat/a-cbhase.adb +++ b/gcc/ada/libgnat/a-cbhase.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -736,8 +736,6 @@ is New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin @@ -1629,26 +1627,14 @@ is (Container : aliased Set; Key : Key_Type) return Constant_Reference_Type is - Node : constant Count_Type := - Key_Keys.Find (Container'Unrestricted_Access.all, Key); + Position : constant Cursor := Find (Container, Key); begin - if Checks and then Node = 0 then + if Checks and then Position = No_Element then raise Constraint_Error with "key not in set"; end if; - declare - N : Node_Type renames Container.Nodes (Node); - TC : constant Tamper_Counts_Access := - Container.TC'Unrestricted_Access; - begin - return R : constant Constant_Reference_Type := - (Element => N.Element'Unchecked_Access, - Control => (Controlled with TC)) - do - Busy (TC.all); - end return; - end; + return Constant_Reference (Container, Position); end Constant_Reference; -------------- @@ -1836,29 +1822,14 @@ is (Container : aliased in out Set; Key : Key_Type) return Reference_Type is - Node : constant Count_Type := Key_Keys.Find (Container, Key); + Position : constant Cursor := Find (Container, Key); begin - if Checks and then Node = 0 then + if Checks and then Position = No_Element then raise Constraint_Error with "key not in set"; end if; - declare - P : constant Cursor := Find (Container, Key); - begin - return R : constant Reference_Type := - (Element => Container.Nodes (Node).Element'Unrestricted_Access, - Control => - (Controlled with - Container.TC'Unrestricted_Access, - Container'Unrestricted_Access, - Index => Key_Keys.Index (Container, Key), - Old_Pos => P, - Old_Hash => Hash (Key))) - do - Busy (Container.TC); - end return; - end; + return Reference_Preserving_Key (Container, Position); end Reference_Preserving_Key; ------------- diff --git a/gcc/ada/libgnat/a-cbhase.ads b/gcc/ada/libgnat/a-cbhase.ads index 78b31cf..c30a364 100644 --- a/gcc/ada/libgnat/a-cbhase.ads +++ b/gcc/ada/libgnat/a-cbhase.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cbmutr.adb b/gcc/ada/libgnat/a-cbmutr.adb index e80eb5c..405cbc1 100644 --- a/gcc/ada/libgnat/a-cbmutr.adb +++ b/gcc/ada/libgnat/a-cbmutr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1490,7 +1490,6 @@ is Count : Count_Type := 1) is Position : Cursor; - pragma Unreferenced (Position); begin Insert_Child (Container, Parent, Before, New_Item, Position, Count); diff --git a/gcc/ada/libgnat/a-cbmutr.ads b/gcc/ada/libgnat/a-cbmutr.ads index 3712039..2448eac 100644 --- a/gcc/ada/libgnat/a-cbmutr.ads +++ b/gcc/ada/libgnat/a-cbmutr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2014-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cborma.adb b/gcc/ada/libgnat/a-cborma.adb index f26a1e3..7ebc816 100644 --- a/gcc/ada/libgnat/a-cborma.adb +++ b/gcc/ada/libgnat/a-cborma.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -824,8 +824,6 @@ is New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin diff --git a/gcc/ada/libgnat/a-cborma.ads b/gcc/ada/libgnat/a-cborma.ads index 9d40a51..5b0ed73 100644 --- a/gcc/ada/libgnat/a-cborma.ads +++ b/gcc/ada/libgnat/a-cborma.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cborse.adb b/gcc/ada/libgnat/a-cborse.adb index 5c9a86e..55eca40 100644 --- a/gcc/ada/libgnat/a-cborse.adb +++ b/gcc/ada/libgnat/a-cborse.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -739,25 +739,14 @@ is (Container : aliased Set; Key : Key_Type) return Constant_Reference_Type is - Node : constant Count_Type := Key_Keys.Find (Container, Key); + Position : constant Cursor := Find (Container, Key); begin - if Checks and then Node = 0 then + if Checks and then Position = No_Element then raise Constraint_Error with "key not in set"; end if; - declare - N : Node_Type renames Container.Nodes (Node); - TC : constant Tamper_Counts_Access := - Container.TC'Unrestricted_Access; - begin - return R : constant Constant_Reference_Type := - (Element => N.Element'Unchecked_Access, - Control => (Controlled with TC)) - do - Busy (TC.all); - end return; - end; + return Constant_Reference (Container, Position); end Constant_Reference; -------------- @@ -960,28 +949,14 @@ is (Container : aliased in out Set; Key : Key_Type) return Reference_Type is - Node : constant Count_Type := Key_Keys.Find (Container, Key); + Position : constant Cursor := Find (Container, Key); begin - if Checks and then Node = 0 then + if Checks and then Position = No_Element then raise Constraint_Error with "key not in set"; end if; - declare - N : Node_Type renames Container.Nodes (Node); - begin - return R : constant Reference_Type := - (Element => N.Element'Unchecked_Access, - Control => - (Controlled with - Container.TC'Unrestricted_Access, - Container => Container'Unchecked_Access, - Pos => Find (Container, Key), - Old_Key => new Key_Type'(Key))) - do - Busy (Container.TC); - end return; - end; + return Reference_Preserving_Key (Container, Position); end Reference_Preserving_Key; ------------- @@ -1124,8 +1099,6 @@ is New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin @@ -1205,7 +1178,6 @@ is Dst_Node : out Count_Type) is Success : Boolean; - pragma Unreferenced (Success); procedure Set_Element (Node : in out Node_Type); pragma Inline (Set_Element); @@ -2012,6 +1984,7 @@ is function To_Set (New_Item : Element_Type) return Set is Node : Count_Type; Inserted : Boolean; + begin return S : Set (1) do Insert_Sans_Hint (S, New_Item, Node, Inserted); diff --git a/gcc/ada/libgnat/a-cborse.ads b/gcc/ada/libgnat/a-cborse.ads index 31b8b91..ceaf885 100644 --- a/gcc/ada/libgnat/a-cborse.ads +++ b/gcc/ada/libgnat/a-cborse.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cbprqu.adb b/gcc/ada/libgnat/a-cbprqu.adb index 1d04579..08f03a9 100644 --- a/gcc/ada/libgnat/a-cbprqu.adb +++ b/gcc/ada/libgnat/a-cbprqu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cbprqu.ads b/gcc/ada/libgnat/a-cbprqu.ads index ec08aea..d50ac7f 100644 --- a/gcc/ada/libgnat/a-cbprqu.ads +++ b/gcc/ada/libgnat/a-cbprqu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cbsyqu.adb b/gcc/ada/libgnat/a-cbsyqu.adb index e4e6725..095b4b3 100644 --- a/gcc/ada/libgnat/a-cbsyqu.adb +++ b/gcc/ada/libgnat/a-cbsyqu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cbsyqu.ads b/gcc/ada/libgnat/a-cbsyqu.ads index 8c8d5a6..ab1a11e 100644 --- a/gcc/ada/libgnat/a-cbsyqu.ads +++ b/gcc/ada/libgnat/a-cbsyqu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cdlili.adb b/gcc/ada/libgnat/a-cdlili.adb index 1d48ed9..5828607 100644 --- a/gcc/ada/libgnat/a-cdlili.adb +++ b/gcc/ada/libgnat/a-cdlili.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -810,7 +810,6 @@ is Count : Count_Type := 1) is Position : Cursor; - pragma Unreferenced (Position); begin Insert (Container, Before, New_Item, Position, Count); end Insert; diff --git a/gcc/ada/libgnat/a-cdlili.ads b/gcc/ada/libgnat/a-cdlili.ads index 66368b5..abfd011 100644 --- a/gcc/ada/libgnat/a-cdlili.ads +++ b/gcc/ada/libgnat/a-cdlili.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cfdlli.adb b/gcc/ada/libgnat/a-cfdlli.adb index c9897c7..14f0304 100644 --- a/gcc/ada/libgnat/a-cfdlli.adb +++ b/gcc/ada/libgnat/a-cfdlli.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cfdlli.ads b/gcc/ada/libgnat/a-cfdlli.ads index ded496b..521f4bf 100644 --- a/gcc/ada/libgnat/a-cfdlli.ads +++ b/gcc/ada/libgnat/a-cfdlli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cfhama.adb b/gcc/ada/libgnat/a-cfhama.adb index 179b400..48950de 100644 --- a/gcc/ada/libgnat/a-cfhama.adb +++ b/gcc/ada/libgnat/a-cfhama.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -670,8 +670,6 @@ is New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin diff --git a/gcc/ada/libgnat/a-cfhama.ads b/gcc/ada/libgnat/a-cfhama.ads index 59e295d..37024f0 100644 --- a/gcc/ada/libgnat/a-cfhama.ads +++ b/gcc/ada/libgnat/a-cfhama.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cfhase.adb b/gcc/ada/libgnat/a-cfhase.adb index cdb8a98..6e289e4 100644 --- a/gcc/ada/libgnat/a-cfhase.adb +++ b/gcc/ada/libgnat/a-cfhase.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -949,7 +949,7 @@ is (Vet (Container, Position), "bad cursor in function Key"); declare - N : Node_Type renames Container.Content.Nodes (Position.Node); + N : Node_Type renames Container.Content.Nodes (Position.Node); begin return Key (N.Element); end; diff --git a/gcc/ada/libgnat/a-cfhase.ads b/gcc/ada/libgnat/a-cfhase.ads index 23b3b6d..425824d 100644 --- a/gcc/ada/libgnat/a-cfhase.ads +++ b/gcc/ada/libgnat/a-cfhase.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cfinve.adb b/gcc/ada/libgnat/a-cfinve.adb index d0c7e82..17b57cb 100644 --- a/gcc/ada/libgnat/a-cfinve.adb +++ b/gcc/ada/libgnat/a-cfinve.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -871,7 +871,7 @@ is J := To_Array_Index (Before); - Elems (Container) (J .. J - 1 + Count) := (others => H (New_Item)); + Elems (Container) (J .. J - 1 + Count) := [others => H (New_Item)]; end Insert; procedure Insert @@ -1445,7 +1445,7 @@ is (Capacity => Length, Last => Last, Elements_Ptr => <>, - Elements => (others => H (New_Item))); + Elements => [others => H (New_Item)]); end; end To_Vector; diff --git a/gcc/ada/libgnat/a-cfinve.ads b/gcc/ada/libgnat/a-cfinve.ads index bd0c334..ec6af99 100644 --- a/gcc/ada/libgnat/a-cfinve.ads +++ b/gcc/ada/libgnat/a-cfinve.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2014-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cforma.adb b/gcc/ada/libgnat/a-cforma.adb index 45f9be7..79f25f8 100644 --- a/gcc/ada/libgnat/a-cforma.adb +++ b/gcc/ada/libgnat/a-cforma.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cforma.ads b/gcc/ada/libgnat/a-cforma.ads index 048e7cb..1e3c57b 100644 --- a/gcc/ada/libgnat/a-cforma.ads +++ b/gcc/ada/libgnat/a-cforma.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cforse.adb b/gcc/ada/libgnat/a-cforse.adb index 7c45e4f..3b64511 100644 --- a/gcc/ada/libgnat/a-cforse.adb +++ b/gcc/ada/libgnat/a-cforse.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -429,7 +429,7 @@ is ------------------ procedure Delete_First (Container : in out Set) is - X : constant Count_Type := Container.Content.First; + X : constant Count_Type := Container.Content.First; begin if X /= 0 then Tree_Operations.Delete_Node_Sans_Free (Container.Content, X); @@ -442,7 +442,7 @@ is ----------------- procedure Delete_Last (Container : in out Set) is - X : constant Count_Type := Container.Content.Last; + X : constant Count_Type := Container.Content.Last; begin if X /= 0 then Tree_Operations.Delete_Node_Sans_Free (Container.Content, X); @@ -1420,7 +1420,6 @@ is Dst_Node : out Count_Type) is Success : Boolean; - pragma Unreferenced (Success); procedure Set_Element (Node : in out Node_Type); @@ -1742,7 +1741,7 @@ is -------------- function New_Node return Count_Type is - N : Node_Type renames NN (Node); + N : Node_Type renames NN (Node); begin N.Element := Item; N.Color := Red; @@ -1900,6 +1899,7 @@ is function To_Set (New_Item : Element_Type) return Set is Node : Count_Type; Inserted : Boolean; + begin return S : Set (Capacity => 1) do Insert_Sans_Hint (S.Content, New_Item, Node, Inserted); diff --git a/gcc/ada/libgnat/a-cforse.ads b/gcc/ada/libgnat/a-cforse.ads index db7c586..a736b48 100644 --- a/gcc/ada/libgnat/a-cforse.ads +++ b/gcc/ada/libgnat/a-cforse.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cgaaso.adb b/gcc/ada/libgnat/a-cgaaso.adb index ec4952c..39cfefb 100644 --- a/gcc/ada/libgnat/a-cgaaso.adb +++ b/gcc/ada/libgnat/a-cgaaso.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cgaaso.ads b/gcc/ada/libgnat/a-cgaaso.ads index cfa858a..30f92b8 100644 --- a/gcc/ada/libgnat/a-cgaaso.ads +++ b/gcc/ada/libgnat/a-cgaaso.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cgarso.adb b/gcc/ada/libgnat/a-cgarso.adb index 18a20e7..8ba2536 100644 --- a/gcc/ada/libgnat/a-cgarso.adb +++ b/gcc/ada/libgnat/a-cgarso.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cgcaso.adb b/gcc/ada/libgnat/a-cgcaso.adb index ca4f14a..e0d066d 100644 --- a/gcc/ada/libgnat/a-cgcaso.adb +++ b/gcc/ada/libgnat/a-cgcaso.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-chacon.adb b/gcc/ada/libgnat/a-chacon.adb index dbb1b0e..7cc0399 100644 --- a/gcc/ada/libgnat/a-chacon.adb +++ b/gcc/ada/libgnat/a-chacon.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-chacon.ads b/gcc/ada/libgnat/a-chacon.ads index 6f611f5..79df94d 100644 --- a/gcc/ada/libgnat/a-chacon.ads +++ b/gcc/ada/libgnat/a-chacon.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-chahan.adb b/gcc/ada/libgnat/a-chahan.adb index 411d485..97fc313 100644 --- a/gcc/ada/libgnat/a-chahan.adb +++ b/gcc/ada/libgnat/a-chahan.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -64,7 +64,7 @@ is Graphic : constant Character_Flags := Alphanum or Special; Char_Map : constant array (Character) of Character_Flags := - ( + [ NUL => Control, SOH => Control, STX => Control, @@ -282,7 +282,7 @@ is LC_Y_Acute => Lower, LC_Icelandic_Thorn => Lower + Basic, LC_Y_Diaeresis => Lower - ); + ]; --------------------- -- Is_Alphanumeric -- diff --git a/gcc/ada/libgnat/a-chahan.ads b/gcc/ada/libgnat/a-chahan.ads index 093237d..e98cda3 100644 --- a/gcc/ada/libgnat/a-chahan.ads +++ b/gcc/ada/libgnat/a-chahan.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-chlat1.ads b/gcc/ada/libgnat/a-chlat1.ads index 2e20d92..f0a9006 100644 --- a/gcc/ada/libgnat/a-chlat1.ads +++ b/gcc/ada/libgnat/a-chlat1.ads @@ -13,8 +13,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package Ada.Characters.Latin_1 is pragma Pure; diff --git a/gcc/ada/libgnat/a-chlat9.ads b/gcc/ada/libgnat/a-chlat9.ads index 53ce457..ede5793 100644 --- a/gcc/ada/libgnat/a-chlat9.ads +++ b/gcc/ada/libgnat/a-chlat9.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-chtgbk.adb b/gcc/ada/libgnat/a-chtgbk.adb index 148b92d..bbc1969 100644 --- a/gcc/ada/libgnat/a-chtgbk.adb +++ b/gcc/ada/libgnat/a-chtgbk.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-chtgbk.ads b/gcc/ada/libgnat/a-chtgbk.ads index edeca72..55a4a6b 100644 --- a/gcc/ada/libgnat/a-chtgbk.ads +++ b/gcc/ada/libgnat/a-chtgbk.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-chtgbo.adb b/gcc/ada/libgnat/a-chtgbo.adb index 678cdc0..2ffc923 100644 --- a/gcc/ada/libgnat/a-chtgbo.adb +++ b/gcc/ada/libgnat/a-chtgbo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -60,7 +60,7 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Operations is -- HT.Busy := 0; -- HT.Lock := 0; HT.Free := -1; - HT.Buckets := (others => 0); -- optimize this somehow ??? + HT.Buckets := [others => 0]; -- optimize this somehow ??? end Clear; -------------------------- @@ -439,7 +439,7 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Operations is (Stream : not null access Root_Stream_Type'Class; HT : out Hash_Table_Type'Class) is - N : Count_Type'Base; + N : Count_Type'Base; begin Clear (HT); diff --git a/gcc/ada/libgnat/a-chtgbo.ads b/gcc/ada/libgnat/a-chtgbo.ads index 1779c79..cd27739 100644 --- a/gcc/ada/libgnat/a-chtgbo.ads +++ b/gcc/ada/libgnat/a-chtgbo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-chtgke.adb b/gcc/ada/libgnat/a-chtgke.adb index 76c7e1b..bb9dd428 100644 --- a/gcc/ada/libgnat/a-chtgke.adb +++ b/gcc/ada/libgnat/a-chtgke.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-chtgke.ads b/gcc/ada/libgnat/a-chtgke.ads index 1445369..940e534 100644 --- a/gcc/ada/libgnat/a-chtgke.ads +++ b/gcc/ada/libgnat/a-chtgke.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-chtgop.adb b/gcc/ada/libgnat/a-chtgop.adb index 7250488..658b24b 100644 --- a/gcc/ada/libgnat/a-chtgop.adb +++ b/gcc/ada/libgnat/a-chtgop.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-chtgop.ads b/gcc/ada/libgnat/a-chtgop.ads index a2081dd..b921495 100644 --- a/gcc/ada/libgnat/a-chtgop.ads +++ b/gcc/ada/libgnat/a-chtgop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-chzla1.ads b/gcc/ada/libgnat/a-chzla1.ads index 3d27eba..67d7269 100644 --- a/gcc/ada/libgnat/a-chzla1.ads +++ b/gcc/ada/libgnat/a-chzla1.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-chzla9.ads b/gcc/ada/libgnat/a-chzla9.ads index 0359309..a1bb09f 100644 --- a/gcc/ada/libgnat/a-chzla9.ads +++ b/gcc/ada/libgnat/a-chzla9.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cidlli.adb b/gcc/ada/libgnat/a-cidlli.adb index 1cf9401..9a11f4c 100644 --- a/gcc/ada/libgnat/a-cidlli.adb +++ b/gcc/ada/libgnat/a-cidlli.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -902,7 +902,6 @@ is Count : Count_Type := 1) is Position : Cursor; - pragma Unreferenced (Position); begin Insert (Container, Before, New_Item, Position, Count); end Insert; diff --git a/gcc/ada/libgnat/a-cidlli.ads b/gcc/ada/libgnat/a-cidlli.ads index c8794a3..35ca010 100644 --- a/gcc/ada/libgnat/a-cidlli.ads +++ b/gcc/ada/libgnat/a-cidlli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cihama.adb b/gcc/ada/libgnat/a-cihama.adb index 2fbf65e..4734e64 100644 --- a/gcc/ada/libgnat/a-cihama.adb +++ b/gcc/ada/libgnat/a-cihama.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -758,8 +758,6 @@ is New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin diff --git a/gcc/ada/libgnat/a-cihama.ads b/gcc/ada/libgnat/a-cihama.ads index 056f338..8a5f180 100644 --- a/gcc/ada/libgnat/a-cihama.ads +++ b/gcc/ada/libgnat/a-cihama.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cihase.adb b/gcc/ada/libgnat/a-cihase.adb index 9fd4d98..cb55bbb 100644 --- a/gcc/ada/libgnat/a-cihase.adb +++ b/gcc/ada/libgnat/a-cihase.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -854,8 +854,6 @@ is New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin @@ -1728,7 +1726,6 @@ is HT : Hash_Table_Type; Node : Node_Access; Inserted : Boolean; - pragma Unreferenced (Node, Inserted); begin Insert (HT, New_Item, Node, Inserted); return Set'(Controlled with HT); @@ -1776,7 +1773,6 @@ is Tgt_Node : Node_Access; Success : Boolean; - pragma Unreferenced (Tgt_Node, Success); -- Start of processing for Process @@ -2063,29 +2059,14 @@ is (Container : aliased Set; Key : Key_Type) return Constant_Reference_Type is - HT : Hash_Table_Type renames Container'Unrestricted_Access.HT; - Node : constant Node_Access := Key_Keys.Find (HT, Key); + Position : constant Cursor := Find (Container, Key); begin - if Checks and then Node = null then + if Checks and then Position = No_Element then raise Constraint_Error with "Key not in set"; end if; - if Checks and then Node.Element = null then - raise Program_Error with "Node has no element"; - end if; - - declare - TC : constant Tamper_Counts_Access := - HT.TC'Unrestricted_Access; - begin - return R : constant Constant_Reference_Type := - (Element => Node.Element.all'Access, - Control => (Controlled with TC)) - do - Busy (TC.all); - end return; - end; + return Constant_Reference (Container, Position); end Constant_Reference; -------------- @@ -2280,34 +2261,14 @@ is (Container : aliased in out Set; Key : Key_Type) return Reference_Type is - Node : constant Node_Access := Key_Keys.Find (Container.HT, Key); + Position : constant Cursor := Find (Container, Key); begin - if Checks and then Node = null then + if Checks and then Position = No_Element then raise Constraint_Error with "Key not in set"; end if; - if Checks and then Node.Element = null then - raise Program_Error with "Node has no element"; - end if; - - declare - HT : Hash_Table_Type renames Container.HT; - P : constant Cursor := Find (Container, Key); - begin - return R : constant Reference_Type := - (Element => Node.Element.all'Access, - Control => - (Controlled with - HT.TC'Unrestricted_Access, - Container => Container'Unchecked_Access, - Index => HT_Ops.Index (HT, P.Node), - Old_Pos => P, - Old_Hash => Hash (Key))) - do - Busy (HT.TC); - end return; - end; + return Reference_Preserving_Key (Container, Position); end Reference_Preserving_Key; ------------- diff --git a/gcc/ada/libgnat/a-cihase.ads b/gcc/ada/libgnat/a-cihase.ads index a73e898..cff713d 100644 --- a/gcc/ada/libgnat/a-cihase.ads +++ b/gcc/ada/libgnat/a-cihase.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cimutr.adb b/gcc/ada/libgnat/a-cimutr.adb index aa7efac..5a066fb 100644 --- a/gcc/ada/libgnat/a-cimutr.adb +++ b/gcc/ada/libgnat/a-cimutr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1175,7 +1175,6 @@ is Count : Count_Type := 1) is Position : Cursor; - pragma Unreferenced (Position); begin Insert_Child (Container, Parent, Before, New_Item, Position, Count); diff --git a/gcc/ada/libgnat/a-cimutr.ads b/gcc/ada/libgnat/a-cimutr.ads index 014d1fe..2bb1208 100644 --- a/gcc/ada/libgnat/a-cimutr.ads +++ b/gcc/ada/libgnat/a-cimutr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-ciorma.adb b/gcc/ada/libgnat/a-ciorma.adb index a569156..a39a2f1 100644 --- a/gcc/ada/libgnat/a-ciorma.adb +++ b/gcc/ada/libgnat/a-ciorma.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -866,8 +866,6 @@ is New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin diff --git a/gcc/ada/libgnat/a-ciorma.ads b/gcc/ada/libgnat/a-ciorma.ads index 157714d..e4fd90d 100644 --- a/gcc/ada/libgnat/a-ciorma.ads +++ b/gcc/ada/libgnat/a-ciorma.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-ciormu.adb b/gcc/ada/libgnat/a-ciormu.adb index f1b9021..2ff512b 100644 --- a/gcc/ada/libgnat/a-ciormu.adb +++ b/gcc/ada/libgnat/a-ciormu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1120,7 +1120,6 @@ is procedure Insert (Container : in out Set; New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); begin Insert (Container, New_Item, Position); end Insert; @@ -1975,7 +1974,6 @@ is function To_Set (New_Item : Element_Type) return Set is Tree : Tree_Type; Node : Node_Access; - pragma Unreferenced (Node); begin Insert_Sans_Hint (Tree, New_Item, Node); return Set'(Controlled with Tree); diff --git a/gcc/ada/libgnat/a-ciormu.ads b/gcc/ada/libgnat/a-ciormu.ads index cf8ea0d..9a5dd98 100644 --- a/gcc/ada/libgnat/a-ciormu.ads +++ b/gcc/ada/libgnat/a-ciormu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ciorse.adb b/gcc/ada/libgnat/a-ciorse.adb index 7e63f15..b23b252 100644 --- a/gcc/ada/libgnat/a-ciorse.adb +++ b/gcc/ada/libgnat/a-ciorse.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -771,29 +771,14 @@ is (Container : aliased Set; Key : Key_Type) return Constant_Reference_Type is - Node : constant Node_Access := Key_Keys.Find (Container.Tree, Key); + Position : constant Cursor := Find (Container, Key); begin - if Checks and then Node = null then + if Checks and then Position = No_Element then raise Constraint_Error with "Key not in set"; end if; - if Checks and then Node.Element = null then - raise Program_Error with "Node has no element"; - end if; - - declare - Tree : Tree_Type renames Container'Unrestricted_Access.all.Tree; - TC : constant Tamper_Counts_Access := - Tree.TC'Unrestricted_Access; - begin - return R : constant Constant_Reference_Type := - (Element => Node.Element.all'Access, - Control => (Controlled with TC)) - do - Busy (TC.all); - end return; - end; + return Constant_Reference (Container, Position); end Constant_Reference; -------------- @@ -1029,32 +1014,14 @@ is (Container : aliased in out Set; Key : Key_Type) return Reference_Type is - Node : constant Node_Access := Key_Keys.Find (Container.Tree, Key); + Position : constant Cursor := Find (Container, Key); begin - if Checks and then Node = null then + if Checks and then Position = No_Element then raise Constraint_Error with "Key not in set"; end if; - if Checks and then Node.Element = null then - raise Program_Error with "Node has no element"; - end if; - - declare - Tree : Tree_Type renames Container.Tree; - begin - return R : constant Reference_Type := - (Element => Node.Element.all'Unchecked_Access, - Control => - (Controlled with - Tree.TC'Unrestricted_Access, - Container => Container'Unchecked_Access, - Pos => Find (Container, Key), - Old_Key => new Key_Type'(Key))) - do - Busy (Tree.TC); - end return; - end; + return Reference_Preserving_Key (Container, Position); end Reference_Preserving_Key; ----------------------------------- @@ -1193,8 +1160,6 @@ is procedure Insert (Container : in out Set; New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin @@ -1272,7 +1237,6 @@ is Dst_Node : out Node_Access) is Success : Boolean; - pragma Unreferenced (Success); function New_Node return Node_Access; @@ -2153,7 +2117,6 @@ is Tree : Tree_Type; Node : Node_Access; Inserted : Boolean; - pragma Unreferenced (Node, Inserted); begin Insert_Sans_Hint (Tree, New_Item, Node, Inserted); return Set'(Controlled with Tree); diff --git a/gcc/ada/libgnat/a-ciorse.ads b/gcc/ada/libgnat/a-ciorse.ads index 1a9d82c..13272e2 100644 --- a/gcc/ada/libgnat/a-ciorse.ads +++ b/gcc/ada/libgnat/a-ciorse.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-clrefi.adb b/gcc/ada/libgnat/a-clrefi.adb index 1bcb370..cdeeedd 100644 --- a/gcc/ada/libgnat/a-clrefi.adb +++ b/gcc/ada/libgnat/a-clrefi.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-clrefi.ads b/gcc/ada/libgnat/a-clrefi.ads index bb31bee..f9d7ae0 100644 --- a/gcc/ada/libgnat/a-clrefi.ads +++ b/gcc/ada/libgnat/a-clrefi.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-coboho.adb b/gcc/ada/libgnat/a-coboho.adb index 21b9f54..db885b4 100644 --- a/gcc/ada/libgnat/a-coboho.adb +++ b/gcc/ada/libgnat/a-coboho.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2015-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-coboho.ads b/gcc/ada/libgnat/a-coboho.ads index 44269f0..f0a8e52 100644 --- a/gcc/ada/libgnat/a-coboho.ads +++ b/gcc/ada/libgnat/a-coboho.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2015-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cobove.adb b/gcc/ada/libgnat/a-cobove.adb index e56cb94..70483f5 100644 --- a/gcc/ada/libgnat/a-cobove.adb +++ b/gcc/ada/libgnat/a-cobove.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -258,7 +258,7 @@ package body Ada.Containers.Bounded_Vectors is end if; return Vector'(Capacity => 2, - Elements => (Left, Right), + Elements => [Left, Right], Last => Index_Type'First + 1, others => <>); end "&"; @@ -1227,7 +1227,7 @@ package body Ada.Containers.Bounded_Vectors is -- The new items are being appended to the vector, so no -- sliding of existing elements is required. - EA (J .. New_Length) := (others => New_Item); + EA (J .. New_Length) := [others => New_Item]; else -- The new items are being inserted before some existing @@ -1235,7 +1235,7 @@ package body Ada.Containers.Bounded_Vectors is -- new home. EA (J + Count .. New_Length) := EA (J .. Old_Length); - EA (J .. J + Count - 1) := (others => New_Item); + EA (J .. J + Count - 1) := [others => New_Item]; end if; if Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then @@ -2770,7 +2770,7 @@ package body Ada.Containers.Bounded_Vectors is end if; return V : Vector (Capacity => Length) do - V.Elements := (others => New_Item); + V.Elements := [others => New_Item]; V.Last := Last; end return; end To_Vector; diff --git a/gcc/ada/libgnat/a-cobove.ads b/gcc/ada/libgnat/a-cobove.ads index 5f3e1a7..8e0f80f 100644 --- a/gcc/ada/libgnat/a-cobove.ads +++ b/gcc/ada/libgnat/a-cobove.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cofove.adb b/gcc/ada/libgnat/a-cofove.adb index c7f4f06..5f10f57 100644 --- a/gcc/ada/libgnat/a-cofove.adb +++ b/gcc/ada/libgnat/a-cofove.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -763,7 +763,7 @@ is J := To_Array_Index (Before); - Container.Elements (J .. J - 1 + Count) := (others => New_Item); + Container.Elements (J .. J - 1 + Count) := [others => New_Item]; end Insert; procedure Insert @@ -1304,7 +1304,7 @@ is return (Capacity => Length, Last => Last, - Elements => (others => New_Item)); + Elements => [others => New_Item]); end; end To_Vector; diff --git a/gcc/ada/libgnat/a-cofove.ads b/gcc/ada/libgnat/a-cofove.ads index 6d3f486..edf9532 100644 --- a/gcc/ada/libgnat/a-cofove.ads +++ b/gcc/ada/libgnat/a-cofove.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cofuba.adb b/gcc/ada/libgnat/a-cofuba.adb index b290c74..77c0301 100644 --- a/gcc/ada/libgnat/a-cofuba.adb +++ b/gcc/ada/libgnat/a-cofuba.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2016-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cofuba.ads b/gcc/ada/libgnat/a-cofuba.ads index 1640b03..eacf845 100644 --- a/gcc/ada/libgnat/a-cofuba.ads +++ b/gcc/ada/libgnat/a-cofuba.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2016-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cofuma.adb b/gcc/ada/libgnat/a-cofuma.adb index 2b21b0c..080229d 100644 --- a/gcc/ada/libgnat/a-cofuma.adb +++ b/gcc/ada/libgnat/a-cofuma.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2016-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cofuma.ads b/gcc/ada/libgnat/a-cofuma.ads index a1dd764..3f61b63 100644 --- a/gcc/ada/libgnat/a-cofuma.ads +++ b/gcc/ada/libgnat/a-cofuma.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2016-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cofuse.adb b/gcc/ada/libgnat/a-cofuse.adb index 1c5f25b..0157988 100644 --- a/gcc/ada/libgnat/a-cofuse.adb +++ b/gcc/ada/libgnat/a-cofuse.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2016-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cofuse.ads b/gcc/ada/libgnat/a-cofuse.ads index d0acba7..db88b9a 100644 --- a/gcc/ada/libgnat/a-cofuse.ads +++ b/gcc/ada/libgnat/a-cofuse.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2016-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cofuve.adb b/gcc/ada/libgnat/a-cofuve.adb index b4f972c..06075b1 100644 --- a/gcc/ada/libgnat/a-cofuve.adb +++ b/gcc/ada/libgnat/a-cofuve.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2016-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cofuve.ads b/gcc/ada/libgnat/a-cofuve.ads index ee52730..ce3a3a4 100644 --- a/gcc/ada/libgnat/a-cofuve.ads +++ b/gcc/ada/libgnat/a-cofuve.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2016-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -303,7 +303,7 @@ package Ada.Containers.Functional_Vectors with SPARK_Mode is and then Get (Add'Result, Position) = New_Item and then Range_Equal (Left => Container, - Right => Add'Result, + Right => Add'Result, Fst => Index_Type'First, Lst => Index_Type'Pred (Position)) and then Range_Shifted diff --git a/gcc/ada/libgnat/a-cogeso.adb b/gcc/ada/libgnat/a-cogeso.adb index ebbc118..e589b5b 100644 --- a/gcc/ada/libgnat/a-cogeso.adb +++ b/gcc/ada/libgnat/a-cogeso.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cogeso.ads b/gcc/ada/libgnat/a-cogeso.ads index 810b93b..2193df2 100644 --- a/gcc/ada/libgnat/a-cogeso.ads +++ b/gcc/ada/libgnat/a-cogeso.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cohama.adb b/gcc/ada/libgnat/a-cohama.adb index e6d6e4d..2fcf4c8 100644 --- a/gcc/ada/libgnat/a-cohama.adb +++ b/gcc/ada/libgnat/a-cohama.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -698,8 +698,6 @@ is New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin diff --git a/gcc/ada/libgnat/a-cohama.ads b/gcc/ada/libgnat/a-cohama.ads index 3f172bd..96ac164 100644 --- a/gcc/ada/libgnat/a-cohama.ads +++ b/gcc/ada/libgnat/a-cohama.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cohase.adb b/gcc/ada/libgnat/a-cohase.adb index 2342116..e9662cc 100644 --- a/gcc/ada/libgnat/a-cohase.adb +++ b/gcc/ada/libgnat/a-cohase.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -785,8 +785,6 @@ is New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin @@ -1562,7 +1560,6 @@ is Node : Node_Access; Inserted : Boolean; - pragma Unreferenced (Node, Inserted); begin Insert (HT, New_Item, Node, Inserted); @@ -1606,7 +1603,6 @@ is Tgt_Node : Node_Access; Success : Boolean; - pragma Unreferenced (Tgt_Node, Success); -- Start of processing for Process @@ -1876,25 +1872,14 @@ is (Container : aliased Set; Key : Key_Type) return Constant_Reference_Type is - HT : Hash_Table_Type renames Container'Unrestricted_Access.HT; - Node : constant Node_Access := Key_Keys.Find (HT, Key); + Position : constant Cursor := Find (Container, Key); begin - if Checks and then Node = null then + if Checks and then Position = No_Element then raise Constraint_Error with "Key not in set"; end if; - declare - TC : constant Tamper_Counts_Access := - HT.TC'Unrestricted_Access; - begin - return R : constant Constant_Reference_Type := - (Element => Node.Element'Access, - Control => (Controlled with TC)) - do - Busy (TC.all); - end return; - end; + return Constant_Reference (Container, Position); end Constant_Reference; -------------- @@ -2087,30 +2072,14 @@ is (Container : aliased in out Set; Key : Key_Type) return Reference_Type is - Node : constant Node_Access := Key_Keys.Find (Container.HT, Key); + Position : constant Cursor := Find (Container, Key); begin - if Checks and then Node = null then + if Checks and then Position = No_Element then raise Constraint_Error with "key not in set"; end if; - declare - HT : Hash_Table_Type renames Container.HT; - P : constant Cursor := Find (Container, Key); - begin - return R : constant Reference_Type := - (Element => Node.Element'Access, - Control => - (Controlled with - HT.TC'Unrestricted_Access, - Container'Unrestricted_Access, - Index => HT_Ops.Index (HT, P.Node), - Old_Pos => P, - Old_Hash => Hash (Key))) - do - Busy (HT.TC); - end return; - end; + return Reference_Preserving_Key (Container, Position); end Reference_Preserving_Key; ------------- diff --git a/gcc/ada/libgnat/a-cohase.ads b/gcc/ada/libgnat/a-cohase.ads index 2356ba7..ada212c 100644 --- a/gcc/ada/libgnat/a-cohase.ads +++ b/gcc/ada/libgnat/a-cohase.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cohata.ads b/gcc/ada/libgnat/a-cohata.ads index f7e44a3..2c56321 100644 --- a/gcc/ada/libgnat/a-cohata.ads +++ b/gcc/ada/libgnat/a-cohata.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -73,7 +73,7 @@ package Ada.Containers.Hash_Tables is TC : aliased Helpers.Tamper_Counts; Free : Count_Type'Base := -1; Nodes : Nodes_Type (1 .. Capacity); - Buckets : Buckets_Type (1 .. Modulus) := (others => 0); + Buckets : Buckets_Type (1 .. Modulus) := [others => 0]; end record; package Implementation is new Helpers.Generic_Implementation; diff --git a/gcc/ada/libgnat/a-coinho.adb b/gcc/ada/libgnat/a-coinho.adb index ca6882a..fddc16b 100644 --- a/gcc/ada/libgnat/a-coinho.adb +++ b/gcc/ada/libgnat/a-coinho.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2012-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-coinho.ads b/gcc/ada/libgnat/a-coinho.ads index b648836..e574914 100644 --- a/gcc/ada/libgnat/a-coinho.ads +++ b/gcc/ada/libgnat/a-coinho.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -127,8 +127,7 @@ private overriding procedure Adjust (Container : in out Holder); overriding procedure Finalize (Container : in out Holder); - type Reference_Control_Type is new Controlled with - record + type Reference_Control_Type is new Controlled with record Container : Holder_Access; end record; diff --git a/gcc/ada/libgnat/a-coinho__shared.adb b/gcc/ada/libgnat/a-coinho__shared.adb index 0340af0..d540612 100644 --- a/gcc/ada/libgnat/a-coinho__shared.adb +++ b/gcc/ada/libgnat/a-coinho__shared.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2013-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-coinho__shared.ads b/gcc/ada/libgnat/a-coinho__shared.ads index 97f796d..0fcbef9 100644 --- a/gcc/ada/libgnat/a-coinho__shared.ads +++ b/gcc/ada/libgnat/a-coinho__shared.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2013-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -69,6 +69,7 @@ package Ada.Containers.Indefinite_Holders is procedure Query_Element (Container : Holder; Process : not null access procedure (Element : Element_Type)); + procedure Update_Element (Container : in out Holder; Process : not null access procedure (Element : in out Element_Type)); @@ -105,6 +106,7 @@ private use Ada.Streams; type Element_Access is access all Element_Type; + type Holder_Access is access all Holder; type Shared_Holder is record diff --git a/gcc/ada/libgnat/a-coinve.adb b/gcc/ada/libgnat/a-coinve.adb index 9df6e3d..c84175a 100644 --- a/gcc/ada/libgnat/a-coinve.adb +++ b/gcc/ada/libgnat/a-coinve.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1027,7 +1027,7 @@ is SA (Index_Type'First .. Source.Last); begin TA (Index_Type'First .. J) := Src; - Src := (others => null); + Src := [others => null]; end; Source.Last := No_Index; @@ -1472,7 +1472,7 @@ is -- we started by clearing out all of the stale values, -- leaving a "hole" in the middle of the array. - E (K .. Index - 1) := (others => null); + E (K .. Index - 1) := [others => null]; raise; end; end if; @@ -2157,7 +2157,7 @@ is end if; E (Index .. New_Last) := E (Before .. Container.Last); - E (Before .. Index - 1) := (others => null); + E (Before .. Index - 1) := [others => null]; end if; end; diff --git a/gcc/ada/libgnat/a-coinve.ads b/gcc/ada/libgnat/a-coinve.ads index 828ed29..840ef5a 100644 --- a/gcc/ada/libgnat/a-coinve.ads +++ b/gcc/ada/libgnat/a-coinve.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-colien.adb b/gcc/ada/libgnat/a-colien.adb index b189505..122f665 100644 --- a/gcc/ada/libgnat/a-colien.adb +++ b/gcc/ada/libgnat/a-colien.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1996-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-colien.ads b/gcc/ada/libgnat/a-colien.ads index 0c20486..e8fee69 100644 --- a/gcc/ada/libgnat/a-colien.ads +++ b/gcc/ada/libgnat/a-colien.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1996-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-colire.adb b/gcc/ada/libgnat/a-colire.adb index e39d002..cd083b9 100644 --- a/gcc/ada/libgnat/a-colire.adb +++ b/gcc/ada/libgnat/a-colire.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-colire.ads b/gcc/ada/libgnat/a-colire.ads index c1d79b8..8ba18ea 100644 --- a/gcc/ada/libgnat/a-colire.ads +++ b/gcc/ada/libgnat/a-colire.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-comlin.adb b/gcc/ada/libgnat/a-comlin.adb index 171b061..b750ad9 100644 --- a/gcc/ada/libgnat/a-comlin.adb +++ b/gcc/ada/libgnat/a-comlin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-comlin.ads b/gcc/ada/libgnat/a-comlin.ads index d8149cf..5eddbfc 100644 --- a/gcc/ada/libgnat/a-comlin.ads +++ b/gcc/ada/libgnat/a-comlin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-comutr.adb b/gcc/ada/libgnat/a-comutr.adb index 617d248..ddc2f36 100644 --- a/gcc/ada/libgnat/a-comutr.adb +++ b/gcc/ada/libgnat/a-comutr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1130,7 +1130,6 @@ is Count : Count_Type := 1) is Position : Cursor; - pragma Unreferenced (Position); begin Insert_Child (Container, Parent, Before, New_Item, Position, Count); diff --git a/gcc/ada/libgnat/a-comutr.ads b/gcc/ada/libgnat/a-comutr.ads index 8e88b14..9b04a4b 100644 --- a/gcc/ada/libgnat/a-comutr.ads +++ b/gcc/ada/libgnat/a-comutr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-conhel.adb b/gcc/ada/libgnat/a-conhel.adb index 316c866..b24be67 100644 --- a/gcc/ada/libgnat/a-conhel.adb +++ b/gcc/ada/libgnat/a-conhel.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2015-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-conhel.ads b/gcc/ada/libgnat/a-conhel.ads index 47cb2ce..47811f5 100644 --- a/gcc/ada/libgnat/a-conhel.ads +++ b/gcc/ada/libgnat/a-conhel.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2015-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-convec.adb b/gcc/ada/libgnat/a-convec.adb index 5cede72..3a2adae 100644 --- a/gcc/ada/libgnat/a-convec.adb +++ b/gcc/ada/libgnat/a-convec.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1161,7 +1161,7 @@ is Container.Elements := new Elements_Type' (Last => New_Last, - EA => (others => New_Item)); + EA => [others => New_Item]); -- The allocation of the new, internal array succeeded, so it is now -- safe to update the Last index, restoring container invariants. @@ -1189,7 +1189,7 @@ is -- The new items are being appended to the vector, so no -- sliding of existing elements is required. - EA (Before .. New_Last) := (others => New_Item); + EA (Before .. New_Last) := [others => New_Item]; else -- The new items are being inserted before some existing @@ -1204,7 +1204,7 @@ is end if; EA (Index .. New_Last) := EA (Before .. Container.Last); - EA (Before .. Index - 1) := (others => New_Item); + EA (Before .. Index - 1) := [others => New_Item]; end if; end; @@ -1264,13 +1264,14 @@ is declare SA : Elements_Array renames Container.Elements.EA; -- source DA : Elements_Array renames Dst.EA; -- destination + pragma Unreferenced (DA); begin DA (Index_Type'First .. Before - 1) := SA (Index_Type'First .. Before - 1); if Before > Container.Last then - DA (Before .. New_Last) := (others => New_Item); + DA (Before .. New_Last) := [others => New_Item]; else -- The new items are being inserted before some existing elements, @@ -1282,7 +1283,7 @@ is Index := Index_Type'Base (Count_Type'Base (Before) + Count); end if; - DA (Before .. Index - 1) := (others => New_Item); + DA (Before .. Index - 1) := [others => New_Item]; DA (Index .. New_Last) := SA (Before .. Container.Last); end if; @@ -1918,6 +1919,7 @@ is declare SA : Elements_Array renames Container.Elements.EA; -- source DA : Elements_Array renames Dst.EA; -- destination + pragma Unreferenced (DA); begin DA (Index_Type'First .. Before - 1) := @@ -3265,7 +3267,7 @@ is Last := Index_Type'Base (Count_Type'Base (No_Index) + Length); end if; - Elements := new Elements_Type'(Last, EA => (others => New_Item)); + Elements := new Elements_Type'(Last, EA => [others => New_Item]); return (Controlled with Elements, Last, TC => <>); end To_Vector; diff --git a/gcc/ada/libgnat/a-convec.ads b/gcc/ada/libgnat/a-convec.ads index 41eafbc..c024ce5 100644 --- a/gcc/ada/libgnat/a-convec.ads +++ b/gcc/ada/libgnat/a-convec.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-coorma.adb b/gcc/ada/libgnat/a-coorma.adb index 65adf4c..434e87a 100644 --- a/gcc/ada/libgnat/a-coorma.adb +++ b/gcc/ada/libgnat/a-coorma.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -752,8 +752,6 @@ is New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin diff --git a/gcc/ada/libgnat/a-coorma.ads b/gcc/ada/libgnat/a-coorma.ads index 5de65c1..7922e7b 100644 --- a/gcc/ada/libgnat/a-coorma.ads +++ b/gcc/ada/libgnat/a-coorma.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-coormu.adb b/gcc/ada/libgnat/a-coormu.adb index 9b11d29..8008acf 100644 --- a/gcc/ada/libgnat/a-coormu.adb +++ b/gcc/ada/libgnat/a-coormu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1053,7 +1053,6 @@ is procedure Insert (Container : in out Set; New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); begin Insert (Container, New_Item, Position); end Insert; @@ -1858,7 +1857,6 @@ is function To_Set (New_Item : Element_Type) return Set is Tree : Tree_Type; Node : Node_Access; - pragma Unreferenced (Node); begin Insert_Sans_Hint (Tree, New_Item, Node); return Set'(Controlled with Tree); diff --git a/gcc/ada/libgnat/a-coormu.ads b/gcc/ada/libgnat/a-coormu.ads index 51b94eb..2fc91ee 100644 --- a/gcc/ada/libgnat/a-coormu.ads +++ b/gcc/ada/libgnat/a-coormu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-coorse.adb b/gcc/ada/libgnat/a-coorse.adb index ca8f238..7998ee8 100644 --- a/gcc/ada/libgnat/a-coorse.adb +++ b/gcc/ada/libgnat/a-coorse.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -693,25 +693,14 @@ is (Container : aliased Set; Key : Key_Type) return Constant_Reference_Type is - Node : constant Node_Access := Key_Keys.Find (Container.Tree, Key); + Position : constant Cursor := Find (Container, Key); begin - if Checks and then Node = null then + if Checks and then Position = No_Element then raise Constraint_Error with "key not in set"; end if; - declare - Tree : Tree_Type renames Container'Unrestricted_Access.all.Tree; - TC : constant Tamper_Counts_Access := - Tree.TC'Unrestricted_Access; - begin - return R : constant Constant_Reference_Type := - (Element => Node.Element'Access, - Control => (Controlled with TC)) - do - Busy (TC.all); - end return; - end; + return Constant_Reference (Container, Position); end Constant_Reference; -------------- @@ -915,28 +904,14 @@ is (Container : aliased in out Set; Key : Key_Type) return Reference_Type is - Node : constant Node_Access := Key_Keys.Find (Container.Tree, Key); + Position : constant Cursor := Find (Container, Key); begin - if Checks and then Node = null then + if Checks and then Position = No_Element then raise Constraint_Error with "Key not in set"; end if; - declare - Tree : Tree_Type renames Container.Tree; - begin - return R : constant Reference_Type := - (Element => Node.Element'Access, - Control => - (Controlled with - Tree.TC'Unrestricted_Access, - Container => Container'Unchecked_Access, - Pos => Find (Container, Key), - Old_Key => new Key_Type'(Key))) - do - Busy (Tree.TC); - end return; - end; + return Reference_Preserving_Key (Container, Position); end Reference_Preserving_Key; ------------- @@ -1082,8 +1057,6 @@ is New_Item : Element_Type) is Position : Cursor; - pragma Unreferenced (Position); - Inserted : Boolean; begin @@ -1148,7 +1121,6 @@ is Dst_Node : out Node_Access) is Success : Boolean; - pragma Unreferenced (Success); function New_Node return Node_Access; pragma Inline (New_Node); @@ -1960,7 +1932,6 @@ is Tree : Tree_Type; Node : Node_Access; Inserted : Boolean; - pragma Unreferenced (Node, Inserted); begin Insert_Sans_Hint (Tree, New_Item, Node, Inserted); return Set'(Controlled with Tree); diff --git a/gcc/ada/libgnat/a-coorse.ads b/gcc/ada/libgnat/a-coorse.ads index 6d24e03..1833336 100644 --- a/gcc/ada/libgnat/a-coorse.ads +++ b/gcc/ada/libgnat/a-coorse.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-coprnu.adb b/gcc/ada/libgnat/a-coprnu.adb index 20837d4..972e4c0 100644 --- a/gcc/ada/libgnat/a-coprnu.adb +++ b/gcc/ada/libgnat/a-coprnu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-coprnu.ads b/gcc/ada/libgnat/a-coprnu.ads index 7f5f7bd..3b7eb65 100644 --- a/gcc/ada/libgnat/a-coprnu.ads +++ b/gcc/ada/libgnat/a-coprnu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -38,12 +38,12 @@ package Ada.Containers.Prime_Numbers is type Primes_Type is array (Positive range <>) of Hash_Type; Primes : constant Primes_Type := - (53, 97, 193, 389, 769, + [53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, 98317, 196613, 393241, 786433, 1572869, 3145739, 6291469, 12582917, 25165843, 50331653, 100663319, 201326611, 402653189, 805306457, - 1610612741, 3221225473, 4294967291); + 1610612741, 3221225473, 4294967291]; function To_Prime (Length : Count_Type) return Hash_Type; -- Returns the smallest value in Primes not less than Length diff --git a/gcc/ada/libgnat/a-costso.adb b/gcc/ada/libgnat/a-costso.adb index e14ecbb..44436d6 100644 --- a/gcc/ada/libgnat/a-costso.adb +++ b/gcc/ada/libgnat/a-costso.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-costso.ads b/gcc/ada/libgnat/a-costso.ads index db0be24..9e2178c 100644 --- a/gcc/ada/libgnat/a-costso.ads +++ b/gcc/ada/libgnat/a-costso.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-crbltr.ads b/gcc/ada/libgnat/a-crbltr.ads index 7f5028d..10dd935 100644 --- a/gcc/ada/libgnat/a-crbltr.ads +++ b/gcc/ada/libgnat/a-crbltr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-crbtgk.adb b/gcc/ada/libgnat/a-crbtgk.adb index 8af0923..79641f1 100644 --- a/gcc/ada/libgnat/a-crbtgk.adb +++ b/gcc/ada/libgnat/a-crbtgk.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-crbtgk.ads b/gcc/ada/libgnat/a-crbtgk.ads index a7c597c..00ab08a 100644 --- a/gcc/ada/libgnat/a-crbtgk.ads +++ b/gcc/ada/libgnat/a-crbtgk.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-crbtgo.adb b/gcc/ada/libgnat/a-crbtgo.adb index 467b1b7..7757aad 100644 --- a/gcc/ada/libgnat/a-crbtgo.adb +++ b/gcc/ada/libgnat/a-crbtgo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-crbtgo.ads b/gcc/ada/libgnat/a-crbtgo.ads index 00e5a6d..fde9c45 100644 --- a/gcc/ada/libgnat/a-crbtgo.ads +++ b/gcc/ada/libgnat/a-crbtgo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-crdlli.adb b/gcc/ada/libgnat/a-crdlli.adb index 48cdb0c..a5fe431 100644 --- a/gcc/ada/libgnat/a-crdlli.adb +++ b/gcc/ada/libgnat/a-crdlli.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -630,7 +630,6 @@ package body Ada.Containers.Restricted_Doubly_Linked_Lists is Count : Count_Type := 1) is Position : Cursor; - pragma Unreferenced (Position); begin Insert (Container, Before, New_Item, Position, Count); end Insert; @@ -1317,7 +1316,7 @@ package body Ada.Containers.Restricted_Doubly_Linked_Lists is pragma Assert (Vet (Position), "bad cursor in Update_Element"); declare - N : Node_Type renames Container.Nodes (Position.Node); + N : Node_Type renames Container.Nodes (Position.Node); begin Process (N.Element); diff --git a/gcc/ada/libgnat/a-crdlli.ads b/gcc/ada/libgnat/a-crdlli.ads index ea693c3..8faef33 100644 --- a/gcc/ada/libgnat/a-crdlli.ads +++ b/gcc/ada/libgnat/a-crdlli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-csquin.ads b/gcc/ada/libgnat/a-csquin.ads index 95e334e..414fbaa 100644 --- a/gcc/ada/libgnat/a-csquin.ads +++ b/gcc/ada/libgnat/a-csquin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cuprqu.adb b/gcc/ada/libgnat/a-cuprqu.adb index d0a4e64..d4684f8 100644 --- a/gcc/ada/libgnat/a-cuprqu.adb +++ b/gcc/ada/libgnat/a-cuprqu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cuprqu.ads b/gcc/ada/libgnat/a-cuprqu.ads index 4367fe6..aec7e28 100644 --- a/gcc/ada/libgnat/a-cuprqu.ads +++ b/gcc/ada/libgnat/a-cuprqu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cusyqu.adb b/gcc/ada/libgnat/a-cusyqu.adb index 85a0747..5aabd57 100644 --- a/gcc/ada/libgnat/a-cusyqu.adb +++ b/gcc/ada/libgnat/a-cusyqu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cusyqu.ads b/gcc/ada/libgnat/a-cusyqu.ads index 407359d..645ecd9 100644 --- a/gcc/ada/libgnat/a-cusyqu.ads +++ b/gcc/ada/libgnat/a-cusyqu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-cwila1.ads b/gcc/ada/libgnat/a-cwila1.ads index 830fb47..b356ede 100644 --- a/gcc/ada/libgnat/a-cwila1.ads +++ b/gcc/ada/libgnat/a-cwila1.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-cwila9.ads b/gcc/ada/libgnat/a-cwila9.ads index 5545c14..ca9b7ab 100644 --- a/gcc/ada/libgnat/a-cwila9.ads +++ b/gcc/ada/libgnat/a-cwila9.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-decima.adb b/gcc/ada/libgnat/a-decima.adb index 9afe287..c16222f 100644 --- a/gcc/ada/libgnat/a-decima.adb +++ b/gcc/ada/libgnat/a-decima.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-decima.ads b/gcc/ada/libgnat/a-decima.ads index 7ccd9f0..e0abe92 100644 --- a/gcc/ada/libgnat/a-decima.ads +++ b/gcc/ada/libgnat/a-decima.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-decima__128.ads b/gcc/ada/libgnat/a-decima__128.ads index aa87ccf..f988f77 100644 --- a/gcc/ada/libgnat/a-decima__128.ads +++ b/gcc/ada/libgnat/a-decima__128.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-dhfina.adb b/gcc/ada/libgnat/a-dhfina.adb index 4f0f033..3b7a358 100644 --- a/gcc/ada/libgnat/a-dhfina.adb +++ b/gcc/ada/libgnat/a-dhfina.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-dhfina.ads b/gcc/ada/libgnat/a-dhfina.ads index d760251..4ef73d0 100644 --- a/gcc/ada/libgnat/a-dhfina.ads +++ b/gcc/ada/libgnat/a-dhfina.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-diocst.adb b/gcc/ada/libgnat/a-diocst.adb index f3e08fe..72fb279 100644 --- a/gcc/ada/libgnat/a-diocst.adb +++ b/gcc/ada/libgnat/a-diocst.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-diocst.ads b/gcc/ada/libgnat/a-diocst.ads index 6454c91..9d0d90b 100644 --- a/gcc/ada/libgnat/a-diocst.ads +++ b/gcc/ada/libgnat/a-diocst.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-direct.adb b/gcc/ada/libgnat/a-direct.adb index 20616a2..4d7288e 100644 --- a/gcc/ada/libgnat/a-direct.adb +++ b/gcc/ada/libgnat/a-direct.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,12 +31,14 @@ with Ada.Calendar; use Ada.Calendar; with Ada.Characters.Handling; use Ada.Characters.Handling; +with Ada.Containers.Vectors; with Ada.Directories.Validity; use Ada.Directories.Validity; with Ada.Directories.Hierarchical_File_Names; -use Ada.Directories.Hierarchical_File_Names; +use Ada.Directories.Hierarchical_File_Names; with Ada.Strings.Fixed; with Ada.Strings.Maps; use Ada.Strings.Maps; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; +with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; with Interfaces.C; @@ -78,40 +80,56 @@ package body Ada.Directories is -- Result returned from C_Modification_Time call when routine unable to get -- file modification time. - type Search_Data is record - Is_Valid : Boolean := False; - Name : Unbounded_String; - Pattern : Regexp; - Filter : Filter_Type; - Dir : Dir_Type_Value := No_Dir; - Entry_Fetched : Boolean := False; - Dir_Entry : Directory_Entry_Type; + Empty_String : constant String := ""; + -- Empty string, returned by function Extension when there is no extension + + ---------------------------- + -- Directory Search Types -- + ---------------------------- + + package Directory_Vectors is new + Ada.Containers.Vectors + (Index_Type => Natural, + Element_Type => Directory_Entry_Type); + use Directory_Vectors; + -- Used to store the results of the directory search + + type Dir_Contents_Ptr is access Directory_Vectors.Vector; + + procedure Free is new Ada.Unchecked_Deallocation + (Directory_Vectors.Vector, Dir_Contents_Ptr); + -- Directory_Vectors.Vector deallocation routine + + type Search_State is new Ada.Finalization.Controlled with record + Dir_Contents : Dir_Contents_Ptr; + Next_Entry : Cursor; end record; - -- The current state of a search + -- The Search_State consists of a vector of directory items that match the + -- search pattern and filter, and a cursor pointing to the next item of the + -- vector to be returned to the user. - Empty_String : constant String := (1 .. 0 => ASCII.NUL); - -- Empty string, returned by function Extension when there is no extension + procedure Free is new Ada.Unchecked_Deallocation (Search_State, Search_Ptr); + -- Search_State deallocation routine - procedure Free is new Ada.Unchecked_Deallocation (Search_Data, Search_Ptr); + Dir_Vector_Initial_Size : constant := 100; + -- Initial size for the Dir_Contents vector, sized to ensure the vector + -- does not need to be reallocated for reasonably sized directory searches. - procedure Close (Dir : Dir_Type_Value); + ------------------------ + -- Helper Subprograms -- + ------------------------ function File_Exists (Name : String) return Boolean; -- Returns True if the named file exists - procedure Fetch_Next_Entry (Search : Search_Type); - -- Get the next entry in a directory, setting Entry_Fetched if successful - -- or resetting Is_Valid if not. - procedure Start_Search_Internal - (Search : in out Search_Type; - Directory : String; - Pattern : String; - Filter : Filter_Type := (others => True); - Force_Case_Insensitive : Boolean); - -- Similar to Start_Search except we can force a search to be - -- case-insensitive, which is important for detecting the name-case - -- equivalence for a given directory. + (Search : in out Search_Type; + Directory : String; + Pattern : String; + Filter : Filter_Type := [others => True]; + Case_Insensitive : Boolean); + -- Similar to Start_Search except we can specify a case-insensitive search. + -- This enables detecting the name-case equivalence for a given directory. --------------- -- Base_Name -- @@ -137,21 +155,6 @@ package body Ada.Directories is return Simple; end Base_Name; - ----------- - -- Close -- - ----------- - - procedure Close (Dir : Dir_Type_Value) is - Discard : Integer; - pragma Warnings (Off, Discard); - - function closedir (directory : DIRs) return Integer; - pragma Import (C, closedir, "__gnat_closedir"); - - begin - Discard := closedir (DIRs (Dir)); - end Close; - ------------- -- Compose -- ------------- @@ -378,7 +381,7 @@ package body Ada.Directories is (New_Directory : String; Form : String := "") is - C_Dir_Name : constant String := New_Directory & ASCII.NUL; + Dir_Name_C : constant String := New_Directory & ASCII.NUL; begin -- First, the invalid case @@ -411,7 +414,7 @@ package body Ada.Directories is raise Use_Error with "invalid Form"; end if; - if CRTL.mkdir (C_Dir_Name, Encoding) /= 0 then + if CRTL.mkdir (Dir_Name_C, Encoding) /= 0 then raise Use_Error with "creation of new directory """ & New_Directory & """ failed"; end if; @@ -553,9 +556,9 @@ package body Ada.Directories is else declare - C_Dir_Name : constant String := Directory & ASCII.NUL; + Dir_Name_C : constant String := Directory & ASCII.NUL; begin - if rmdir (C_Dir_Name) /= 0 then + if rmdir (Dir_Name_C) /= 0 then raise Use_Error with "deletion of directory """ & Directory & """ failed"; end if; @@ -640,10 +643,10 @@ package body Ada.Directories is End_Search (Search); declare - C_Dir_Name : constant String := Directory & ASCII.NUL; + Dir_Name_C : constant String := Directory & ASCII.NUL; begin - if rmdir (C_Dir_Name) /= 0 then + if rmdir (Dir_Name_C) /= 0 then raise Use_Error with "directory tree rooted at """ & Directory & """ could not be deleted"; @@ -710,141 +713,6 @@ package body Ada.Directories is end if; end Extension; - ---------------------- - -- Fetch_Next_Entry -- - ---------------------- - - procedure Fetch_Next_Entry (Search : Search_Type) is - Name : String (1 .. NAME_MAX); - Last : Natural; - - Kind : File_Kind := Ordinary_File; - -- Initialized to avoid a compilation warning - - Filename_Addr : Address; - Filename_Len : aliased Integer; - - Buffer : array (1 .. SIZEOF_struct_dirent_alloc) of Character; - - function readdir_gnat - (Directory : Address; - Buffer : Address; - Last : not null access Integer) return Address; - pragma Import (C, readdir_gnat, "__gnat_readdir"); - - begin - -- Search.Value.Is_Valid is always True when Fetch_Next_Entry is called - - loop - Filename_Addr := - readdir_gnat - (Address (Search.Value.Dir), - Buffer'Address, - Filename_Len'Access); - - -- If no matching entry is found, set Is_Valid to False - - if Filename_Addr = Null_Address then - Search.Value.Is_Valid := False; - exit; - end if; - - if Filename_Len > Name'Length then - raise Use_Error with "file name too long"; - end if; - - declare - subtype Name_String is String (1 .. Filename_Len); - Dent_Name : Name_String; - for Dent_Name'Address use Filename_Addr; - pragma Import (Ada, Dent_Name); - - begin - Last := Filename_Len; - Name (1 .. Last) := Dent_Name; - end; - - -- Check if the entry matches the pattern - - if Match (Name (1 .. Last), Search.Value.Pattern) then - declare - C_Full_Name : constant String := - Compose (To_String (Search.Value.Name), - Name (1 .. Last)) & ASCII.NUL; - Full_Name : String renames - C_Full_Name - (C_Full_Name'First .. C_Full_Name'Last - 1); - Found : Boolean := False; - Attr : aliased File_Attributes; - Exists : Integer; - Error : Integer; - - begin - Reset_Attributes (Attr'Access); - Exists := File_Exists_Attr (C_Full_Name'Address, Attr'Access); - Error := Error_Attributes (Attr'Access); - - if Error /= 0 then - raise Use_Error - with Full_Name & ": " & Errno_Message (Err => Error); - end if; - - if Exists = 1 then - -- Ignore special directories "." and ".." - - if (Full_Name'Length > 1 - and then - Full_Name - (Full_Name'Last - 1 .. Full_Name'Last) = "\.") - or else - (Full_Name'Length > 2 - and then - Full_Name - (Full_Name'Last - 2 .. Full_Name'Last) = "\..") - then - Exists := 0; - end if; - - -- Now check if the file kind matches the filter - - if Is_Regular_File_Attr - (C_Full_Name'Address, Attr'Access) = 1 - then - if Search.Value.Filter (Ordinary_File) then - Kind := Ordinary_File; - Found := True; - end if; - - elsif Is_Directory_Attr - (C_Full_Name'Address, Attr'Access) = 1 - then - if Search.Value.Filter (Directory) then - Kind := Directory; - Found := True; - end if; - - elsif Search.Value.Filter (Special_File) then - Kind := Special_File; - Found := True; - end if; - - -- If it does, update Search and return - - if Found then - Search.Value.Entry_Fetched := True; - Search.Value.Dir_Entry := - (Is_Valid => True, - Simple => To_Unbounded_String (Name (1 .. Last)), - Full => To_Unbounded_String (Full_Name), - Kind => Kind); - exit; - end if; - end if; - end; - end if; - end loop; - end Fetch_Next_Entry; - ----------------- -- File_Exists -- ----------------- @@ -867,15 +735,9 @@ package body Ada.Directories is procedure Finalize (Search : in out Search_Type) is begin - if Search.Value /= null then - - -- Close the directory, if one is open - - if Search.Value.Dir /= No_Dir then - Close (Search.Value.Dir); - end if; - - Free (Search.Value); + if Search.State /= null then + Free (Search.State.Dir_Contents); + Free (Search.State); end if; end Finalize; @@ -910,15 +772,13 @@ package body Ada.Directories is function Full_Name (Directory_Entry : Directory_Entry_Type) return String is begin - -- First, the invalid case + -- If the Directory_Entry is valid return the full name contained in the + -- entry record. - if not Directory_Entry.Is_Valid then + if not Directory_Entry.Valid then raise Status_Error with "invalid directory entry"; - else - -- The value to return has already been computed - - return To_String (Directory_Entry.Full); + return To_String (Directory_Entry.Full_Name); end if; end Full_Name; @@ -931,28 +791,34 @@ package body Ada.Directories is Directory_Entry : out Directory_Entry_Type) is begin - -- First, the invalid case + -- A Search with no state implies the user has not called Start_Search - if Search.Value = null or else not Search.Value.Is_Valid then - raise Status_Error with "invalid search"; + if Search.State = null then + raise Status_Error with "search not started"; end if; - -- Fetch the next entry, if needed + -- If the next entry is No_Element it means the search is finished and + -- there are no more entries to return. - if not Search.Value.Entry_Fetched then - Fetch_Next_Entry (Search); + if Search.State.Next_Entry = No_Element then + raise Status_Error with "no more entries"; end if; - -- It is an error if no valid entry is found + -- Populate Directory_Entry with the next entry and update the search + -- state. - if not Search.Value.Is_Valid then - raise Status_Error with "no next entry"; + Directory_Entry := Element (Search.State.Next_Entry); + Next (Search.State.Next_Entry); - else - -- Reset Entry_Fetched and return the entry + -- If Start_Search received a non-zero error code when trying to read + -- the file attributes of this entry, raise an Use_Error so the user + -- is aware that it was not possible to retrieve the attributes of this + -- entry. - Search.Value.Entry_Fetched := False; - Directory_Entry := Search.Value.Dir_Entry; + if Directory_Entry.Attr_Error_Code /= 0 then + raise Use_Error + with To_String (Directory_Entry.Full_Name) & ": " & + Errno_Message (Err => Directory_Entry.Attr_Error_Code); end if; end Get_Next_Entry; @@ -982,14 +848,9 @@ package body Ada.Directories is function Kind (Directory_Entry : Directory_Entry_Type) return File_Kind is begin - -- First, the invalid case - - if not Directory_Entry.Is_Valid then + if not Directory_Entry.Valid then raise Status_Error with "invalid directory entry"; - else - -- The value to return has already be computed - return Directory_Entry.Kind; end if; end Kind; @@ -1025,15 +886,15 @@ package body Ada.Directories is (Directory_Entry : Directory_Entry_Type) return Ada.Calendar.Time is begin - -- First, the invalid case + -- If the Directory_Entry is valid return the modification time + -- contained in the entry record. The modification time is recorded in + -- the entry since its cheap to query all the file the attributes in + -- one read when the directory is searched. - if not Directory_Entry.Is_Valid then + if not Directory_Entry.Valid then raise Status_Error with "invalid directory entry"; - else - -- The value to return has already be computed - - return Modification_Time (To_String (Directory_Entry.Full)); + return Directory_Entry.Modification_Time; end if; end Modification_Time; @@ -1043,19 +904,17 @@ package body Ada.Directories is function More_Entries (Search : Search_Type) return Boolean is begin - if Search.Value = null then - return False; - - elsif Search.Value.Is_Valid then - - -- Fetch the next entry, if needed + -- If the vector cursor Search.State.Next_Entry points to an element in + -- Search.State.Dir_Contents then there is another entry to return. + -- Otherwise, we return False. - if not Search.Value.Entry_Fetched then - Fetch_Next_Entry (Search); - end if; + if Search.State = null then + return False; + elsif Search.State.Next_Entry = No_Element then + return False; + else + return True; end if; - - return Search.Value.Is_Valid; end More_Entries; --------------------------- @@ -1094,7 +953,7 @@ package body Ada.Directories is (Search => S, Directory => To_String (Dir_Path), Pattern => "", - Filter => (Directory => False, others => True)); + Filter => [Directory => False, others => True]); loop Get_Next_Entry (S, Test_File); @@ -1114,8 +973,8 @@ package body Ada.Directories is (Search => S, Directory => To_String (Dir_Path), Pattern => Simple_Name (Test_File), - Filter => (Directory => False, others => True), - Force_Case_Insensitive => True); + Filter => [Directory => False, others => True], + Case_Insensitive => True); -- We will find at least one match due to the search hitting our test -- file. @@ -1215,7 +1074,7 @@ package body Ada.Directories is procedure Search (Directory : String; Pattern : String; - Filter : Filter_Type := (others => True); + Filter : Filter_Type := [others => True]; Process : not null access procedure (Directory_Entry : Directory_Entry_Type)) is @@ -1237,7 +1096,7 @@ package body Ada.Directories is ------------------- procedure Set_Directory (Directory : String) is - C_Dir_Name : constant String := Directory & ASCII.NUL; + Dir_Name_C : constant String := Directory & ASCII.NUL; begin if not Is_Valid_Path_Name (Directory) then raise Name_Error with @@ -1247,7 +1106,7 @@ package body Ada.Directories is raise Name_Error with "directory """ & Directory & """ does not exist"; - elsif chdir (C_Dir_Name) /= 0 then + elsif chdir (Dir_Name_C) /= 0 then raise Name_Error with "could not set to designated directory """ & Directory & '"'; end if; @@ -1344,15 +1203,13 @@ package body Ada.Directories is function Simple_Name (Directory_Entry : Directory_Entry_Type) return String is begin - -- First, the invalid case + -- If the Directory_Entry is valid return the simple name contained in + -- the entry record. - if not Directory_Entry.Is_Valid then + if not Directory_Entry.Valid then raise Status_Error with "invalid directory entry"; - else - -- The value to return has already be computed - - return To_String (Directory_Entry.Simple); + return To_String (Directory_Entry.Name); end if; end Simple_Name; @@ -1381,15 +1238,15 @@ package body Ada.Directories is function Size (Directory_Entry : Directory_Entry_Type) return File_Size is begin - -- First, the invalid case + -- If the Directory_Entry is valid return the size contained in the + -- entry record. The size is recorded in the entry since it is cheap to + -- query all the file the attributes in one read when the directory is + -- searched. - if not Directory_Entry.Is_Valid then + if not Directory_Entry.Valid then raise Status_Error with "invalid directory entry"; - else - -- The value to return has already be computed - - return Size (To_String (Directory_Entry.Full)); + return Directory_Entry.Size; end if; end Size; @@ -1401,7 +1258,7 @@ package body Ada.Directories is (Search : in out Search_Type; Directory : String; Pattern : String; - Filter : Filter_Type := (others => True)) + Filter : Filter_Type := [others => True]) is begin Start_Search_Internal (Search, Directory, Pattern, Filter, False); @@ -1412,69 +1269,206 @@ package body Ada.Directories is --------------------------- procedure Start_Search_Internal - (Search : in out Search_Type; - Directory : String; - Pattern : String; - Filter : Filter_Type := (others => True); - Force_Case_Insensitive : Boolean) + (Search : in out Search_Type; + Directory : String; + Pattern : String; + Filter : Filter_Type := [others => True]; + Case_Insensitive : Boolean) is - function opendir (file_name : String) return DIRs; - pragma Import (C, opendir, "__gnat_opendir"); + function closedir (Directory : DIRs) return Integer + with Import, External_Name => "__gnat_closedir", Convention => C; + -- C lib function to close Directory + + function opendir (Directory : String) return DIRs + with Import, External_Name => "__gnat_opendir", Convention => C; + -- C lib function to open Directory + + function readdir_gnat + (Directory : Address; + Buffer : Address; + Last : not null access Integer) return Address + with Import, External_Name => "__gnat_readdir", Convention => C; + -- Read the next item in Directory + + Dir_Name_C : constant String := Directory & ASCII.NUL; + Dir_Entry_Buffer : array (1 .. SIZEOF_struct_dirent_alloc) of Character; + Dir_Pointer : Dir_Type_Value; + File_Name_Addr : Address; + File_Name_Len : aliased Integer; + Pattern_Regex : Regexp; - C_File_Name : constant String := Directory & ASCII.NUL; - Pat : Regexp; - Dir : Dir_Type_Value; + Call_Result : Integer; + pragma Warnings (Off, Call_Result); + -- Result of calling a C function that returns a status begin - -- First, the invalid case Name_Error + -- Check that Directory is a valid directory if not Is_Directory (Directory) then raise Name_Error with "unknown directory """ & Simple_Name (Directory) & '"'; end if; - -- Check the pattern + -- Check and compile the pattern declare Case_Sensitive : Boolean := Is_Path_Name_Case_Sensitive; begin - if Force_Case_Insensitive then + if Case_Insensitive then Case_Sensitive := False; end if; - Pat := - Compile - (Pattern, - Glob => True, - Case_Sensitive => Case_Sensitive); + Pattern_Regex := + Compile (Pattern, Glob => True, Case_Sensitive => Case_Sensitive); exception when Error_In_Regexp => - Free (Search.Value); raise Name_Error with "invalid pattern """ & Pattern & '"'; end; - Dir := Dir_Type_Value (opendir (C_File_Name)); + -- Open Directory - if Dir = No_Dir then + Dir_Pointer := Dir_Type_Value (opendir (Dir_Name_C)); + + if Dir_Pointer = No_Dir then raise Use_Error with "unreadable directory """ & Simple_Name (Directory) & '"'; end if; - -- If needed, finalize Search + -- If needed, finalize Search. Note: we should probably raise an + -- exception here if Search belongs to an existing search rather than + -- quietly end it. However, we first need to check that it won't break + -- existing software. Finalize (Search); - -- Allocate the default data + -- Allocate and initialize the search state + + Search.State := new Search_State' + (Ada.Finalization.Controlled with + Dir_Contents => new Vector, + Next_Entry => No_Element); + + -- Increase the size of the Dir_Contents vector so it does not need to + -- grow for most reasonable directory searches. + + Search.State.Dir_Contents.Reserve_Capacity (Dir_Vector_Initial_Size); + + -- Read the contents of Directory into Search.State + + loop + -- Get next item in the directory + + File_Name_Addr := + readdir_gnat + (Address (Dir_Pointer), + Dir_Entry_Buffer'Address, + File_Name_Len'Access); + + exit when File_Name_Addr = Null_Address; + + -- If the file name matches the Pattern and the file type matches + -- the Filter add it to our search vector. + + declare + subtype File_Name_String is String (1 .. File_Name_Len); + + File_Name : constant File_Name_String + with Import, Address => File_Name_Addr; + + begin + if Match (File_Name, Pattern_Regex) then + declare + Path_C : constant String := + Compose (Directory, File_Name) & ASCII.NUL; + Path : String renames + Path_C (Path_C'First .. Path_C'Last - 1); + Found : Boolean := False; + Attr : aliased File_Attributes; + Exists : Integer; + Error : Integer; + Kind : File_Kind; + Size : File_Size; + + begin + -- Get the file attributes for the directory item + + Reset_Attributes (Attr'Access); + Exists := File_Exists_Attr (Path_C'Address, Attr'Access); + Error := Error_Attributes (Attr'Access); + + -- If there was an error when trying to read the attributes + -- of a Directory entry, record the error so it can be + -- propagated to the user when they interate through the + -- directory results. + + if Error /= 0 then + Search.State.Dir_Contents.Append + (Directory_Entry_Type' + [Valid => True, + Name => To_Unbounded_String (File_Name), + Full_Name => To_Unbounded_String (Path), + Attr_Error_Code => Error, + others => <>]); + + -- Otherwise, if the file exists and matches the file kind + -- Filter, add the file to the search results. We capture + -- the size and modification time here as we have already + -- the entry's attributes above. + + elsif Exists = 1 then + if Is_Regular_File_Attr (Path_C'Address, Attr'Access) = 1 + and then Filter (Ordinary_File) + then + Found := True; + Kind := Ordinary_File; + Size := + File_Size + (File_Length_Attr + (-1, Path_C'Address, Attr'Access)); + + elsif Is_Directory_Attr (Path_C'Address, Attr'Access) = 1 + and then Filter (File_Kind'First) + then + Found := True; + Kind := File_Kind'First; + -- File_Kind'First is used instead of Directory due + -- to a name overload issue with the procedure + -- parameter Directory. + Size := 0; + + elsif Filter (Special_File) then + Found := True; + Kind := Special_File; + Size := 0; + end if; + + if Found then + Search.State.Dir_Contents.Append + (Directory_Entry_Type' + [Valid => True, + Name => + To_Unbounded_String (File_Name), + Full_Name => To_Unbounded_String (Path), + Attr_Error_Code => 0, + Kind => Kind, + Modification_Time => Modification_Time (Path), + Size => Size]); + end if; + end if; + end; + end if; + end; + end loop; + + -- Set the first entry to be returned to the user to be the first + -- element of the Dir_Contents vector. If no items were found, First + -- will return No_Element, which signals + Search.State.Next_Entry := Search.State.Dir_Contents.First; - Search.Value := new Search_Data; + -- Search is finished, close Directory - -- Initialize some Search components + Call_Result := closedir (DIRs (Dir_Pointer)); - Search.Value.Filter := Filter; - Search.Value.Name := To_Unbounded_String (Full_Name (Directory)); - Search.Value.Pattern := Pat; - Search.Value.Dir := Dir; - Search.Value.Is_Valid := True; end Start_Search_Internal; end Ada.Directories; diff --git a/gcc/ada/libgnat/a-direct.ads b/gcc/ada/libgnat/a-direct.ads index 12f3bd4..cb8012d 100644 --- a/gcc/ada/libgnat/a-direct.ads +++ b/gcc/ada/libgnat/a-direct.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived for use with GNAT from AI-00248, which is -- -- expected to be a part of a future expected revised Ada Reference Manual. -- @@ -366,20 +366,23 @@ package Ada.Directories is (Search : in out Search_Type; Directory : String; Pattern : String; - Filter : Filter_Type := (others => True)); + Filter : Filter_Type := [others => True]); -- Starts a search in the directory entry in the directory named by -- Directory for entries matching Pattern. Pattern represents a file name -- matching pattern. If Pattern is null, all items in the directory are -- matched; otherwise, the interpretation of Pattern is implementation- -- defined. Only items which match Filter will be returned. After a - -- successful call on Start_Search, the object Search may have entries - -- available, but it may have no entries available if no files or - -- directories match Pattern and Filter. The exception Name_Error is - -- propagated if the string given by Directory does not identify an - -- existing directory, or if Pattern does not allow the identification of - -- any possible external file or directory. The exception Use_Error is - -- propagated if the external environment does not support the searching - -- of the directory with the given name (in the absence of Name_Error). + -- successful call on Start_Search, the object Search will be populated + -- with the items of the directory that match the Pattern and Filter, if + -- any. Any subsequent change to the directory after the call to + -- Start_Search will not be reflected in the Search object. + -- + -- The exception Name_Error is propagated if the string given by Directory + -- does not identify an existing directory, or if Pattern does not allow + -- the identification of any possible external file or directory. The + -- exception Use_Error is propagated if the external environment does not + -- support the searching of the directory with the given name (in the + -- absence of Name_Error). procedure End_Search (Search : in out Search_Type); -- Ends the search represented by Search. After a successful call on @@ -397,17 +400,17 @@ package Ada.Directories is Directory_Entry : out Directory_Entry_Type); -- Returns the next Directory_Entry for the search described by Search that -- matches the pattern and filter. If no further matches are available, - -- Status_Error is raised. It is implementation-defined as to whether the - -- results returned by this routine are altered if the contents of the - -- directory are altered while the Search object is valid (for example, by - -- another program). The exception Use_Error is propagated if the external - -- environment does not support continued searching of the directory - -- represented by Search. + -- Status_Error is raised. The results returned by this routine reflect the + -- contents of the directory at the time of the Start_Search call. + -- Consequently, changes to the contents of the directory, by this or + -- another program, will not be reflected in the Search object. The + -- exception Use_Error is propagated if the external environment does not + -- support continued searching of the directory represented by Search. procedure Search (Directory : String; Pattern : String; - Filter : Filter_Type := (others => True); + Filter : Filter_Type := [others => True]; Process : not null access procedure (Directory_Entry : Directory_Entry_Type)); -- Searches in the directory named by Directory for entries matching @@ -472,30 +475,49 @@ package Ada.Directories is Device_Error : exception renames Ada.IO_Exceptions.Device_Error; private - type Directory_Entry_Type is record - Is_Valid : Boolean := False; - Simple : Ada.Strings.Unbounded.Unbounded_String; - Full : Ada.Strings.Unbounded.Unbounded_String; - Kind : File_Kind := Ordinary_File; + type Search_State; + type Search_Ptr is access Search_State; + -- To simplify the setup of a new search and its subsequent teardown, the + -- state of Search_Type is implemented in a seperate record type that can + -- be allocated when a new search is started and deallocated when the + -- search is ended. The type is defined in the body as it is not required + -- by child packages. + + type Search_Type is new Ada.Finalization.Controlled with record + State : Search_Ptr; end record; - -- The type Search_Data is defined in the body, so that the spec does not - -- depend on packages of the GNAT hierarchy. + type Directory_Entry_Type is record + Valid : Boolean := False; + -- Indicates if the record has been populated by the Get_Next_Entry + -- procedure. The default initialization ensures objects created through + -- declarations or allocators are identified as not valid for use with + -- the Directory_Entry_Type routines until Get_Next_Entry is called. - type Search_Data; - type Search_Ptr is access Search_Data; + Name : Ada.Strings.Unbounded.Unbounded_String; + -- The name of the item in the directory - -- Search_Type need to be a controlled type, because it includes component - -- of type Dir_Type (in GNAT.Directory_Operations) that need to be closed - -- (if opened) during finalization. The component need to be an access - -- value, because Search_Data is not fully defined in the spec. + Full_Name : Ada.Strings.Unbounded.Unbounded_String; + -- The full path to the item - type Search_Type is new Ada.Finalization.Controlled with record - Value : Search_Ptr; + Attr_Error_Code : Integer; + -- The error code returned when querying the item's file attributes + -- during Start_Search. Allows Get_Next_Entry to raise an exception when + -- the error code is non-zero. + + Kind : File_Kind; + -- The type of item + + Modification_Time : Ada.Calendar.Time; + -- The modification time of the item at the time of Start_Search + + Size : File_Size; + -- The size of an ordinary file at the time of Start_Search. For special + -- files and directories, Size is always zero. end record; procedure Finalize (Search : in out Search_Type); - -- Close the directory, if opened, and deallocate Value + -- Deallocate the data structures used for the search procedure End_Search (Search : in out Search_Type) renames Finalize; diff --git a/gcc/ada/libgnat/a-direio.adb b/gcc/ada/libgnat/a-direio.adb index f83b34b..ac84af8 100644 --- a/gcc/ada/libgnat/a-direio.adb +++ b/gcc/ada/libgnat/a-direio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -45,7 +45,7 @@ with Ada.Unchecked_Conversion; package body Ada.Direct_IO is Zeroes : constant System.Storage_Elements.Storage_Array := - (1 .. System.Storage_Elements.Storage_Offset (Bytes) => 0); + [1 .. System.Storage_Elements.Storage_Offset (Bytes) => 0]; -- Buffer used to fill out partial records package FCB renames System.File_Control_Block; diff --git a/gcc/ada/libgnat/a-direio.ads b/gcc/ada/libgnat/a-direio.ads index 0a91174..5a71253 100644 --- a/gcc/ada/libgnat/a-direio.ads +++ b/gcc/ada/libgnat/a-direio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-dirval.adb b/gcc/ada/libgnat/a-dirval.adb index bdb8faf..412a9e7 100644 --- a/gcc/ada/libgnat/a-dirval.adb +++ b/gcc/ada/libgnat/a-dirval.adb @@ -7,7 +7,7 @@ -- B o d y -- -- (POSIX Version) -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-dirval.ads b/gcc/ada/libgnat/a-dirval.ads index 8c6cd0a..b1b2feb 100644 --- a/gcc/ada/libgnat/a-dirval.ads +++ b/gcc/ada/libgnat/a-dirval.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-dirval__mingw.adb b/gcc/ada/libgnat/a-dirval__mingw.adb index 51827a5..9e76fb8 100644 --- a/gcc/ada/libgnat/a-dirval__mingw.adb +++ b/gcc/ada/libgnat/a-dirval__mingw.adb @@ -7,7 +7,7 @@ -- B o d y -- -- (Windows Version) -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-einuoc.adb b/gcc/ada/libgnat/a-einuoc.adb index 1c409da..4abf390 100644 --- a/gcc/ada/libgnat/a-einuoc.adb +++ b/gcc/ada/libgnat/a-einuoc.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2000-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-einuoc.ads b/gcc/ada/libgnat/a-einuoc.ads index cb70ab1..e6f4b4d 100644 --- a/gcc/ada/libgnat/a-einuoc.ads +++ b/gcc/ada/libgnat/a-einuoc.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-elchha.adb b/gcc/ada/libgnat/a-elchha.adb index d54aa65..aa31782 100644 --- a/gcc/ada/libgnat/a-elchha.adb +++ b/gcc/ada/libgnat/a-elchha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,8 +31,6 @@ -- Default version for most targets -pragma Compiler_Unit_Warning; - with System.Standard_Library; use System.Standard_Library; with System.Soft_Links; use System; diff --git a/gcc/ada/libgnat/a-elchha.ads b/gcc/ada/libgnat/a-elchha.ads index 15696bf..e886e7d 100644 --- a/gcc/ada/libgnat/a-elchha.ads +++ b/gcc/ada/libgnat/a-elchha.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,8 +31,6 @@ -- Last chance handler. Unhandled exceptions are passed to this routine -pragma Compiler_Unit_Warning; - procedure Ada.Exceptions.Last_Chance_Handler (Except : Exception_Occurrence); pragma Export (C, diff --git a/gcc/ada/libgnat/a-envvar.adb b/gcc/ada/libgnat/a-envvar.adb index cf11887..30c0494 100644 --- a/gcc/ada/libgnat/a-envvar.adb +++ b/gcc/ada/libgnat/a-envvar.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-excach.adb b/gcc/ada/libgnat/a-excach.adb index a8e6a58..0fa91d7 100644 --- a/gcc/ada/libgnat/a-excach.adb +++ b/gcc/ada/libgnat/a-excach.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-except.adb b/gcc/ada/libgnat/a-except.adb index 631c35a..3cf7712 100644 --- a/gcc/ada/libgnat/a-except.adb +++ b/gcc/ada/libgnat/a-except.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1110,7 +1110,7 @@ package body Ada.Exceptions is else declare - New_Msg : constant String := Prefix & Exception_Name (X); + New_Msg : constant String := Prefix & Exception_Name (X); begin -- No message present, just provide our own diff --git a/gcc/ada/libgnat/a-except.ads b/gcc/ada/libgnat/a-except.ads index 1608e79..af87d66 100644 --- a/gcc/ada/libgnat/a-except.ads +++ b/gcc/ada/libgnat/a-except.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -184,14 +184,9 @@ private -- Raise_Exception_Always if it can determine this is the case. The Export -- allows this routine to be accessed from Pure units. - -- Make these callable from strub contexts. pragma Machine_Attribute (Raise_Exception_Always, "strub", "callable"); - pragma Machine_Attribute (Raise_Exception, - "strub", "callable"); - -- This property should arguably be visible to callers, but let's - -- keep it private for now. In practice, it doesn't matter, since - -- it's only checked in the back end. + -- Make it callable from strub contexts procedure Raise_From_Controlled_Operation (X : Exception_Occurrence); pragma No_Return (Raise_From_Controlled_Operation); @@ -291,8 +286,10 @@ private pragma Stream_Convert (Exception_Occurrence, String_To_EO, EO_To_String); -- Functions for implementing Exception_Occurrence stream attributes - pragma Warnings (Off, "aggregate not fully initialized"); - Null_Occurrence : constant Exception_Occurrence := (others => <>); - pragma Warnings (On, "aggregate not fully initialized"); + Null_Occurrence : constant Exception_Occurrence := + (Machine_Occurrence => System.Null_Address, + Msg => (others => '*'), + Tracebacks => (others => System.Traceback_Entries.Null_TB_Entry), + others => <>); end Ada.Exceptions; diff --git a/gcc/ada/libgnat/a-exctra.adb b/gcc/ada/libgnat/a-exctra.adb index 67c85ae..b5dbc1d 100644 --- a/gcc/ada/libgnat/a-exctra.adb +++ b/gcc/ada/libgnat/a-exctra.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-exctra.ads b/gcc/ada/libgnat/a-exctra.ads index 84c2f20..f46ad43 100644 --- a/gcc/ada/libgnat/a-exctra.ads +++ b/gcc/ada/libgnat/a-exctra.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-exexda.adb b/gcc/ada/libgnat/a-exexda.adb index f5cb37e..13855ac 100644 --- a/gcc/ada/libgnat/a-exexda.adb +++ b/gcc/ada/libgnat/a-exexda.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-exexpr.adb b/gcc/ada/libgnat/a-exexpr.adb index ff85bc5..ab7c98e 100644 --- a/gcc/ada/libgnat/a-exexpr.adb +++ b/gcc/ada/libgnat/a-exexpr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-exextr.adb b/gcc/ada/libgnat/a-exextr.adb index 9ef7e86..06558a8 100644 --- a/gcc/ada/libgnat/a-exextr.adb +++ b/gcc/ada/libgnat/a-exextr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-exstat.adb b/gcc/ada/libgnat/a-exstat.adb index adb199a..a3f808e 100644 --- a/gcc/ada/libgnat/a-exstat.adb +++ b/gcc/ada/libgnat/a-exstat.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-finali.adb b/gcc/ada/libgnat/a-finali.adb index 4bba140..b36a637 100644 --- a/gcc/ada/libgnat/a-finali.adb +++ b/gcc/ada/libgnat/a-finali.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-finali.ads b/gcc/ada/libgnat/a-finali.ads index ce124e3..7a8f6c1 100644 --- a/gcc/ada/libgnat/a-finali.ads +++ b/gcc/ada/libgnat/a-finali.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-ioexce.ads b/gcc/ada/libgnat/a-ioexce.ads index 7fec393..43239dd 100644 --- a/gcc/ada/libgnat/a-ioexce.ads +++ b/gcc/ada/libgnat/a-ioexce.ads @@ -13,8 +13,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package Ada.IO_Exceptions is pragma Pure; diff --git a/gcc/ada/libgnat/a-locale.adb b/gcc/ada/libgnat/a-locale.adb index 71e8557..65d673a 100644 --- a/gcc/ada/libgnat/a-locale.adb +++ b/gcc/ada/libgnat/a-locale.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-locale.ads b/gcc/ada/libgnat/a-locale.ads index 334e1f1..866f259 100644 --- a/gcc/ada/libgnat/a-locale.ads +++ b/gcc/ada/libgnat/a-locale.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- diff --git a/gcc/ada/libgnat/a-nagefl.ads b/gcc/ada/libgnat/a-nagefl.ads index 25875fa..ad2e5e3 100644 --- a/gcc/ada/libgnat/a-nagefl.ads +++ b/gcc/ada/libgnat/a-nagefl.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Generic Wrapper) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-naliop.ads b/gcc/ada/libgnat/a-naliop.ads index d5f2ecb..50a283b 100644 --- a/gcc/ada/libgnat/a-naliop.ads +++ b/gcc/ada/libgnat/a-naliop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-naliop__nolibm.ads b/gcc/ada/libgnat/a-naliop__nolibm.ads index 6482e88..75dcfd9 100644 --- a/gcc/ada/libgnat/a-naliop__nolibm.ads +++ b/gcc/ada/libgnat/a-naliop__nolibm.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nallfl.ads b/gcc/ada/libgnat/a-nallfl.ads index ef52992..db849da 100644 --- a/gcc/ada/libgnat/a-nallfl.ads +++ b/gcc/ada/libgnat/a-nallfl.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (C Math Library Version, Long Long Float) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nallfl__wraplf.ads b/gcc/ada/libgnat/a-nallfl__wraplf.ads index 582821e..364d1a5 100644 --- a/gcc/ada/libgnat/a-nallfl__wraplf.ads +++ b/gcc/ada/libgnat/a-nallfl__wraplf.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Long Long Float Wrapper in terms of Long Float) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nalofl.ads b/gcc/ada/libgnat/a-nalofl.ads index 519bf1c..e4e440b 100644 --- a/gcc/ada/libgnat/a-nalofl.ads +++ b/gcc/ada/libgnat/a-nalofl.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (C Math Library Version, Long Float) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nashfl.ads b/gcc/ada/libgnat/a-nashfl.ads index 6bb660d..17e0c5f 100644 --- a/gcc/ada/libgnat/a-nashfl.ads +++ b/gcc/ada/libgnat/a-nashfl.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Short Float Wrapper in terms of Float) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nashfl__wraplf.ads b/gcc/ada/libgnat/a-nashfl__wraplf.ads index a6ffe3d..c336b43 100644 --- a/gcc/ada/libgnat/a-nashfl__wraplf.ads +++ b/gcc/ada/libgnat/a-nashfl__wraplf.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Short Float Wrapper in terms of Long Float) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nbnbin__ghost.adb b/gcc/ada/libgnat/a-nbnbig.adb index 7d22086..fe47a6c 100644 --- a/gcc/ada/libgnat/a-nbnbin__ghost.adb +++ b/gcc/ada/libgnat/a-nbnbig.adb @@ -2,11 +2,11 @@ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- --- ADA.NUMERICS.BIG_NUMBERS.BIG_INTEGERS -- +-- ADA.NUMERICS.BIG_NUMBERS.BIG_INTEGERS_GHOST -- -- -- -- B o d y -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -33,7 +33,12 @@ -- currently does not compile instantiations of the spec with imported ghost -- generics for packages Signed_Conversions and Unsigned_Conversions. -package body Ada.Numerics.Big_Numbers.Big_Integers with +-- Ghost code in this unit is meant for analysis only, not for run-time +-- checking. This is enforced by setting the assertion policy to Ignore. + +pragma Assertion_Policy (Ghost => Ignore); + +package body Ada.Numerics.Big_Numbers.Big_Integers_Ghost with SPARK_Mode => Off is @@ -73,4 +78,4 @@ is end Unsigned_Conversions; -end Ada.Numerics.Big_Numbers.Big_Integers; +end Ada.Numerics.Big_Numbers.Big_Integers_Ghost; diff --git a/gcc/ada/libgnat/a-nbnbin__ghost.ads b/gcc/ada/libgnat/a-nbnbig.ads index 3663dd7..f574e78 100644 --- a/gcc/ada/libgnat/a-nbnbin__ghost.ads +++ b/gcc/ada/libgnat/a-nbnbig.ads @@ -2,7 +2,7 @@ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- --- ADA.NUMERICS.BIG_NUMBERS.BIG_INTEGERS -- +-- ADA.NUMERICS.BIG_NUMBERS.BIG_INTEGERS_GHOST -- -- -- -- S p e c -- -- -- @@ -13,10 +13,24 @@ -- -- ------------------------------------------------------------------------------ -package Ada.Numerics.Big_Numbers.Big_Integers with +-- This unit is provided as a replacement for the standard unit +-- Ada.Numerics.Big_Numbers.Big_Integers when only proof with SPARK is +-- intended. It cannot be used for execution, as all subprograms are marked +-- imported with no definition. + +-- Contrary to Ada.Numerics.Big_Numbers.Big_Integers, this unit does not +-- depend on System or Ada.Finalization, which makes it more convenient for +-- use in run-time units. + +-- Ghost code in this unit is meant for analysis only, not for run-time +-- checking. This is enforced by setting the assertion policy to Ignore. + +pragma Assertion_Policy (Ghost => Ignore); + +package Ada.Numerics.Big_Numbers.Big_Integers_Ghost with SPARK_Mode, Ghost, - Preelaborate + Pure is type Big_Integer is private with Integer_Literal => From_Universal_Image; @@ -199,4 +213,4 @@ private type Big_Integer is null record; -end Ada.Numerics.Big_Numbers.Big_Integers; +end Ada.Numerics.Big_Numbers.Big_Integers_Ghost; diff --git a/gcc/ada/libgnat/a-nbnbin.adb b/gcc/ada/libgnat/a-nbnbin.adb index fe41cf1..6171d99 100644 --- a/gcc/ada/libgnat/a-nbnbin.adb +++ b/gcc/ada/libgnat/a-nbnbin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nbnbin__gmp.adb b/gcc/ada/libgnat/a-nbnbin__gmp.adb index 1516f49..494844e 100644 --- a/gcc/ada/libgnat/a-nbnbin__gmp.adb +++ b/gcc/ada/libgnat/a-nbnbin__gmp.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nbnbre.adb b/gcc/ada/libgnat/a-nbnbre.adb index e45bc6d..9cdc0f5 100644 --- a/gcc/ada/libgnat/a-nbnbre.adb +++ b/gcc/ada/libgnat/a-nbnbre.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -441,8 +441,8 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is if Str = "" then return Leading_Padding ("0", Min_Length, Char); else - return (1 .. Integer'Max (Integer (Min_Length) - Str'Length, 0) - => Char) & Str; + return [1 .. Integer'Max (Integer (Min_Length) - Str'Length, 0) + => Char] & Str; end if; end Leading_Padding; @@ -468,8 +468,8 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is return Str (Str'First .. Str'First + Length - 1); else return Str & - (1 .. Integer'Max (Integer (Length) - Str'Length, 0) - => Char); + [1 .. Integer'Max (Integer (Length) - Str'Length, 0) + => Char]; end if; end Trailing_Padding; @@ -495,7 +495,7 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is if Index < 0 then return Leading_Padding ("0", Fore) & "." - & Trailing_Padding ((1 .. -Index => '0') & Str, Aft) + & Trailing_Padding ([1 .. -Index => '0'] & Str, Aft) & (if Exp = 0 then "" else "E+" & Image (Natural (Exp))); else return Leading_Padding (Str (Str'First .. Index), Fore) diff --git a/gcc/ada/libgnat/a-ngcefu.adb b/gcc/ada/libgnat/a-ngcefu.adb index 50abfb2..eccb560 100644 --- a/gcc/ada/libgnat/a-ngcefu.adb +++ b/gcc/ada/libgnat/a-ngcefu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ngcoar.adb b/gcc/ada/libgnat/a-ngcoar.adb index ed9be6a..8dfbc3b 100644 --- a/gcc/ada/libgnat/a-ngcoar.adb +++ b/gcc/ada/libgnat/a-ngcoar.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2006-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,6 +29,17 @@ -- -- ------------------------------------------------------------------------------ +-- Preconditions, postconditions, ghost code, loop invariants and assertions +-- in this unit are meant for analysis only, not for run-time checking, as it +-- would be too costly otherwise. This is enforced by setting the assertion +-- policy to Ignore. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + with System.Generic_Array_Operations; use System.Generic_Array_Operations; package body Ada.Numerics.Generic_Complex_Arrays is diff --git a/gcc/ada/libgnat/a-ngcoty.adb b/gcc/ada/libgnat/a-ngcoty.adb index d9a88e8..a4647ca 100644 --- a/gcc/ada/libgnat/a-ngcoty.adb +++ b/gcc/ada/libgnat/a-ngcoty.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ngcoty.ads b/gcc/ada/libgnat/a-ngcoty.ads index 71a6123..4bce58e 100644 --- a/gcc/ada/libgnat/a-ngcoty.ads +++ b/gcc/ada/libgnat/a-ngcoty.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-ngelfu.adb b/gcc/ada/libgnat/a-ngelfu.adb index d9de09c..ed2b544 100644 --- a/gcc/ada/libgnat/a-ngelfu.adb +++ b/gcc/ada/libgnat/a-ngelfu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ngelfu.ads b/gcc/ada/libgnat/a-ngelfu.ads index 523e64f..c8a31bb 100644 --- a/gcc/ada/libgnat/a-ngelfu.ads +++ b/gcc/ada/libgnat/a-ngelfu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2012-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-ngrear.adb b/gcc/ada/libgnat/a-ngrear.adb index 820e6f7..9cfd956 100644 --- a/gcc/ada/libgnat/a-ngrear.adb +++ b/gcc/ada/libgnat/a-ngrear.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2006-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -36,6 +36,17 @@ -- BLAS/LAPACK implementation. Finally, on some platforms there are more -- floating point types than supported by BLAS/LAPACK. +-- Preconditions, postconditions, ghost code, loop invariants and assertions +-- in this unit are meant for analysis only, not for run-time checking, as it +-- would be too costly otherwise. This is enforced by setting the assertion +-- policy to Ignore. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + with Ada.Containers.Generic_Anonymous_Array_Sort; use Ada.Containers; with System; use System; @@ -614,7 +625,7 @@ package body Ada.Numerics.Generic_Real_Arrays is -- different bounds, so take care indexing elements. Assignment -- as a whole is fine as sliding is automatic in that case. - Vectors := (if not Compute_Vectors then (1 .. 0 => (1 .. 0 => 0.0)) + Vectors := (if not Compute_Vectors then [1 .. 0 => [1 .. 0 => 0.0]] else Unit_Matrix (Vectors'Length (1), Vectors'Length (2))); Values := Diagonal (M); @@ -637,7 +648,7 @@ package body Ada.Numerics.Generic_Real_Arrays is -- an absolute value that exceeds the threshold. Diag := Values; - Diag_Adj := (others => 0.0); -- Accumulates adjustments to Diag + Diag_Adj := [others => 0.0]; -- Accumulates adjustments to Diag for Row in 1 .. N - 1 loop for Col in Row + 1 .. N loop diff --git a/gcc/ada/libgnat/a-ngrear.ads b/gcc/ada/libgnat/a-ngrear.ads index 6e3f854..b2923ff 100644 --- a/gcc/ada/libgnat/a-ngrear.ads +++ b/gcc/ada/libgnat/a-ngrear.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-nuauco.ads b/gcc/ada/libgnat/a-nuauco.ads index 164d4b8..3c5e4d5 100644 --- a/gcc/ada/libgnat/a-nuauco.ads +++ b/gcc/ada/libgnat/a-nuauco.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nuauco__x86.ads b/gcc/ada/libgnat/a-nuauco__x86.ads index 7901782..380e6f2 100644 --- a/gcc/ada/libgnat/a-nuauco__x86.ads +++ b/gcc/ada/libgnat/a-nuauco__x86.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nuaufl.ads b/gcc/ada/libgnat/a-nuaufl.ads index 1c19912..e38ebb5 100644 --- a/gcc/ada/libgnat/a-nuaufl.ads +++ b/gcc/ada/libgnat/a-nuaufl.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (C Math Library Version, Float) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nuaufl__wraplf.ads b/gcc/ada/libgnat/a-nuaufl__wraplf.ads index 3318a10..ca4bdb9 100644 --- a/gcc/ada/libgnat/a-nuaufl__wraplf.ads +++ b/gcc/ada/libgnat/a-nuaufl__wraplf.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Double-based Version, Float) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nudira.adb b/gcc/ada/libgnat/a-nudira.adb index dff1013..4ff4e19 100644 --- a/gcc/ada/libgnat/a-nudira.adb +++ b/gcc/ada/libgnat/a-nudira.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nudira.ads b/gcc/ada/libgnat/a-nudira.ads index 9496043..1855877 100644 --- a/gcc/ada/libgnat/a-nudira.ads +++ b/gcc/ada/libgnat/a-nudira.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-nuflra.adb b/gcc/ada/libgnat/a-nuflra.adb index 1ec38ac..9a217fa 100644 --- a/gcc/ada/libgnat/a-nuflra.adb +++ b/gcc/ada/libgnat/a-nuflra.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-nuflra.ads b/gcc/ada/libgnat/a-nuflra.ads index 350faeb..6cd64af 100644 --- a/gcc/ada/libgnat/a-nuflra.ads +++ b/gcc/ada/libgnat/a-nuflra.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-numaux.ads b/gcc/ada/libgnat/a-numaux.ads index de952a8..9e95f64 100644 --- a/gcc/ada/libgnat/a-numaux.ads +++ b/gcc/ada/libgnat/a-numaux.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-rbtgbk.adb b/gcc/ada/libgnat/a-rbtgbk.adb index 1c0d5d8..68fe7f0 100644 --- a/gcc/ada/libgnat/a-rbtgbk.adb +++ b/gcc/ada/libgnat/a-rbtgbk.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-rbtgbk.ads b/gcc/ada/libgnat/a-rbtgbk.ads index cd18fdc..c7a742d 100644 --- a/gcc/ada/libgnat/a-rbtgbk.ads +++ b/gcc/ada/libgnat/a-rbtgbk.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-rbtgbo.adb b/gcc/ada/libgnat/a-rbtgbo.adb index f92191e..c077788 100644 --- a/gcc/ada/libgnat/a-rbtgbo.adb +++ b/gcc/ada/libgnat/a-rbtgbo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-rbtgbo.ads b/gcc/ada/libgnat/a-rbtgbo.ads index 4d2c655..97c0ee0 100644 --- a/gcc/ada/libgnat/a-rbtgbo.ads +++ b/gcc/ada/libgnat/a-rbtgbo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-rbtgso.adb b/gcc/ada/libgnat/a-rbtgso.adb index 22f5603..cbf18dd 100644 --- a/gcc/ada/libgnat/a-rbtgso.adb +++ b/gcc/ada/libgnat/a-rbtgso.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-rbtgso.ads b/gcc/ada/libgnat/a-rbtgso.ads index 1e80ed5..970e7a6 100644 --- a/gcc/ada/libgnat/a-rbtgso.ads +++ b/gcc/ada/libgnat/a-rbtgso.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-sbecin.adb b/gcc/ada/libgnat/a-sbecin.adb index ebbdc7f..06b6865 100644 --- a/gcc/ada/libgnat/a-sbecin.adb +++ b/gcc/ada/libgnat/a-sbecin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-sbecin.ads b/gcc/ada/libgnat/a-sbecin.ads index 6061e9e..d17247d 100644 --- a/gcc/ada/libgnat/a-sbecin.ads +++ b/gcc/ada/libgnat/a-sbecin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-sbhcin.adb b/gcc/ada/libgnat/a-sbhcin.adb index f2994f9..22478e7 100644 --- a/gcc/ada/libgnat/a-sbhcin.adb +++ b/gcc/ada/libgnat/a-sbhcin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-sbhcin.ads b/gcc/ada/libgnat/a-sbhcin.ads index d067b61..2f55e46 100644 --- a/gcc/ada/libgnat/a-sbhcin.ads +++ b/gcc/ada/libgnat/a-sbhcin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-sblcin.adb b/gcc/ada/libgnat/a-sblcin.adb index 14b3b4c..e568085 100644 --- a/gcc/ada/libgnat/a-sblcin.adb +++ b/gcc/ada/libgnat/a-sblcin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-sblcin.ads b/gcc/ada/libgnat/a-sblcin.ads index e9f5f20..c87b962 100644 --- a/gcc/ada/libgnat/a-sblcin.ads +++ b/gcc/ada/libgnat/a-sblcin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-secain.adb b/gcc/ada/libgnat/a-secain.adb index bf80383..30f236a 100644 --- a/gcc/ada/libgnat/a-secain.adb +++ b/gcc/ada/libgnat/a-secain.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-secain.ads b/gcc/ada/libgnat/a-secain.ads index e376660..4146435 100644 --- a/gcc/ada/libgnat/a-secain.ads +++ b/gcc/ada/libgnat/a-secain.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-sequio.adb b/gcc/ada/libgnat/a-sequio.adb index 99e5e59..2de0125 100644 --- a/gcc/ada/libgnat/a-sequio.adb +++ b/gcc/ada/libgnat/a-sequio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-sequio.ads b/gcc/ada/libgnat/a-sequio.ads index 34d3b25..f232874 100644 --- a/gcc/ada/libgnat/a-sequio.ads +++ b/gcc/ada/libgnat/a-sequio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-sfecin.ads b/gcc/ada/libgnat/a-sfecin.ads index c476d78..69c30c1 100644 --- a/gcc/ada/libgnat/a-sfecin.ads +++ b/gcc/ada/libgnat/a-sfecin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-sfhcin.ads b/gcc/ada/libgnat/a-sfhcin.ads index 0d253a0..e132478 100644 --- a/gcc/ada/libgnat/a-sfhcin.ads +++ b/gcc/ada/libgnat/a-sfhcin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-sflcin.ads b/gcc/ada/libgnat/a-sflcin.ads index 712ed2f..2cb42f2 100644 --- a/gcc/ada/libgnat/a-sflcin.ads +++ b/gcc/ada/libgnat/a-sflcin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-shcain.adb b/gcc/ada/libgnat/a-shcain.adb index 9432a07..19a0f92 100644 --- a/gcc/ada/libgnat/a-shcain.adb +++ b/gcc/ada/libgnat/a-shcain.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-shcain.ads b/gcc/ada/libgnat/a-shcain.ads index 8ba2551..a62d3c6 100644 --- a/gcc/ada/libgnat/a-shcain.ads +++ b/gcc/ada/libgnat/a-shcain.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-siocst.adb b/gcc/ada/libgnat/a-siocst.adb index e830621..0859fe4 100644 --- a/gcc/ada/libgnat/a-siocst.adb +++ b/gcc/ada/libgnat/a-siocst.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-siocst.ads b/gcc/ada/libgnat/a-siocst.ads index 88713b9..0bd87f7 100644 --- a/gcc/ada/libgnat/a-siocst.ads +++ b/gcc/ada/libgnat/a-siocst.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-slcain.adb b/gcc/ada/libgnat/a-slcain.adb index 141757b..e8634ca 100644 --- a/gcc/ada/libgnat/a-slcain.adb +++ b/gcc/ada/libgnat/a-slcain.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-slcain.ads b/gcc/ada/libgnat/a-slcain.ads index a015993..7620319 100644 --- a/gcc/ada/libgnat/a-slcain.ads +++ b/gcc/ada/libgnat/a-slcain.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ssicst.adb b/gcc/ada/libgnat/a-ssicst.adb index 03da997..748fe7c 100644 --- a/gcc/ada/libgnat/a-ssicst.adb +++ b/gcc/ada/libgnat/a-ssicst.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ssicst.ads b/gcc/ada/libgnat/a-ssicst.ads index 9233fb7..9cb03c3 100644 --- a/gcc/ada/libgnat/a-ssicst.ads +++ b/gcc/ada/libgnat/a-ssicst.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stboha.adb b/gcc/ada/libgnat/a-stboha.adb index b551587..ce2963c 100644 --- a/gcc/ada/libgnat/a-stboha.adb +++ b/gcc/ada/libgnat/a-stboha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stbubo.adb b/gcc/ada/libgnat/a-stbubo.adb index a3e0e32..c1c73da 100644 --- a/gcc/ada/libgnat/a-stbubo.adb +++ b/gcc/ada/libgnat/a-stbubo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -90,10 +90,10 @@ package body Ada.Strings.Text_Buffers.Bounded is -- If this aggregate becomes illegal due to new field, don't -- forget to add corresponding assignment statement below. Dummy : array (1 .. 0) of Buffer_Type (0) := - (others => - (Max_Characters => 0, Chars => <>, Indentation => <>, + [others => + [Max_Characters => 0, Chars => <>, Indentation => <>, Indent_Pending => <>, UTF_8_Length => <>, UTF_8_Column => <>, - All_7_Bits => <>, All_8_Bits => <>, Truncated => <>)); + All_7_Bits => <>, All_8_Bits => <>, Truncated => <>]]; begin Buffer.Indentation := Defaulted.Indentation; Buffer.Indent_Pending := Defaulted.Indent_Pending; diff --git a/gcc/ada/libgnat/a-stbubo.ads b/gcc/ada/libgnat/a-stbubo.ads index aef7ccf..8975e73 100644 --- a/gcc/ada/libgnat/a-stbubo.ads +++ b/gcc/ada/libgnat/a-stbubo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- diff --git a/gcc/ada/libgnat/a-stbufi.adb b/gcc/ada/libgnat/a-stbufi.adb index 656e7bd..6e9402a 100644 --- a/gcc/ada/libgnat/a-stbufi.adb +++ b/gcc/ada/libgnat/a-stbufi.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stbufi.ads b/gcc/ada/libgnat/a-stbufi.ads index b9444ab..ac2591b 100644 --- a/gcc/ada/libgnat/a-stbufi.ads +++ b/gcc/ada/libgnat/a-stbufi.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stbufo.adb b/gcc/ada/libgnat/a-stbufo.adb index 8ac5512..72732b9 100644 --- a/gcc/ada/libgnat/a-stbufo.adb +++ b/gcc/ada/libgnat/a-stbufo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -42,7 +42,7 @@ package body Ada.Strings.Text_Buffers.Formatting is X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "") is J : Positive := T'First; - Used : array (1 .. 9) of Boolean := (others => False); + Used : array (1 .. 9) of Boolean := [others => False]; begin while J <= T'Last loop if T (J) = '\' then diff --git a/gcc/ada/libgnat/a-stbufo.ads b/gcc/ada/libgnat/a-stbufo.ads index 8c0d476..ead3a13 100644 --- a/gcc/ada/libgnat/a-stbufo.ads +++ b/gcc/ada/libgnat/a-stbufo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stbuun.adb b/gcc/ada/libgnat/a-stbuun.adb index 9ae3d28..e9ea528 100644 --- a/gcc/ada/libgnat/a-stbuun.adb +++ b/gcc/ada/libgnat/a-stbuun.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -103,10 +103,10 @@ package body Ada.Strings.Text_Buffers.Unbounded is -- If this aggregate becomes illegal due to new field, don't -- forget to add corresponding assignment statement below. Dummy : array (1 .. 0) of Buffer_Type := - (others => - (Indentation => <>, Indent_Pending => <>, UTF_8_Length => <>, + [others => + [Indentation => <>, Indent_Pending => <>, UTF_8_Length => <>, UTF_8_Column => <>, All_7_Bits => <>, All_8_Bits => <>, - List => <>, Last_Used => <>)); + List => <>, Last_Used => <>]]; begin Buffer.Indentation := Defaulted.Indentation; Buffer.Indent_Pending := Defaulted.Indent_Pending; diff --git a/gcc/ada/libgnat/a-stbuut.adb b/gcc/ada/libgnat/a-stbuut.adb index b32b2d3..1fb260b 100644 --- a/gcc/ada/libgnat/a-stbuut.adb +++ b/gcc/ada/libgnat/a-stbuut.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -35,28 +35,28 @@ package body Ada.Strings.Text_Buffers.Utils is (Buffer : in out Root_Buffer_Type'Class; Item : Character_7) is begin - Put (Buffer, (1 => Item)); + Put (Buffer, [Item]); end Put_7bit; procedure Put_Character (Buffer : in out Root_Buffer_Type'Class; Item : Character) is begin - Put (Buffer, (1 => Item)); + Put (Buffer, [Item]); end Put_Character; procedure Put_Wide_Character (Buffer : in out Root_Buffer_Type'Class; Item : Wide_Character) is begin - Wide_Put (Buffer, (1 => Item)); + Wide_Put (Buffer, [Item]); end Put_Wide_Character; procedure Put_Wide_Wide_Character (Buffer : in out Root_Buffer_Type'Class; Item : Wide_Wide_Character) is begin - Wide_Wide_Put (Buffer, (1 => Item)); + Wide_Wide_Put (Buffer, [Item]); end Put_Wide_Wide_Character; procedure Put_UTF_8_Lines diff --git a/gcc/ada/libgnat/a-stbuut.ads b/gcc/ada/libgnat/a-stbuut.ads index d76b8cf..4fa3eb4 100644 --- a/gcc/ada/libgnat/a-stbuut.ads +++ b/gcc/ada/libgnat/a-stbuut.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stmaco.ads b/gcc/ada/libgnat/a-stmaco.ads index 4d280ec..5cda7acc 100644 --- a/gcc/ada/libgnat/a-stmaco.ads +++ b/gcc/ada/libgnat/a-stmaco.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -64,37 +64,37 @@ private package L renames Ada.Characters.Latin_1; Control_Set : constant Character_Set := - (L.NUL .. L.US => True, + [L.NUL .. L.US => True, L.DEL .. L.APC => True, - others => False); + others => False]; Graphic_Set : constant Character_Set := - (L.Space .. L.Tilde => True, + [L.Space .. L.Tilde => True, L.No_Break_Space .. L.LC_Y_Diaeresis => True, - others => False); + others => False]; Letter_Set : constant Character_Set := - ('A' .. 'Z' => True, + ['A' .. 'Z' => True, L.LC_A .. L.LC_Z => True, L.UC_A_Grave .. L.UC_O_Diaeresis => True, L.UC_O_Oblique_Stroke .. L.LC_O_Diaeresis => True, L.LC_O_Oblique_Stroke .. L.LC_Y_Diaeresis => True, - others => False); + others => False]; Lower_Set : constant Character_Set := - (L.LC_A .. L.LC_Z => True, + [L.LC_A .. L.LC_Z => True, L.LC_German_Sharp_S .. L.LC_O_Diaeresis => True, L.LC_O_Oblique_Stroke .. L.LC_Y_Diaeresis => True, - others => False); + others => False]; Upper_Set : constant Character_Set := - ('A' .. 'Z' => True, + ['A' .. 'Z' => True, L.UC_A_Grave .. L.UC_O_Diaeresis => True, L.UC_O_Oblique_Stroke .. L.UC_Icelandic_Thorn => True, - others => False); + others => False]; Basic_Set : constant Character_Set := - ('A' .. 'Z' => True, + ['A' .. 'Z' => True, L.LC_A .. L.LC_Z => True, L.UC_AE_Diphthong .. L.UC_AE_Diphthong => True, L.LC_AE_Diphthong .. L.LC_AE_Diphthong => True, @@ -103,40 +103,40 @@ private L.LC_Icelandic_Thorn .. L.LC_Icelandic_Thorn => True, L.UC_Icelandic_Eth .. L.UC_Icelandic_Eth => True, L.LC_Icelandic_Eth .. L.LC_Icelandic_Eth => True, - others => False); + others => False]; Decimal_Digit_Set : constant Character_Set := - ('0' .. '9' => True, - others => False); + ['0' .. '9' => True, + others => False]; Hexadecimal_Digit_Set : constant Character_Set := - ('0' .. '9' => True, + ['0' .. '9' => True, 'A' .. 'F' => True, L.LC_A .. L.LC_F => True, - others => False); + others => False]; Alphanumeric_Set : constant Character_Set := - ('0' .. '9' => True, + ['0' .. '9' => True, 'A' .. 'Z' => True, L.LC_A .. L.LC_Z => True, L.UC_A_Grave .. L.UC_O_Diaeresis => True, L.UC_O_Oblique_Stroke .. L.LC_O_Diaeresis => True, L.LC_O_Oblique_Stroke .. L.LC_Y_Diaeresis => True, - others => False); + others => False]; Special_Set : constant Character_Set := - (L.Space .. L.Solidus => True, + [L.Space .. L.Solidus => True, L.Colon .. L.Commercial_At => True, L.Left_Square_Bracket .. L.Grave => True, L.Left_Curly_Bracket .. L.Tilde => True, L.No_Break_Space .. L.Inverted_Question => True, L.Multiplication_Sign .. L.Multiplication_Sign => True, L.Division_Sign .. L.Division_Sign => True, - others => False); + others => False]; ISO_646_Set : constant Character_Set := - (L.NUL .. L.DEL => True, - others => False); + [L.NUL .. L.DEL => True, + others => False]; Lower_Case_Map : constant Character_Mapping := (L.NUL & -- NUL 0 diff --git a/gcc/ada/libgnat/a-storio.adb b/gcc/ada/libgnat/a-storio.adb index 424526d..4d6f90c 100644 --- a/gcc/ada/libgnat/a-storio.adb +++ b/gcc/ada/libgnat/a-storio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-strbou.adb b/gcc/ada/libgnat/a-strbou.adb index 01a2002..4adc7d9 100644 --- a/gcc/ada/libgnat/a-strbou.adb +++ b/gcc/ada/libgnat/a-strbou.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-strbou.ads b/gcc/ada/libgnat/a-strbou.ads index e820184..a9ee3b2 100644 --- a/gcc/ada/libgnat/a-strbou.ads +++ b/gcc/ada/libgnat/a-strbou.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -2202,7 +2202,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Slice (Head'Result, 1, Length (Source)) = To_String (Source) and then Slice (Head'Result, Length (Source) + 1, Count) = - (1 .. Count - Length (Source) => Pad), + [1 .. Count - Length (Source) => Pad], Count > Max_Length and then Drop = Right => @@ -2213,13 +2213,13 @@ package Ada.Strings.Bounded with SPARK_Mode is Slice (Head'Result, 1, Length (Source)) = To_String (Source) and then Slice (Head'Result, Length (Source) + 1, Max_Length) = - (1 .. Max_Length - Length (Source) => Pad), + [1 .. Max_Length - Length (Source) => Pad], Count - Length (Source) > Max_Length and then Drop = Left => -- Source is fully dropped at the left - To_String (Head'Result) = (1 .. Max_Length => Pad), + To_String (Head'Result) = [1 .. Max_Length => Pad], others => @@ -2232,7 +2232,7 @@ package Ada.Strings.Bounded with SPARK_Mode is and then Slice (Head'Result, Max_Length - Count + Length (Source) + 1, Max_Length) = - (1 .. Count - Length (Source) => Pad)); + [1 .. Count - Length (Source) => Pad]); procedure Head (Source : in out Bounded_String; @@ -2258,7 +2258,7 @@ package Ada.Strings.Bounded with SPARK_Mode is To_String (Source'Old) and then Slice (Source, Length (Source'Old) + 1, Count) = - (1 .. Count - Length (Source'Old) => Pad), + [1 .. Count - Length (Source'Old) => Pad], Count > Max_Length and then Drop = Right => @@ -2270,13 +2270,13 @@ package Ada.Strings.Bounded with SPARK_Mode is To_String (Source'Old) and then Slice (Source, Length (Source'Old) + 1, Max_Length) = - (1 .. Max_Length - Length (Source'Old) => Pad), + [1 .. Max_Length - Length (Source'Old) => Pad], Count - Length (Source) > Max_Length and then Drop = Left => -- Source is fully dropped on the left - To_String (Source) = (1 .. Max_Length => Pad), + To_String (Source) = [1 .. Max_Length => Pad], others => @@ -2290,7 +2290,7 @@ package Ada.Strings.Bounded with SPARK_Mode is and then Slice (Source, Max_Length - Count + Length (Source'Old) + 1, Max_Length) = - (1 .. Count - Length (Source'Old) => Pad)); + [1 .. Count - Length (Source'Old) => Pad]); function Tail (Source : Bounded_String; @@ -2316,7 +2316,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Length (Tail'Result) = Count and then Slice (Tail'Result, 1, Count - Length (Source)) = - (1 .. Count - Length (Source) => Pad) + [1 .. Count - Length (Source) => Pad] and then Slice (Tail'Result, Count - Length (Source) + 1, Count) = To_String (Source), @@ -2328,7 +2328,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Length (Tail'Result) = Max_Length and then Slice (Tail'Result, 1, Max_Length - Length (Source)) = - (1 .. Max_Length - Length (Source) => Pad) + [1 .. Max_Length - Length (Source) => Pad] and then (if Length (Source) > 0 then Slice (Tail'Result, @@ -2339,7 +2339,7 @@ package Ada.Strings.Bounded with SPARK_Mode is => -- Source is fully dropped on the right - To_String (Tail'Result) = (1 .. Max_Length => Pad), + To_String (Tail'Result) = [1 .. Max_Length => Pad], others => @@ -2348,7 +2348,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Length (Tail'Result) = Max_Length and then Slice (Tail'Result, 1, Count - Length (Source)) = - (1 .. Count - Length (Source) => Pad) + [1 .. Count - Length (Source) => Pad] and then Slice (Tail'Result, Count - Length (Source) + 1, Max_Length) = Slice (Source, 1, Max_Length - Count + Length (Source))); @@ -2378,7 +2378,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Length (Source) = Count and then Slice (Source, 1, Count - Length (Source'Old)) = - (1 .. Count - Length (Source'Old) => Pad) + [1 .. Count - Length (Source'Old) => Pad] and then Slice (Source, Count - Length (Source'Old) + 1, Count) = To_String (Source'Old), @@ -2390,7 +2390,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Length (Source) = Max_Length and then Slice (Source, 1, Max_Length - Length (Source'Old)) = - (1 .. Max_Length - Length (Source'Old) => Pad) + [1 .. Max_Length - Length (Source'Old) => Pad] and then (if Length (Source'Old) > 0 then Slice (Source, @@ -2401,7 +2401,7 @@ package Ada.Strings.Bounded with SPARK_Mode is => -- Source is fully dropped at the right - To_String (Source) = (1 .. Max_Length => Pad), + To_String (Source) = [1 .. Max_Length => Pad], others => @@ -2410,7 +2410,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Length (Source) = Max_Length and then Slice (Source, 1, Count - Length (Source'Old)) = - (1 .. Count - Length (Source'Old) => Pad) + [1 .. Count - Length (Source'Old) => Pad] and then Slice (Source, Count - Length (Source'Old) + 1, Max_Length) = Slice (Source'Old, @@ -2425,7 +2425,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Right : Character) return Bounded_String with Pre => Left <= Max_Length, - Post => To_String ("*"'Result) = (1 .. Left => Right); + Post => To_String ("*"'Result) = [1 .. Left => Right]; function "*" (Left : Natural; @@ -2461,7 +2461,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Pre => (if Count > Max_Length then Drop /= Error), Post => To_String (Replicate'Result) = - (1 .. Natural'Min (Max_Length, Count) => Item); + [1 .. Natural'Min (Max_Length, Count) => Item]; function Replicate (Count : Natural; @@ -2565,7 +2565,7 @@ package Ada.Strings.Bounded with SPARK_Mode is (Max_Length => Max_Length, Current_Length => 0, Data => - (1 .. Max_Length => ASCII.NUL)); + [1 .. Max_Length => ASCII.NUL]); pragma Inline (To_Bounded_String); diff --git a/gcc/ada/libgnat/a-stream.adb b/gcc/ada/libgnat/a-stream.adb index a7ef308..ec4d718 100644 --- a/gcc/ada/libgnat/a-stream.adb +++ b/gcc/ada/libgnat/a-stream.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2013-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-stream.ads b/gcc/ada/libgnat/a-stream.ads index a88d44f..46e46f6 100644 --- a/gcc/ada/libgnat/a-stream.ads +++ b/gcc/ada/libgnat/a-stream.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-strfix.adb b/gcc/ada/libgnat/a-strfix.adb index 31dea6c..7475254 100644 --- a/gcc/ada/libgnat/a-strfix.adb +++ b/gcc/ada/libgnat/a-strfix.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -370,7 +370,7 @@ package body Ada.Strings.Fixed with SPARK_Mode is Before : Positive; New_Item : String) return String is - Front : constant Integer := Before - Source'First; + Front : constant Integer := Before - Source'First; begin if Before - 1 not in Source'First - 1 .. Source'Last then @@ -384,6 +384,10 @@ package body Ada.Strings.Fixed with SPARK_Mode is Source (Source'First .. Before - 1); Result (Front + 1 .. Front + New_Item'Length) := New_Item; + + pragma Assert + (Result (1 .. Before - Source'First) + = Source (Source'First .. Before - 1)); pragma Assert (Result (Before - Source'First + 1 @@ -558,15 +562,21 @@ package body Ada.Strings.Fixed with SPARK_Mode is if Position <= Source'Last - New_Item'Length then Result (Front + New_Item'Length + 1 .. Result'Last) := Source (Position + New_Item'Length .. Source'Last); + + pragma Assert + (Result + (Position - Source'First + New_Item'Length + 1 + .. Result'Last) + = Source (Position + New_Item'Length .. Source'Last)); end if; pragma Assert (if Position <= Source'Last - New_Item'Length then Result - (Position - Source'First + New_Item'Length + 1 - .. Result'Last) - = Source (Position + New_Item'Length .. Source'Last)); + (Position - Source'First + New_Item'Length + 1 + .. Result'Last) + = Source (Position + New_Item'Length .. Source'Last)); end return; end; end Overwrite; diff --git a/gcc/ada/libgnat/a-strfix.ads b/gcc/ada/libgnat/a-strfix.ads index 1d9fd1b..0d6c5d0 100644 --- a/gcc/ada/libgnat/a-strfix.ads +++ b/gcc/ada/libgnat/a-strfix.ads @@ -1258,7 +1258,7 @@ package Ada.Strings.Fixed with SPARK_Mode is Head'Result (1 .. Source'Length) = Source and then Head'Result (Source'Length + 1 .. Count) - = (1 .. Count - Source'Length => Pad)), + = [1 .. Count - Source'Length => Pad]), Global => null; -- Returns a string of length Count. If Count <= Source'Length, the string -- comprises the first Count characters of Source. Otherwise, its contents @@ -1315,10 +1315,10 @@ package Ada.Strings.Fixed with SPARK_Mode is -- characters. (if Source'Length = 0 - then Tail'Result = (1 .. Count => Pad) + then Tail'Result = [1 .. Count => Pad] else Tail'Result (1 .. Count - Source'Length) - = (1 .. Count - Source'Length => Pad) + = [1 .. Count - Source'Length => Pad] and then Tail'Result (Count - Source'Length + 1 .. Tail'Result'Last) = Source)), diff --git a/gcc/ada/libgnat/a-strhas.adb b/gcc/ada/libgnat/a-strhas.adb index 1732941..624d912 100644 --- a/gcc/ada/libgnat/a-strhas.adb +++ b/gcc/ada/libgnat/a-strhas.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-strhas.ads b/gcc/ada/libgnat/a-strhas.ads index 2411a52..0a6d671 100644 --- a/gcc/ada/libgnat/a-strhas.ads +++ b/gcc/ada/libgnat/a-strhas.ads @@ -13,8 +13,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with Ada.Containers; function Ada.Strings.Hash (Key : String) return Containers.Hash_Type; diff --git a/gcc/ada/libgnat/a-strmap.adb b/gcc/ada/libgnat/a-strmap.adb index c87f4e5..77780f9 100644 --- a/gcc/ada/libgnat/a-strmap.adb +++ b/gcc/ada/libgnat/a-strmap.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -135,7 +135,7 @@ is J : Natural; type Character_Index is array (Character) of Natural with Ghost; - Indexes : Character_Index := (others => 0) with Ghost; + Indexes : Character_Index := [others => 0] with Ghost; begin J := 0; @@ -367,7 +367,7 @@ is Domain : String (1 .. Map'Length) with Ghost, Relaxed_Initialization; type Character_Index is array (Character) of Natural with Ghost; - Indexes : Character_Index := (others => 0) with Ghost; + Indexes : Character_Index := [others => 0] with Ghost; -- Start of processing for To_Range diff --git a/gcc/ada/libgnat/a-strmap.ads b/gcc/ada/libgnat/a-strmap.ads index 1a15d5d..476f772 100644 --- a/gcc/ada/libgnat/a-strmap.ads +++ b/gcc/ada/libgnat/a-strmap.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -376,7 +376,7 @@ private -- the defined operations in the spec, but the operations defined -- on Character_Set_Internal remain visible. - Null_Set : constant Character_Set := (others => False); + Null_Set : constant Character_Set := [others => False]; type Character_Mapping is array (Character) of Character; diff --git a/gcc/ada/libgnat/a-strsea.adb b/gcc/ada/libgnat/a-strsea.adb index 243c92c..71a415f 100644 --- a/gcc/ada/libgnat/a-strsea.adb +++ b/gcc/ada/libgnat/a-strsea.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-strsea.ads b/gcc/ada/libgnat/a-strsea.ads index f4e7d36..157c6f3 100644 --- a/gcc/ada/libgnat/a-strsea.ads +++ b/gcc/ada/libgnat/a-strsea.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-strsto.ads b/gcc/ada/libgnat/a-strsto.ads index 2c6fa7d..7c7ad99 100644 --- a/gcc/ada/libgnat/a-strsto.ads +++ b/gcc/ada/libgnat/a-strsto.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-strsup.adb b/gcc/ada/libgnat/a-strsup.adb index a94d6ca..2c1b459 100644 --- a/gcc/ada/libgnat/a-strsup.adb +++ b/gcc/ada/libgnat/a-strsup.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -844,7 +844,7 @@ package body Ada.Strings.Superbounded with SPARK_Mode is elsif Count <= Max_Length then Result.Data (1 .. Slen) := Source.Data (1 .. Slen); - Result.Data (Slen + 1 .. Count) := (others => Pad); + Result.Data (Slen + 1 .. Count) := [others => Pad]; Result.Current_Length := Count; else @@ -853,18 +853,18 @@ package body Ada.Strings.Superbounded with SPARK_Mode is Result.Data (1 .. Slen) := Source.Data (1 .. Slen); if Slen < Max_Length then - Result.Data (Slen + 1 .. Max_Length) := (others => Pad); + Result.Data (Slen + 1 .. Max_Length) := [others => Pad]; end if; when Strings.Left => if Npad >= Max_Length then - Result.Data := (others => Pad); + Result.Data := [others => Pad]; else Result.Data (1 .. Max_Length - Npad) := Source.Data (Count - Max_Length + 1 .. Slen); Result.Data (Max_Length - Npad + 1 .. Max_Length) := - (others => Pad); + [others => Pad]; end if; when Strings.Error => @@ -893,26 +893,26 @@ package body Ada.Strings.Superbounded with SPARK_Mode is Source.Current_Length := Count; elsif Count <= Max_Length then - Source.Data (Slen + 1 .. Count) := (others => Pad); + Source.Data (Slen + 1 .. Count) := [others => Pad]; Source.Current_Length := Count; else case Drop is when Strings.Right => if Slen < Max_Length then - Source.Data (Slen + 1 .. Max_Length) := (others => Pad); + Source.Data (Slen + 1 .. Max_Length) := [others => Pad]; end if; when Strings.Left => if Npad > Max_Length then - Source.Data := (others => Pad); + Source.Data := [others => Pad]; else Temp := Source.Data; Source.Data (1 .. Max_Length - Npad) := Temp (Count - Max_Length + 1 .. Slen); Source.Data (Max_Length - Npad + 1 .. Max_Length) := - (others => Pad); + [others => Pad]; end if; when Strings.Error => @@ -1385,14 +1385,14 @@ package body Ada.Strings.Superbounded with SPARK_Mode is begin if Count <= Max_Length then - Result.Data (1 .. Count) := (others => Item); + Result.Data (1 .. Count) := [others => Item]; Result.Current_Length := Count; elsif Drop = Strings.Error then raise Ada.Strings.Length_Error; else - Result.Data (1 .. Max_Length) := (others => Item); + Result.Data (1 .. Max_Length) := [others => Item]; Result.Current_Length := Max_Length; end if; @@ -1686,7 +1686,7 @@ package body Ada.Strings.Superbounded with SPARK_Mode is end if; elsif Count <= Max_Length then - Result.Data (1 .. Npad) := (others => Pad); + Result.Data (1 .. Npad) := [others => Pad]; if Slen > 0 then Result.Data (Npad + 1 .. Count) := Source.Data (1 .. Slen); @@ -1698,16 +1698,16 @@ package body Ada.Strings.Superbounded with SPARK_Mode is case Drop is when Strings.Right => if Npad >= Max_Length then - Result.Data := (others => Pad); + Result.Data := [others => Pad]; else - Result.Data (1 .. Npad) := (others => Pad); + Result.Data (1 .. Npad) := [others => Pad]; Result.Data (Npad + 1 .. Max_Length) := Source.Data (1 .. Max_Length - Npad); end if; when Strings.Left => - Result.Data (1 .. Max_Length - Slen) := (others => Pad); + Result.Data (1 .. Max_Length - Slen) := [others => Pad]; Result.Data (Max_Length - Slen + 1 .. Max_Length) := Source.Data (1 .. Slen); @@ -1743,7 +1743,7 @@ package body Ada.Strings.Superbounded with SPARK_Mode is end if; elsif Count <= Max_Length then - Source.Data (1 .. Npad) := (others => Pad); + Source.Data (1 .. Npad) := [others => Pad]; if Slen > 0 then Source.Data (Npad + 1 .. Count) := Temp (1 .. Slen); @@ -1755,16 +1755,16 @@ package body Ada.Strings.Superbounded with SPARK_Mode is case Drop is when Strings.Right => if Npad >= Max_Length then - Source.Data := (others => Pad); + Source.Data := [others => Pad]; else - Source.Data (1 .. Npad) := (others => Pad); + Source.Data (1 .. Npad) := [others => Pad]; Source.Data (Npad + 1 .. Max_Length) := Temp (1 .. Max_Length - Npad); end if; when Strings.Left => - Source.Data (1 .. Max_Length - Slen) := (others => Pad); + Source.Data (1 .. Max_Length - Slen) := [others => Pad]; Source.Data (Max_Length - Slen + 1 .. Max_Length) := Temp (1 .. Slen); diff --git a/gcc/ada/libgnat/a-strsup.ads b/gcc/ada/libgnat/a-strsup.ads index ae4339f..19e333c 100644 --- a/gcc/ada/libgnat/a-strsup.ads +++ b/gcc/ada/libgnat/a-strsup.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -2322,7 +2322,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Super_Head'Result, Super_Length (Source) + 1, Count)) = - (1 .. Count - Super_Length (Source) => Pad), + [1 .. Count - Super_Length (Source) => Pad], Count > Source.Max_Length and then Drop = Right => -- Source is followed by Pad characters @@ -2334,13 +2334,13 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Super_Head'Result, Super_Length (Source) + 1, Source.Max_Length)) = - (1 .. Source.Max_Length - Super_Length (Source) => Pad), + [1 .. Source.Max_Length - Super_Length (Source) => Pad], Count - Super_Length (Source) > Source.Max_Length and then Drop = Left => -- Source is fully dropped on the left Super_To_String (Super_Head'Result) = - (1 .. Source.Max_Length => Pad), + [1 .. Source.Max_Length => Pad], others => -- Source is partly dropped on the left @@ -2355,7 +2355,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is String'(Super_Slice (Super_Head'Result, Source.Max_Length - Count + Super_Length (Source) + 1, Source.Max_Length)) = - (1 .. Count - Super_Length (Source) => Pad)), + [1 .. Count - Super_Length (Source) => Pad]), Global => null; procedure Super_Head @@ -2382,7 +2382,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Source, Super_Length (Source'Old) + 1, Count)) = - (1 .. Count - Super_Length (Source'Old) => Pad), + [1 .. Count - Super_Length (Source'Old) => Pad], Count > Source.Max_Length and then Drop = Right => -- Source is followed by Pad characters @@ -2394,12 +2394,12 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Source, Super_Length (Source'Old) + 1, Source.Max_Length)) = - (1 .. Source.Max_Length - Super_Length (Source'Old) => Pad), + [1 .. Source.Max_Length - Super_Length (Source'Old) => Pad], Count - Super_Length (Source) > Source.Max_Length and then Drop = Left => -- Source is fully dropped on the left - Super_To_String (Source) = (1 .. Source.Max_Length => Pad), + Super_To_String (Source) = [1 .. Source.Max_Length => Pad], others => -- Source is partly dropped on the left @@ -2414,7 +2414,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is String'(Super_Slice (Source, Source.Max_Length - Count + Super_Length (Source'Old) + 1, Source.Max_Length)) = - (1 .. Count - Super_Length (Source'Old) => Pad)), + [1 .. Count - Super_Length (Source'Old) => Pad]), Global => null; function Super_Tail @@ -2443,7 +2443,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Super_Tail'Result, 1, Count - Super_Length (Source))) = - (1 .. Count - Super_Length (Source) => Pad) + [1 .. Count - Super_Length (Source) => Pad] and then Super_Slice (Super_Tail'Result, Count - Super_Length (Source) + 1, Count) = @@ -2456,7 +2456,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Super_Tail'Result, 1, Source.Max_Length - Super_Length (Source))) = - (1 .. Source.Max_Length - Super_Length (Source) => Pad) + [1 .. Source.Max_Length - Super_Length (Source) => Pad] and then (if Super_Length (Source) > 0 then Super_Slice (Super_Tail'Result, @@ -2469,7 +2469,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is -- Source is fully dropped on the right Super_To_String (Super_Tail'Result) = - (1 .. Source.Max_Length => Pad), + [1 .. Source.Max_Length => Pad], others => -- Source is partly dropped on the right @@ -2478,7 +2478,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Super_Tail'Result, 1, Count - Super_Length (Source))) = - (1 .. Count - Super_Length (Source) => Pad) + [1 .. Count - Super_Length (Source) => Pad] and then String'(Super_Slice (Super_Tail'Result, Count - Super_Length (Source) + 1, Source.Max_Length)) = @@ -2512,7 +2512,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Source, 1, Count - Super_Length (Source'Old))) = - (1 .. Count - Super_Length (Source'Old) => Pad) + [1 .. Count - Super_Length (Source'Old) => Pad] and then Super_Slice (Source, Count - Super_Length (Source'Old) + 1, Count) = @@ -2525,7 +2525,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Source, 1, Source.Max_Length - Super_Length (Source'Old))) = - (1 .. Source.Max_Length - Super_Length (Source'Old) => Pad) + [1 .. Source.Max_Length - Super_Length (Source'Old) => Pad] and then (if Super_Length (Source'Old) > 0 then Super_Slice (Source, @@ -2537,7 +2537,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is => -- Source is fully dropped on the right - Super_To_String (Source) = (1 .. Source.Max_Length => Pad), + Super_To_String (Source) = [1 .. Source.Max_Length => Pad], others => -- Source is partly dropped on the right @@ -2546,7 +2546,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Source, 1, Count - Super_Length (Source'Old))) = - (1 .. Count - Super_Length (Source'Old) => Pad) + [1 .. Count - Super_Length (Source'Old) => Pad] and then String'(Super_Slice (Source, Count - Super_Length (Source'Old) + 1, Source.Max_Length)) = @@ -2569,7 +2569,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is with Pre => Left <= Max_Length, Post => Times'Result.Max_Length = Max_Length - and then Super_To_String (Times'Result) = (1 .. Left => Right), + and then Super_To_String (Times'Result) = [1 .. Left => Right], Global => null; -- Note the additional parameter Max_Length @@ -2613,7 +2613,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is Pre => (if Count > Max_Length then Drop /= Error), Post => Super_Replicate'Result.Max_Length = Max_Length and then Super_To_String (Super_Replicate'Result) = - (1 .. Natural'Min (Max_Length, Count) => Item), + [1 .. Natural'Min (Max_Length, Count) => Item], Global => null; -- Note the additional parameter Max_Length diff --git a/gcc/ada/libgnat/a-strunb.adb b/gcc/ada/libgnat/a-strunb.adb index 0d62e4b..e97ee3d 100644 --- a/gcc/ada/libgnat/a-strunb.adb +++ b/gcc/ada/libgnat/a-strunb.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -506,11 +506,11 @@ package body Ada.Strings.Unbounded is if Object.Reference /= Null_String'Access then declare - Reference_Copy : String_Access := Object.Reference; + Old : String_Access := Object.Reference; -- The original reference cannot be null, so we must create a -- copy which will become null when deallocated. begin - Deallocate (Reference_Copy); + Deallocate (Old); Object.Reference := Null_Unbounded_String.Reference; end; Object.Last := 0; @@ -833,9 +833,13 @@ package body Ada.Strings.Unbounded is Tmp : constant String_Access := new String (1 .. New_Rounded_Up_Size); + Old : String_Access := Source.Reference; + -- The original reference cannot be null, so we must create a copy + -- which will become null when deallocated. + begin Tmp (1 .. Source.Last) := Source.Reference (1 .. Source.Last); - Free (Source.Reference); + Free (Old); Source.Reference := Tmp; end; end if; diff --git a/gcc/ada/libgnat/a-strunb.ads b/gcc/ada/libgnat/a-strunb.ads index 2f5bd94..37c9466 100644 --- a/gcc/ada/libgnat/a-strunb.ads +++ b/gcc/ada/libgnat/a-strunb.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-strunb__shared.adb b/gcc/ada/libgnat/a-strunb__shared.adb index 506b614..8e1fce4 100644 --- a/gcc/ada/libgnat/a-strunb__shared.adb +++ b/gcc/ada/libgnat/a-strunb__shared.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-strunb__shared.ads b/gcc/ada/libgnat/a-strunb__shared.ads index 2cf6780..8d00d0b 100644 --- a/gcc/ada/libgnat/a-strunb__shared.ads +++ b/gcc/ada/libgnat/a-strunb__shared.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -45,6 +45,8 @@ pragma Assertion_Policy (Pre => Ignore); -- This version is supported on: -- - all Alpha platforms +-- - all AARCH64 platforms +-- - all ARM platforms -- - all ia64 platforms -- - all PowerPC platforms -- - all SPARC V9 platforms diff --git a/gcc/ada/libgnat/a-ststbo.adb b/gcc/ada/libgnat/a-ststbo.adb index 59dec1c..b561ba8 100644 --- a/gcc/ada/libgnat/a-ststbo.adb +++ b/gcc/ada/libgnat/a-ststbo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ststbo.ads b/gcc/ada/libgnat/a-ststbo.ads index 0cece80..828da42 100644 --- a/gcc/ada/libgnat/a-ststbo.ads +++ b/gcc/ada/libgnat/a-ststbo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-ststio.adb b/gcc/ada/libgnat/a-ststio.adb index 176dabf..88cee6a 100644 --- a/gcc/ada/libgnat/a-ststio.adb +++ b/gcc/ada/libgnat/a-ststio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ststio.ads b/gcc/ada/libgnat/a-ststio.ads index 22f37f9..4742845 100644 --- a/gcc/ada/libgnat/a-ststio.ads +++ b/gcc/ada/libgnat/a-ststio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-ststun.adb b/gcc/ada/libgnat/a-ststun.adb index 9b4cc61..eca1d4f 100644 --- a/gcc/ada/libgnat/a-ststun.adb +++ b/gcc/ada/libgnat/a-ststun.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ststun.ads b/gcc/ada/libgnat/a-ststun.ads index 3d00e7f..9a0541e 100644 --- a/gcc/ada/libgnat/a-ststun.ads +++ b/gcc/ada/libgnat/a-ststun.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-sttebu.adb b/gcc/ada/libgnat/a-sttebu.adb index bc0c6ce..d992fee 100644 --- a/gcc/ada/libgnat/a-sttebu.adb +++ b/gcc/ada/libgnat/a-sttebu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -94,7 +94,7 @@ package body Ada.Strings.Text_Buffers is Buffer.Indent_Pending := False; if Buffer.Indentation > 0 then Put_UTF_8_Implementation - (Buffer, (1 .. Buffer.Indentation => ' ')); + (Buffer, [1 .. Buffer.Indentation => ' ']); end if; end if; @@ -111,7 +111,7 @@ package body Ada.Strings.Text_Buffers is procedure New_Line (Buffer : in out Buffer_Type) is begin Buffer.Indent_Pending := False; -- just for a moment - Put (Buffer, (1 => ASCII.LF)); + Put (Buffer, [ASCII.LF]); Buffer.Indent_Pending := True; Buffer.UTF_8_Column := 1; end New_Line; diff --git a/gcc/ada/libgnat/a-stunau.adb b/gcc/ada/libgnat/a-stunau.adb index 28aee55..0250baf 100644 --- a/gcc/ada/libgnat/a-stunau.adb +++ b/gcc/ada/libgnat/a-stunau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stunau.ads b/gcc/ada/libgnat/a-stunau.ads index f313187..e58b6b2 100644 --- a/gcc/ada/libgnat/a-stunau.ads +++ b/gcc/ada/libgnat/a-stunau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stunau__shared.adb b/gcc/ada/libgnat/a-stunau__shared.adb index 3160e14..78e4f75 100644 --- a/gcc/ada/libgnat/a-stunau__shared.adb +++ b/gcc/ada/libgnat/a-stunau__shared.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stunha.adb b/gcc/ada/libgnat/a-stunha.adb index 32f4e6d..ff8834a 100644 --- a/gcc/ada/libgnat/a-stunha.adb +++ b/gcc/ada/libgnat/a-stunha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stuten.adb b/gcc/ada/libgnat/a-stuten.adb index 04321a6..fd7882c 100644 --- a/gcc/ada/libgnat/a-stuten.adb +++ b/gcc/ada/libgnat/a-stuten.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stuten.ads b/gcc/ada/libgnat/a-stuten.ads index fba30df..209c84a 100644 --- a/gcc/ada/libgnat/a-stuten.ads +++ b/gcc/ada/libgnat/a-stuten.ads @@ -94,7 +94,7 @@ package Ada.Strings.UTF_Encoding is Character'Val (16#FE#); BOM_16 : constant UTF_16_Wide_String := - (1 => Wide_Character'Val (16#FEFF#)); + [Wide_Character'Val (16#FEFF#)]; function Encoding (Item : UTF_String; diff --git a/gcc/ada/libgnat/a-stwibo.adb b/gcc/ada/libgnat/a-stwibo.adb index f045a3c..5b4053b 100644 --- a/gcc/ada/libgnat/a-stwibo.adb +++ b/gcc/ada/libgnat/a-stwibo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stwibo.ads b/gcc/ada/libgnat/a-stwibo.ads index 9b3d0ad..90c0090 100644 --- a/gcc/ada/libgnat/a-stwibo.ads +++ b/gcc/ada/libgnat/a-stwibo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -487,8 +487,8 @@ package Ada.Strings.Wide_Bounded is (Max_Length => Max_Length, Current_Length => 0, Data => - (1 .. Max_Length => - Wide_Superbounded.Wide_NUL)); + [1 .. Max_Length => + Wide_Superbounded.Wide_NUL]); pragma Inline (To_Bounded_Wide_String); diff --git a/gcc/ada/libgnat/a-stwifi.adb b/gcc/ada/libgnat/a-stwifi.adb index 456e907..e325501 100644 --- a/gcc/ada/libgnat/a-stwifi.adb +++ b/gcc/ada/libgnat/a-stwifi.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stwiha.adb b/gcc/ada/libgnat/a-stwiha.adb index d02b641..37bba84 100644 --- a/gcc/ada/libgnat/a-stwiha.adb +++ b/gcc/ada/libgnat/a-stwiha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stwima.adb b/gcc/ada/libgnat/a-stwima.adb index 09b192f..d7c6d0f 100644 --- a/gcc/ada/libgnat/a-stwima.adb +++ b/gcc/ada/libgnat/a-stwima.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stwima.ads b/gcc/ada/libgnat/a-stwima.ads index fba510a..3393253 100644 --- a/gcc/ada/libgnat/a-stwima.ads +++ b/gcc/ada/libgnat/a-stwima.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -181,8 +181,7 @@ private overriding procedure Adjust (Object : in out Wide_Character_Set); overriding procedure Finalize (Object : in out Wide_Character_Set); - Null_Range : aliased constant Wide_Character_Ranges := - (1 .. 0 => (Low => ' ', High => ' ')); + Null_Range : aliased constant Wide_Character_Ranges := []; Null_Set : constant Wide_Character_Set := (AF.Controlled with diff --git a/gcc/ada/libgnat/a-stwise.adb b/gcc/ada/libgnat/a-stwise.adb index e9ce76c..99bb61b 100644 --- a/gcc/ada/libgnat/a-stwise.adb +++ b/gcc/ada/libgnat/a-stwise.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stwise.ads b/gcc/ada/libgnat/a-stwise.ads index 3d3ef63..45aa98b 100644 --- a/gcc/ada/libgnat/a-stwise.ads +++ b/gcc/ada/libgnat/a-stwise.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stwisu.adb b/gcc/ada/libgnat/a-stwisu.adb index b81be14..a615ff3 100644 --- a/gcc/ada/libgnat/a-stwisu.adb +++ b/gcc/ada/libgnat/a-stwisu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -852,7 +852,7 @@ package body Ada.Strings.Wide_Superbounded is elsif Count <= Max_Length then Result.Current_Length := Count; Result.Data (1 .. Slen) := Source.Data (1 .. Slen); - Result.Data (Slen + 1 .. Count) := (others => Pad); + Result.Data (Slen + 1 .. Count) := [others => Pad]; else Result.Current_Length := Max_Length; @@ -860,17 +860,17 @@ package body Ada.Strings.Wide_Superbounded is case Drop is when Strings.Right => Result.Data (1 .. Slen) := Source.Data (1 .. Slen); - Result.Data (Slen + 1 .. Max_Length) := (others => Pad); + Result.Data (Slen + 1 .. Max_Length) := [others => Pad]; when Strings.Left => if Npad >= Max_Length then - Result.Data := (others => Pad); + Result.Data := [others => Pad]; else Result.Data (1 .. Max_Length - Npad) := Source.Data (Count - Max_Length + 1 .. Slen); Result.Data (Max_Length - Npad + 1 .. Max_Length) := - (others => Pad); + [others => Pad]; end if; when Strings.Error => @@ -898,18 +898,18 @@ package body Ada.Strings.Wide_Superbounded is elsif Count <= Max_Length then Source.Current_Length := Count; - Source.Data (Slen + 1 .. Count) := (others => Pad); + Source.Data (Slen + 1 .. Count) := [others => Pad]; else Source.Current_Length := Max_Length; case Drop is when Strings.Right => - Source.Data (Slen + 1 .. Max_Length) := (others => Pad); + Source.Data (Slen + 1 .. Max_Length) := [others => Pad]; when Strings.Left => if Npad > Max_Length then - Source.Data := (others => Pad); + Source.Data := [others => Pad]; else Temp := Source.Data; @@ -1386,7 +1386,7 @@ package body Ada.Strings.Wide_Superbounded is Result.Current_Length := Max_Length; end if; - Result.Data (1 .. Result.Current_Length) := (others => Item); + Result.Data (1 .. Result.Current_Length) := [others => Item]; return Result; end Super_Replicate; @@ -1542,7 +1542,7 @@ package body Ada.Strings.Wide_Superbounded is elsif Count <= Max_Length then Result.Current_Length := Count; - Result.Data (1 .. Npad) := (others => Pad); + Result.Data (1 .. Npad) := [others => Pad]; Result.Data (Npad + 1 .. Count) := Source.Data (1 .. Slen); else @@ -1551,16 +1551,16 @@ package body Ada.Strings.Wide_Superbounded is case Drop is when Strings.Right => if Npad >= Max_Length then - Result.Data := (others => Pad); + Result.Data := [others => Pad]; else - Result.Data (1 .. Npad) := (others => Pad); + Result.Data (1 .. Npad) := [others => Pad]; Result.Data (Npad + 1 .. Max_Length) := Source.Data (1 .. Max_Length - Npad); end if; when Strings.Left => - Result.Data (1 .. Max_Length - Slen) := (others => Pad); + Result.Data (1 .. Max_Length - Slen) := [others => Pad]; Result.Data (Max_Length - Slen + 1 .. Max_Length) := Source.Data (1 .. Slen); @@ -1592,7 +1592,7 @@ package body Ada.Strings.Wide_Superbounded is elsif Count <= Max_Length then Source.Current_Length := Count; - Source.Data (1 .. Npad) := (others => Pad); + Source.Data (1 .. Npad) := [others => Pad]; Source.Data (Npad + 1 .. Count) := Temp (1 .. Slen); else @@ -1601,10 +1601,10 @@ package body Ada.Strings.Wide_Superbounded is case Drop is when Strings.Right => if Npad >= Max_Length then - Source.Data := (others => Pad); + Source.Data := [others => Pad]; else - Source.Data (1 .. Npad) := (others => Pad); + Source.Data (1 .. Npad) := [others => Pad]; Source.Data (Npad + 1 .. Max_Length) := Temp (1 .. Max_Length - Npad); end if; @@ -1744,7 +1744,7 @@ package body Ada.Strings.Wide_Superbounded is end loop; end if; - Source.Data := (others => Wide_NUL); + Source.Data := [others => Wide_NUL]; Source.Current_Length := Last - First + 1; Source.Data (1 .. Source.Current_Length) := Temp (First .. Last); end Super_Trim; diff --git a/gcc/ada/libgnat/a-stwisu.ads b/gcc/ada/libgnat/a-stwisu.ads index 9761bcc..c22c2a2 100644 --- a/gcc/ada/libgnat/a-stwisu.ads +++ b/gcc/ada/libgnat/a-stwisu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stwiun.adb b/gcc/ada/libgnat/a-stwiun.adb index 269c8c9..76fc2ea 100644 --- a/gcc/ada/libgnat/a-stwiun.adb +++ b/gcc/ada/libgnat/a-stwiun.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stwiun.ads b/gcc/ada/libgnat/a-stwiun.ads index 40f2796..b72decd 100644 --- a/gcc/ada/libgnat/a-stwiun.ads +++ b/gcc/ada/libgnat/a-stwiun.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-stwiun__shared.adb b/gcc/ada/libgnat/a-stwiun__shared.adb index 1d0521c..39808a7 100644 --- a/gcc/ada/libgnat/a-stwiun__shared.adb +++ b/gcc/ada/libgnat/a-stwiun__shared.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stwiun__shared.ads b/gcc/ada/libgnat/a-stwiun__shared.ads index a88c4ec..8d77fb0 100644 --- a/gcc/ada/libgnat/a-stwiun__shared.ads +++ b/gcc/ada/libgnat/a-stwiun__shared.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-stzbou.adb b/gcc/ada/libgnat/a-stzbou.adb index cbf3f5e..932a231 100644 --- a/gcc/ada/libgnat/a-stzbou.adb +++ b/gcc/ada/libgnat/a-stzbou.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stzbou.ads b/gcc/ada/libgnat/a-stzbou.ads index d49d577..73d52dd 100644 --- a/gcc/ada/libgnat/a-stzbou.ads +++ b/gcc/ada/libgnat/a-stzbou.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -493,11 +493,11 @@ package Ada.Strings.Wide_Wide_Bounded is -- the Wide_Wide_Superbounded package. Null_Bounded_Wide_Wide_String : constant Bounded_Wide_Wide_String := - (Max_Length => Max_Length, + [Max_Length => Max_Length, Current_Length => 0, Data => - (1 .. Max_Length => - Wide_Wide_Superbounded.Wide_Wide_NUL)); + [1 .. Max_Length => + Wide_Wide_Superbounded.Wide_Wide_NUL]]; pragma Inline (To_Bounded_Wide_Wide_String); diff --git a/gcc/ada/libgnat/a-stzfix.adb b/gcc/ada/libgnat/a-stzfix.adb index 55599ea..26c3a37 100644 --- a/gcc/ada/libgnat/a-stzfix.adb +++ b/gcc/ada/libgnat/a-stzfix.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stzhas.adb b/gcc/ada/libgnat/a-stzhas.adb index 091bdfe..95320f8 100644 --- a/gcc/ada/libgnat/a-stzhas.adb +++ b/gcc/ada/libgnat/a-stzhas.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stzmap.adb b/gcc/ada/libgnat/a-stzmap.adb index b2c9ee5..0a8c501 100644 --- a/gcc/ada/libgnat/a-stzmap.adb +++ b/gcc/ada/libgnat/a-stzmap.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stzmap.ads b/gcc/ada/libgnat/a-stzmap.ads index 14650da..4192ca1 100644 --- a/gcc/ada/libgnat/a-stzmap.ads +++ b/gcc/ada/libgnat/a-stzmap.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -183,8 +183,7 @@ private procedure Adjust (Object : in out Wide_Wide_Character_Set); procedure Finalize (Object : in out Wide_Wide_Character_Set); - Null_Range : aliased constant Wide_Wide_Character_Ranges := - (1 .. 0 => (Low => ' ', High => ' ')); + Null_Range : aliased constant Wide_Wide_Character_Ranges := []; Null_Set : constant Wide_Wide_Character_Set := (AF.Controlled with diff --git a/gcc/ada/libgnat/a-stzsea.adb b/gcc/ada/libgnat/a-stzsea.adb index 3d990c9..2ea0699 100644 --- a/gcc/ada/libgnat/a-stzsea.adb +++ b/gcc/ada/libgnat/a-stzsea.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stzsea.ads b/gcc/ada/libgnat/a-stzsea.ads index 1eb7ad4..ced5470 100644 --- a/gcc/ada/libgnat/a-stzsea.ads +++ b/gcc/ada/libgnat/a-stzsea.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stzsup.adb b/gcc/ada/libgnat/a-stzsup.adb index 92790a1..d973993 100644 --- a/gcc/ada/libgnat/a-stzsup.adb +++ b/gcc/ada/libgnat/a-stzsup.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -853,7 +853,7 @@ package body Ada.Strings.Wide_Wide_Superbounded is elsif Count <= Max_Length then Result.Current_Length := Count; Result.Data (1 .. Slen) := Source.Data (1 .. Slen); - Result.Data (Slen + 1 .. Count) := (others => Pad); + Result.Data (Slen + 1 .. Count) := [others => Pad]; else Result.Current_Length := Max_Length; @@ -861,17 +861,17 @@ package body Ada.Strings.Wide_Wide_Superbounded is case Drop is when Strings.Right => Result.Data (1 .. Slen) := Source.Data (1 .. Slen); - Result.Data (Slen + 1 .. Max_Length) := (others => Pad); + Result.Data (Slen + 1 .. Max_Length) := [others => Pad]; when Strings.Left => if Npad >= Max_Length then - Result.Data := (others => Pad); + Result.Data := [others => Pad]; else Result.Data (1 .. Max_Length - Npad) := Source.Data (Count - Max_Length + 1 .. Slen); Result.Data (Max_Length - Npad + 1 .. Max_Length) := - (others => Pad); + [others => Pad]; end if; when Strings.Error => @@ -899,18 +899,18 @@ package body Ada.Strings.Wide_Wide_Superbounded is elsif Count <= Max_Length then Source.Current_Length := Count; - Source.Data (Slen + 1 .. Count) := (others => Pad); + Source.Data (Slen + 1 .. Count) := [others => Pad]; else Source.Current_Length := Max_Length; case Drop is when Strings.Right => - Source.Data (Slen + 1 .. Max_Length) := (others => Pad); + Source.Data (Slen + 1 .. Max_Length) := [others => Pad]; when Strings.Left => if Npad > Max_Length then - Source.Data := (others => Pad); + Source.Data := [others => Pad]; else Temp := Source.Data; @@ -1389,7 +1389,7 @@ package body Ada.Strings.Wide_Wide_Superbounded is Result.Current_Length := Max_Length; end if; - Result.Data (1 .. Result.Current_Length) := (others => Item); + Result.Data (1 .. Result.Current_Length) := [others => Item]; return Result; end Super_Replicate; @@ -1546,7 +1546,7 @@ package body Ada.Strings.Wide_Wide_Superbounded is elsif Count <= Max_Length then Result.Current_Length := Count; - Result.Data (1 .. Npad) := (others => Pad); + Result.Data (1 .. Npad) := [others => Pad]; Result.Data (Npad + 1 .. Count) := Source.Data (1 .. Slen); else @@ -1555,16 +1555,16 @@ package body Ada.Strings.Wide_Wide_Superbounded is case Drop is when Strings.Right => if Npad >= Max_Length then - Result.Data := (others => Pad); + Result.Data := [others => Pad]; else - Result.Data (1 .. Npad) := (others => Pad); + Result.Data (1 .. Npad) := [others => Pad]; Result.Data (Npad + 1 .. Max_Length) := Source.Data (1 .. Max_Length - Npad); end if; when Strings.Left => - Result.Data (1 .. Max_Length - Slen) := (others => Pad); + Result.Data (1 .. Max_Length - Slen) := [others => Pad]; Result.Data (Max_Length - Slen + 1 .. Max_Length) := Source.Data (1 .. Slen); @@ -1596,7 +1596,7 @@ package body Ada.Strings.Wide_Wide_Superbounded is elsif Count <= Max_Length then Source.Current_Length := Count; - Source.Data (1 .. Npad) := (others => Pad); + Source.Data (1 .. Npad) := [others => Pad]; Source.Data (Npad + 1 .. Count) := Temp (1 .. Slen); else @@ -1605,10 +1605,10 @@ package body Ada.Strings.Wide_Wide_Superbounded is case Drop is when Strings.Right => if Npad >= Max_Length then - Source.Data := (others => Pad); + Source.Data := [others => Pad]; else - Source.Data (1 .. Npad) := (others => Pad); + Source.Data (1 .. Npad) := [others => Pad]; Source.Data (Npad + 1 .. Max_Length) := Temp (1 .. Max_Length - Npad); end if; @@ -1752,7 +1752,7 @@ package body Ada.Strings.Wide_Wide_Superbounded is end loop; end if; - Source.Data := (others => Wide_Wide_NUL); + Source.Data := [others => Wide_Wide_NUL]; Source.Current_Length := Last - First + 1; Source.Data (1 .. Source.Current_Length) := Temp (First .. Last); end Super_Trim; diff --git a/gcc/ada/libgnat/a-stzsup.ads b/gcc/ada/libgnat/a-stzsup.ads index 24ab18c..148b972 100644 --- a/gcc/ada/libgnat/a-stzsup.ads +++ b/gcc/ada/libgnat/a-stzsup.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stzunb.adb b/gcc/ada/libgnat/a-stzunb.adb index 5bd5408..34cbc32 100644 --- a/gcc/ada/libgnat/a-stzunb.adb +++ b/gcc/ada/libgnat/a-stzunb.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stzunb.ads b/gcc/ada/libgnat/a-stzunb.ads index 8ef5cb6..83aa1f6 100644 --- a/gcc/ada/libgnat/a-stzunb.ads +++ b/gcc/ada/libgnat/a-stzunb.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-stzunb__shared.adb b/gcc/ada/libgnat/a-stzunb__shared.adb index 99a545e..1b6ebc6 100644 --- a/gcc/ada/libgnat/a-stzunb__shared.adb +++ b/gcc/ada/libgnat/a-stzunb__shared.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-stzunb__shared.ads b/gcc/ada/libgnat/a-stzunb__shared.ads index 8a7fd5c..66f1703 100644 --- a/gcc/ada/libgnat/a-stzunb__shared.ads +++ b/gcc/ada/libgnat/a-stzunb__shared.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-suecin.adb b/gcc/ada/libgnat/a-suecin.adb index c64dcb1..086332a 100644 --- a/gcc/ada/libgnat/a-suecin.adb +++ b/gcc/ada/libgnat/a-suecin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-suecin.ads b/gcc/ada/libgnat/a-suecin.ads index 7aaccb7..58a686a 100644 --- a/gcc/ada/libgnat/a-suecin.ads +++ b/gcc/ada/libgnat/a-suecin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-suenco.adb b/gcc/ada/libgnat/a-suenco.adb index c135358..6494ebf 100644 --- a/gcc/ada/libgnat/a-suenco.adb +++ b/gcc/ada/libgnat/a-suenco.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-suenst.adb b/gcc/ada/libgnat/a-suenst.adb index 8ac078c..26ec0ab 100644 --- a/gcc/ada/libgnat/a-suenst.adb +++ b/gcc/ada/libgnat/a-suenst.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-suewst.adb b/gcc/ada/libgnat/a-suewst.adb index 7acabb4..c37d4e8 100644 --- a/gcc/ada/libgnat/a-suewst.adb +++ b/gcc/ada/libgnat/a-suewst.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-suezst.adb b/gcc/ada/libgnat/a-suezst.adb index 389709e..1ba91bf 100644 --- a/gcc/ada/libgnat/a-suezst.adb +++ b/gcc/ada/libgnat/a-suezst.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-suhcin.adb b/gcc/ada/libgnat/a-suhcin.adb index 7af768b..2fe1ab4 100644 --- a/gcc/ada/libgnat/a-suhcin.adb +++ b/gcc/ada/libgnat/a-suhcin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-suhcin.ads b/gcc/ada/libgnat/a-suhcin.ads index d8d8495..482752f 100644 --- a/gcc/ada/libgnat/a-suhcin.ads +++ b/gcc/ada/libgnat/a-suhcin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-sulcin.adb b/gcc/ada/libgnat/a-sulcin.adb index b201ad4..b862cc4 100644 --- a/gcc/ada/libgnat/a-sulcin.adb +++ b/gcc/ada/libgnat/a-sulcin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-sulcin.ads b/gcc/ada/libgnat/a-sulcin.ads index e77faa3..8f29c6a 100644 --- a/gcc/ada/libgnat/a-sulcin.ads +++ b/gcc/ada/libgnat/a-sulcin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-suteio.adb b/gcc/ada/libgnat/a-suteio.adb index 7c7b735..66941da 100644 --- a/gcc/ada/libgnat/a-suteio.adb +++ b/gcc/ada/libgnat/a-suteio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-suteio.ads b/gcc/ada/libgnat/a-suteio.ads index 34b8016..a892f0d 100644 --- a/gcc/ada/libgnat/a-suteio.ads +++ b/gcc/ada/libgnat/a-suteio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-suteio__shared.adb b/gcc/ada/libgnat/a-suteio__shared.adb index 6bb8e03..6b4d1e7 100644 --- a/gcc/ada/libgnat/a-suteio__shared.adb +++ b/gcc/ada/libgnat/a-suteio__shared.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-swbwha.adb b/gcc/ada/libgnat/a-swbwha.adb index 6c9a5bf..3fd1fa9 100644 --- a/gcc/ada/libgnat/a-swbwha.adb +++ b/gcc/ada/libgnat/a-swbwha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-swmwco.ads b/gcc/ada/libgnat/a-swmwco.ads index 0f92502..f58424a 100644 --- a/gcc/ada/libgnat/a-swmwco.ads +++ b/gcc/ada/libgnat/a-swmwco.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -66,52 +66,52 @@ private subtype WC is Wide_Character; Control_Ranges : aliased constant Wide_Character_Ranges := - ((W.NUL, W.US), - (W.DEL, W.APC)); + [ (W.NUL, W.US), + (W.DEL, W.APC)]; Control_Set : constant Wide_Character_Set := (AF.Controlled with Control_Ranges'Unrestricted_Access); Graphic_Ranges : aliased constant Wide_Character_Ranges := - ((W.Space, W.Tilde), - (WC'Val (256), WC'Last)); + [ (W.Space, W.Tilde), + (WC'Val (256), WC'Last)]; Graphic_Set : constant Wide_Character_Set := (AF.Controlled with Graphic_Ranges'Unrestricted_Access); Letter_Ranges : aliased constant Wide_Character_Ranges := - (('A', 'Z'), - (W.LC_A, W.LC_Z), - (W.UC_A_Grave, W.UC_O_Diaeresis), - (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis), - (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)); + [ ('A', 'Z'), + (W.LC_A, W.LC_Z), + (W.UC_A_Grave, W.UC_O_Diaeresis), + (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis), + (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)]; Letter_Set : constant Wide_Character_Set := (AF.Controlled with Letter_Ranges'Unrestricted_Access); Lower_Ranges : aliased constant Wide_Character_Ranges := - (1 => (W.LC_A, W.LC_Z), + [1 => (W.LC_A, W.LC_Z), 2 => (W.LC_German_Sharp_S, W.LC_O_Diaeresis), - 3 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)); + 3 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)]; Lower_Set : constant Wide_Character_Set := (AF.Controlled with Lower_Ranges'Unrestricted_Access); Upper_Ranges : aliased constant Wide_Character_Ranges := - (1 => ('A', 'Z'), + [1 => ('A', 'Z'), 2 => (W.UC_A_Grave, W.UC_O_Diaeresis), - 3 => (W.UC_O_Oblique_Stroke, W.UC_Icelandic_Thorn)); + 3 => (W.UC_O_Oblique_Stroke, W.UC_Icelandic_Thorn)]; Upper_Set : constant Wide_Character_Set := (AF.Controlled with Upper_Ranges'Unrestricted_Access); Basic_Ranges : aliased constant Wide_Character_Ranges := - (1 => ('A', 'Z'), + [1 => ('A', 'Z'), 2 => (W.LC_A, W.LC_Z), 3 => (W.UC_AE_Diphthong, W.UC_AE_Diphthong), 4 => (W.LC_AE_Diphthong, W.LC_AE_Diphthong), @@ -119,69 +119,69 @@ private 6 => (W.UC_Icelandic_Thorn, W.UC_Icelandic_Thorn), 7 => (W.LC_Icelandic_Thorn, W.LC_Icelandic_Thorn), 8 => (W.UC_Icelandic_Eth, W.UC_Icelandic_Eth), - 9 => (W.LC_Icelandic_Eth, W.LC_Icelandic_Eth)); + 9 => (W.LC_Icelandic_Eth, W.LC_Icelandic_Eth)]; Basic_Set : constant Wide_Character_Set := (AF.Controlled with Basic_Ranges'Unrestricted_Access); Decimal_Digit_Ranges : aliased constant Wide_Character_Ranges := - (1 => ('0', '9')); + [ ('0', '9')]; Decimal_Digit_Set : constant Wide_Character_Set := (AF.Controlled with Decimal_Digit_Ranges'Unrestricted_Access); Hexadecimal_Digit_Ranges : aliased constant Wide_Character_Ranges := - (1 => ('0', '9'), + [1 => ('0', '9'), 2 => ('A', 'F'), - 3 => (W.LC_A, W.LC_F)); + 3 => (W.LC_A, W.LC_F)]; Hexadecimal_Digit_Set : constant Wide_Character_Set := (AF.Controlled with Hexadecimal_Digit_Ranges'Unrestricted_Access); Alphanumeric_Ranges : aliased constant Wide_Character_Ranges := - (1 => ('0', '9'), + [1 => ('0', '9'), 2 => ('A', 'Z'), 3 => (W.LC_A, W.LC_Z), 4 => (W.UC_A_Grave, W.UC_O_Diaeresis), 5 => (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis), - 6 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)); + 6 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)]; Alphanumeric_Set : constant Wide_Character_Set := (AF.Controlled with Alphanumeric_Ranges'Unrestricted_Access); Special_Graphic_Ranges : aliased constant Wide_Character_Ranges := - (1 => (Wide_Space, W.Solidus), + [1 => (Wide_Space, W.Solidus), 2 => (W.Colon, W.Commercial_At), 3 => (W.Left_Square_Bracket, W.Grave), 4 => (W.Left_Curly_Bracket, W.Tilde), 5 => (W.No_Break_Space, W.Inverted_Question), 6 => (W.Multiplication_Sign, W.Multiplication_Sign), - 7 => (W.Division_Sign, W.Division_Sign)); + 7 => (W.Division_Sign, W.Division_Sign)]; Special_Graphic_Set : constant Wide_Character_Set := (AF.Controlled with Special_Graphic_Ranges'Unrestricted_Access); ISO_646_Ranges : aliased constant Wide_Character_Ranges := - (1 => (W.NUL, W.DEL)); + [ (W.NUL, W.DEL)]; ISO_646_Set : constant Wide_Character_Set := (AF.Controlled with ISO_646_Ranges'Unrestricted_Access); Character_Ranges : aliased constant Wide_Character_Ranges := - (1 => (W.NUL, WC'Val (255))); + [ (W.NUL, WC'Val (255))]; Character_Set : constant Wide_Character_Set := (AF.Controlled with Character_Ranges'Unrestricted_Access); Lower_Case_Mapping : aliased constant Wide_Character_Mapping_Values := - (Length => 56, + [Length => 56, Domain => "ABCDEFGHIJKLMNOPQRSTUVWXYZ" & @@ -247,14 +247,14 @@ private W.LC_U_Circumflex & W.LC_U_Diaeresis & W.LC_Y_Acute & - W.LC_Icelandic_Thorn); + W.LC_Icelandic_Thorn]; Lower_Case_Map : constant Wide_Character_Mapping := (AF.Controlled with Map => Lower_Case_Mapping'Unrestricted_Access); Upper_Case_Mapping : aliased constant Wide_Character_Mapping_Values := - (Length => 56, + [Length => 56, Domain => "abcdefghijklmnopqrstuvwxyz" & @@ -320,14 +320,14 @@ private W.UC_U_Circumflex & W.UC_U_Diaeresis & W.UC_Y_Acute & - W.UC_Icelandic_Thorn); + W.UC_Icelandic_Thorn]; Upper_Case_Map : constant Wide_Character_Mapping := (AF.Controlled with Upper_Case_Mapping'Unrestricted_Access); Basic_Mapping : aliased constant Wide_Character_Mapping_Values := - (Length => 55, + [Length => 55, Domain => W.UC_A_Grave & @@ -441,7 +441,7 @@ private 'u' & -- LC_U_Circumflex 'u' & -- LC_U_Diaeresis 'y' & -- LC_Y_Acute - 'y'); -- LC_Y_Diaeresis + 'y']; -- LC_Y_Diaeresis Basic_Map : constant Wide_Character_Mapping := (AF.Controlled with diff --git a/gcc/ada/libgnat/a-swunau.adb b/gcc/ada/libgnat/a-swunau.adb index e6e9ed9..68bd192 100644 --- a/gcc/ada/libgnat/a-swunau.adb +++ b/gcc/ada/libgnat/a-swunau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-swunau.ads b/gcc/ada/libgnat/a-swunau.ads index de76b79..22cda4c 100644 --- a/gcc/ada/libgnat/a-swunau.ads +++ b/gcc/ada/libgnat/a-swunau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-swunau__shared.adb b/gcc/ada/libgnat/a-swunau__shared.adb index 87eb9f0..e152116 100644 --- a/gcc/ada/libgnat/a-swunau__shared.adb +++ b/gcc/ada/libgnat/a-swunau__shared.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-swuwha.adb b/gcc/ada/libgnat/a-swuwha.adb index 9276942..0590f3c 100644 --- a/gcc/ada/libgnat/a-swuwha.adb +++ b/gcc/ada/libgnat/a-swuwha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-swuwti.adb b/gcc/ada/libgnat/a-swuwti.adb index 8149ba6..8d736fa 100644 --- a/gcc/ada/libgnat/a-swuwti.adb +++ b/gcc/ada/libgnat/a-swuwti.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-swuwti.ads b/gcc/ada/libgnat/a-swuwti.ads index 0dd04c4..b5918d6 100644 --- a/gcc/ada/libgnat/a-swuwti.ads +++ b/gcc/ada/libgnat/a-swuwti.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-swuwti__shared.adb b/gcc/ada/libgnat/a-swuwti__shared.adb index 165c97e..8da24a3 100644 --- a/gcc/ada/libgnat/a-swuwti__shared.adb +++ b/gcc/ada/libgnat/a-swuwti__shared.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-szbzha.adb b/gcc/ada/libgnat/a-szbzha.adb index 292e566..1689e5b 100644 --- a/gcc/ada/libgnat/a-szbzha.adb +++ b/gcc/ada/libgnat/a-szbzha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-szmzco.ads b/gcc/ada/libgnat/a-szmzco.ads index 82f0a6b..4d6eece 100644 --- a/gcc/ada/libgnat/a-szmzco.ads +++ b/gcc/ada/libgnat/a-szmzco.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -66,52 +66,52 @@ private subtype WC is Wide_Wide_Character; Control_Ranges : aliased constant Wide_Wide_Character_Ranges := - ((W.NUL, W.US), - (W.DEL, W.APC)); + [ (W.NUL, W.US), + (W.DEL, W.APC)]; Control_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Control_Ranges'Unrestricted_Access); Graphic_Ranges : aliased constant Wide_Wide_Character_Ranges := - ((W.Space, W.Tilde), - (WC'Val (256), WC'Last)); + [ (W.Space, W.Tilde), + (WC'Val (256), WC'Last)]; Graphic_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Graphic_Ranges'Unrestricted_Access); Letter_Ranges : aliased constant Wide_Wide_Character_Ranges := - (('A', 'Z'), - (W.LC_A, W.LC_Z), - (W.UC_A_Grave, W.UC_O_Diaeresis), - (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis), - (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)); + [ ('A', 'Z'), + (W.LC_A, W.LC_Z), + (W.UC_A_Grave, W.UC_O_Diaeresis), + (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis), + (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)]; Letter_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Letter_Ranges'Unrestricted_Access); Lower_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => (W.LC_A, W.LC_Z), + [1 => (W.LC_A, W.LC_Z), 2 => (W.LC_German_Sharp_S, W.LC_O_Diaeresis), - 3 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)); + 3 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)]; Lower_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Lower_Ranges'Unrestricted_Access); Upper_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => ('A', 'Z'), + [1 => ('A', 'Z'), 2 => (W.UC_A_Grave, W.UC_O_Diaeresis), - 3 => (W.UC_O_Oblique_Stroke, W.UC_Icelandic_Thorn)); + 3 => (W.UC_O_Oblique_Stroke, W.UC_Icelandic_Thorn)]; Upper_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Upper_Ranges'Unrestricted_Access); Basic_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => ('A', 'Z'), + [1 => ('A', 'Z'), 2 => (W.LC_A, W.LC_Z), 3 => (W.UC_AE_Diphthong, W.UC_AE_Diphthong), 4 => (W.LC_AE_Diphthong, W.LC_AE_Diphthong), @@ -119,69 +119,69 @@ private 6 => (W.UC_Icelandic_Thorn, W.UC_Icelandic_Thorn), 7 => (W.LC_Icelandic_Thorn, W.LC_Icelandic_Thorn), 8 => (W.UC_Icelandic_Eth, W.UC_Icelandic_Eth), - 9 => (W.LC_Icelandic_Eth, W.LC_Icelandic_Eth)); + 9 => (W.LC_Icelandic_Eth, W.LC_Icelandic_Eth)]; Basic_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Basic_Ranges'Unrestricted_Access); Decimal_Digit_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => ('0', '9')); + [ ('0', '9')]; Decimal_Digit_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Decimal_Digit_Ranges'Unrestricted_Access); Hexadecimal_Digit_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => ('0', '9'), + [1 => ('0', '9'), 2 => ('A', 'F'), - 3 => (W.LC_A, W.LC_F)); + 3 => (W.LC_A, W.LC_F)]; Hexadecimal_Digit_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Hexadecimal_Digit_Ranges'Unrestricted_Access); Alphanumeric_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => ('0', '9'), + [1 => ('0', '9'), 2 => ('A', 'Z'), 3 => (W.LC_A, W.LC_Z), 4 => (W.UC_A_Grave, W.UC_O_Diaeresis), 5 => (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis), - 6 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)); + 6 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)]; Alphanumeric_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Alphanumeric_Ranges'Unrestricted_Access); Special_Graphic_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => (Wide_Wide_Space, W.Solidus), + [1 => (Wide_Wide_Space, W.Solidus), 2 => (W.Colon, W.Commercial_At), 3 => (W.Left_Square_Bracket, W.Grave), 4 => (W.Left_Curly_Bracket, W.Tilde), 5 => (W.No_Break_Space, W.Inverted_Question), 6 => (W.Multiplication_Sign, W.Multiplication_Sign), - 7 => (W.Division_Sign, W.Division_Sign)); + 7 => (W.Division_Sign, W.Division_Sign)]; Special_Graphic_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Special_Graphic_Ranges'Unrestricted_Access); ISO_646_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => (W.NUL, W.DEL)); + [ (W.NUL, W.DEL)]; ISO_646_Set : constant Wide_Wide_Character_Set := (AF.Controlled with ISO_646_Ranges'Unrestricted_Access); Character_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => (W.NUL, WC'Val (255))); + [ (W.NUL, WC'Val (255))]; Character_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Character_Ranges'Unrestricted_Access); Lower_Case_Mapping : aliased constant Wide_Wide_Character_Mapping_Values := - (Length => 56, + [Length => 56, Domain => "ABCDEFGHIJKLMNOPQRSTUVWXYZ" & @@ -247,14 +247,14 @@ private W.LC_U_Circumflex & W.LC_U_Diaeresis & W.LC_Y_Acute & - W.LC_Icelandic_Thorn); + W.LC_Icelandic_Thorn]; Lower_Case_Map : constant Wide_Wide_Character_Mapping := (AF.Controlled with Map => Lower_Case_Mapping'Unrestricted_Access); Upper_Case_Mapping : aliased constant Wide_Wide_Character_Mapping_Values := - (Length => 56, + [Length => 56, Domain => "abcdefghijklmnopqrstuvwxyz" & @@ -320,14 +320,14 @@ private W.UC_U_Circumflex & W.UC_U_Diaeresis & W.UC_Y_Acute & - W.UC_Icelandic_Thorn); + W.UC_Icelandic_Thorn]; Upper_Case_Map : constant Wide_Wide_Character_Mapping := (AF.Controlled with Upper_Case_Mapping'Unrestricted_Access); Basic_Mapping : aliased constant Wide_Wide_Character_Mapping_Values := - (Length => 55, + [Length => 55, Domain => W.UC_A_Grave & @@ -441,7 +441,7 @@ private 'u' & -- LC_U_Circumflex 'u' & -- LC_U_Diaeresis 'y' & -- LC_Y_Acute - 'y'); -- LC_Y_Diaeresis + 'y']; -- LC_Y_Diaeresis Basic_Map : constant Wide_Wide_Character_Mapping := (AF.Controlled with diff --git a/gcc/ada/libgnat/a-szunau.adb b/gcc/ada/libgnat/a-szunau.adb index 744190e..56c4fad3 100644 --- a/gcc/ada/libgnat/a-szunau.adb +++ b/gcc/ada/libgnat/a-szunau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-szunau.ads b/gcc/ada/libgnat/a-szunau.ads index 8a8ed81..1f17705 100644 --- a/gcc/ada/libgnat/a-szunau.ads +++ b/gcc/ada/libgnat/a-szunau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-szunau__shared.adb b/gcc/ada/libgnat/a-szunau__shared.adb index 980fb8b..2601497 100644 --- a/gcc/ada/libgnat/a-szunau__shared.adb +++ b/gcc/ada/libgnat/a-szunau__shared.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-szuzha.adb b/gcc/ada/libgnat/a-szuzha.adb index 8958154..a552fb6 100644 --- a/gcc/ada/libgnat/a-szuzha.adb +++ b/gcc/ada/libgnat/a-szuzha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-szuzti.adb b/gcc/ada/libgnat/a-szuzti.adb index bccaf09..c8e5595 100644 --- a/gcc/ada/libgnat/a-szuzti.adb +++ b/gcc/ada/libgnat/a-szuzti.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-szuzti.ads b/gcc/ada/libgnat/a-szuzti.ads index 53297ef..cfe0e56 100644 --- a/gcc/ada/libgnat/a-szuzti.ads +++ b/gcc/ada/libgnat/a-szuzti.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-szuzti__shared.adb b/gcc/ada/libgnat/a-szuzti__shared.adb index c506a3c..09673c4 100644 --- a/gcc/ada/libgnat/a-szuzti__shared.adb +++ b/gcc/ada/libgnat/a-szuzti__shared.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tags.adb b/gcc/ada/libgnat/a-tags.adb index 170d16a..d663a41 100644 --- a/gcc/ada/libgnat/a-tags.adb +++ b/gcc/ada/libgnat/a-tags.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tags.ads b/gcc/ada/libgnat/a-tags.ads index 0c9afff..dbac36a 100644 --- a/gcc/ada/libgnat/a-tags.ads +++ b/gcc/ada/libgnat/a-tags.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-teioed.adb b/gcc/ada/libgnat/a-teioed.adb index 6f198e5..6d1115f 100644 --- a/gcc/ada/libgnat/a-teioed.adb +++ b/gcc/ada/libgnat/a-teioed.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -279,13 +279,13 @@ package body Ada.Text_IO.Editing is or else Pic.Start_Currency < Pic.Radix_Position then Answer (Pic.Start_Currency .. Pic.End_Currency) := - (others => ' '); + [others => ' ']; Answer (Pic.End_Currency - Currency_Symbol'Length + 1 .. Pic.End_Currency) := Currency_Symbol; else Answer (Pic.Start_Currency .. Pic.End_Currency) := - (others => ' '); + [others => ' ']; Answer (Pic.Start_Currency .. Pic.Start_Currency + Currency_Symbol'Length - 1) := Currency_Symbol; diff --git a/gcc/ada/libgnat/a-teioed.ads b/gcc/ada/libgnat/a-teioed.ads index 110b613..ecc1f81 100644 --- a/gcc/ada/libgnat/a-teioed.ads +++ b/gcc/ada/libgnat/a-teioed.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-textio.adb b/gcc/ada/libgnat/a-textio.adb index 1bdab6e..bd76caa 100644 --- a/gcc/ada/libgnat/a-textio.adb +++ b/gcc/ada/libgnat/a-textio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -403,7 +403,7 @@ is ----------------- function End_Of_Page (File : File_Type) return Boolean is - ch : int; + ch : int; begin FIO.Check_Read_Status (AP (File)); @@ -598,7 +598,7 @@ is (File : File_Type; Item : out Character) is - ch : int; + ch : int; begin FIO.Check_Read_Status (AP (File)); diff --git a/gcc/ada/libgnat/a-textio.ads b/gcc/ada/libgnat/a-textio.ads index f94c92d..7c2ec10 100644 --- a/gcc/ada/libgnat/a-textio.ads +++ b/gcc/ada/libgnat/a-textio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-tiboio.adb b/gcc/ada/libgnat/a-tiboio.adb index 340199c..e8e602d 100644 --- a/gcc/ada/libgnat/a-tiboio.adb +++ b/gcc/ada/libgnat/a-tiboio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,6 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Text_IO; use Ada.Text_IO; with Ada.Unchecked_Deallocation; package body Ada.Text_IO.Bounded_IO is diff --git a/gcc/ada/libgnat/a-ticoau.adb b/gcc/ada/libgnat/a-ticoau.adb index 1fa9364..b9b0359 100644 --- a/gcc/ada/libgnat/a-ticoau.adb +++ b/gcc/ada/libgnat/a-ticoau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ticoau.ads b/gcc/ada/libgnat/a-ticoau.ads index 2b5ea66..611b495 100644 --- a/gcc/ada/libgnat/a-ticoau.ads +++ b/gcc/ada/libgnat/a-ticoau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ticoio.adb b/gcc/ada/libgnat/a-ticoio.adb index a94c826..64e0cf3 100644 --- a/gcc/ada/libgnat/a-ticoio.adb +++ b/gcc/ada/libgnat/a-ticoio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ticoio.ads b/gcc/ada/libgnat/a-ticoio.ads index 1463478..a8fa9c2 100644 --- a/gcc/ada/libgnat/a-ticoio.ads +++ b/gcc/ada/libgnat/a-ticoio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-tideau.adb b/gcc/ada/libgnat/a-tideau.adb index 9be119d..eeb4bff 100644 --- a/gcc/ada/libgnat/a-tideau.adb +++ b/gcc/ada/libgnat/a-tideau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tideau.ads b/gcc/ada/libgnat/a-tideau.ads index 469e7c9..f6bf963 100644 --- a/gcc/ada/libgnat/a-tideau.ads +++ b/gcc/ada/libgnat/a-tideau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tideio.adb b/gcc/ada/libgnat/a-tideio.adb index 5987d71..abc131d 100644 --- a/gcc/ada/libgnat/a-tideio.adb +++ b/gcc/ada/libgnat/a-tideio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tideio.ads b/gcc/ada/libgnat/a-tideio.ads index 3d9a4f2..c5be496 100644 --- a/gcc/ada/libgnat/a-tideio.ads +++ b/gcc/ada/libgnat/a-tideio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-tideio__128.adb b/gcc/ada/libgnat/a-tideio__128.adb index 76c69e2..ddc37e4 100644 --- a/gcc/ada/libgnat/a-tideio__128.adb +++ b/gcc/ada/libgnat/a-tideio__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tienau.adb b/gcc/ada/libgnat/a-tienau.adb index af30fef..2e3fbcc 100644 --- a/gcc/ada/libgnat/a-tienau.adb +++ b/gcc/ada/libgnat/a-tienau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -213,7 +213,7 @@ package body Ada.Text_IO.Enumeration_Aux is Start : out Natural; Stop : out Natural) is - C : Character; + C : Character; -- Processing for Scan_Enum_Lit diff --git a/gcc/ada/libgnat/a-tienau.ads b/gcc/ada/libgnat/a-tienau.ads index f1a8ea7..2a914ec 100644 --- a/gcc/ada/libgnat/a-tienau.ads +++ b/gcc/ada/libgnat/a-tienau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tienio.adb b/gcc/ada/libgnat/a-tienio.adb index c64d713..0ab0a6c 100644 --- a/gcc/ada/libgnat/a-tienio.adb +++ b/gcc/ada/libgnat/a-tienio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tifiau.adb b/gcc/ada/libgnat/a-tifiau.adb index baec136..6992049 100644 --- a/gcc/ada/libgnat/a-tifiau.adb +++ b/gcc/ada/libgnat/a-tifiau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tifiau.ads b/gcc/ada/libgnat/a-tifiau.ads index 6ce8b2c..27b7b1a 100644 --- a/gcc/ada/libgnat/a-tifiau.ads +++ b/gcc/ada/libgnat/a-tifiau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tifiio.adb b/gcc/ada/libgnat/a-tifiio.adb index d51abb4..a474841 100644 --- a/gcc/ada/libgnat/a-tifiio.adb +++ b/gcc/ada/libgnat/a-tifiio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tifiio__128.adb b/gcc/ada/libgnat/a-tifiio__128.adb index b161e89..af5ae46 100644 --- a/gcc/ada/libgnat/a-tifiio__128.adb +++ b/gcc/ada/libgnat/a-tifiio__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tiflau.adb b/gcc/ada/libgnat/a-tiflau.adb index fa10f3f..dafd464 100644 --- a/gcc/ada/libgnat/a-tiflau.adb +++ b/gcc/ada/libgnat/a-tiflau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tiflau.ads b/gcc/ada/libgnat/a-tiflau.ads index a095846..b95f6d2 100644 --- a/gcc/ada/libgnat/a-tiflau.ads +++ b/gcc/ada/libgnat/a-tiflau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tiflio.adb b/gcc/ada/libgnat/a-tiflio.adb index 1df3590..59ce2e3 100644 --- a/gcc/ada/libgnat/a-tiflio.adb +++ b/gcc/ada/libgnat/a-tiflio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tiflio.ads b/gcc/ada/libgnat/a-tiflio.ads index 9aab165..2760b0f 100644 --- a/gcc/ada/libgnat/a-tiflio.ads +++ b/gcc/ada/libgnat/a-tiflio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-tigeau.adb b/gcc/ada/libgnat/a-tigeau.adb index ef86ae0..0ca5a03 100644 --- a/gcc/ada/libgnat/a-tigeau.adb +++ b/gcc/ada/libgnat/a-tigeau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -317,7 +317,6 @@ package body Ada.Text_IO.Generic_Aux is Ptr : in out Integer) is Junk : Boolean; - pragma Unreferenced (Junk); begin Load_Extended_Digits (File, Buf, Ptr, Junk); end Load_Extended_Digits; @@ -385,7 +384,7 @@ package body Ada.Text_IO.Generic_Aux is Buf : out String; Ptr : in out Natural) is - Loaded : Boolean; + Loaded : Boolean; begin -- Skip initial blanks, and load possible sign diff --git a/gcc/ada/libgnat/a-tigeau.ads b/gcc/ada/libgnat/a-tigeau.ads index 40753e7..7e42161 100644 --- a/gcc/ada/libgnat/a-tigeau.ads +++ b/gcc/ada/libgnat/a-tigeau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tigeli.adb b/gcc/ada/libgnat/a-tigeli.adb index 9cd328c..15b4997 100644 --- a/gcc/ada/libgnat/a-tigeli.adb +++ b/gcc/ada/libgnat/a-tigeli.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tiinau.adb b/gcc/ada/libgnat/a-tiinau.adb index 4aaa93d..100c5c4 100644 --- a/gcc/ada/libgnat/a-tiinau.adb +++ b/gcc/ada/libgnat/a-tiinau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -54,7 +54,7 @@ package body Ada.Text_IO.Integer_Aux is Load_Integer (File, Buf, Stop); end if; - Item := Scan (Buf, Ptr'Access, Stop); + Scan (Buf, Ptr'Access, Stop, Item); Check_End_Of_Field (Buf, Stop, Ptr, Width); end Get; @@ -71,7 +71,7 @@ package body Ada.Text_IO.Integer_Aux is begin String_Skip (From, Pos); - Item := Scan (From, Pos'Access, From'Last); + Scan (From, Pos'Access, From'Last, Item); Last := Pos - 1; exception diff --git a/gcc/ada/libgnat/a-tiinau.ads b/gcc/ada/libgnat/a-tiinau.ads index 611849f..75eb915 100644 --- a/gcc/ada/libgnat/a-tiinau.ads +++ b/gcc/ada/libgnat/a-tiinau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -38,8 +38,11 @@ private generic type Num is (<>); - with function Scan - (Str : String; Ptr : not null access Integer; Max : Integer) return Num; + with procedure Scan + (Str : String; + Ptr : not null access Integer; + Max : Integer; + Res : out Num); with procedure Set_Image (V : Num; S : in out String; P : in out Natural); with procedure Set_Image_Width diff --git a/gcc/ada/libgnat/a-tiinio.adb b/gcc/ada/libgnat/a-tiinio.adb index 495c652..c92e6c96 100644 --- a/gcc/ada/libgnat/a-tiinio.adb +++ b/gcc/ada/libgnat/a-tiinio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tiinio.ads b/gcc/ada/libgnat/a-tiinio.ads index 833136c..77efd46 100644 --- a/gcc/ada/libgnat/a-tiinio.ads +++ b/gcc/ada/libgnat/a-tiinio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-tiinio__128.adb b/gcc/ada/libgnat/a-tiinio__128.adb index 4c42818..136b68d 100644 --- a/gcc/ada/libgnat/a-tiinio__128.adb +++ b/gcc/ada/libgnat/a-tiinio__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-timoio.adb b/gcc/ada/libgnat/a-timoio.adb index 3843d7b..510363c 100644 --- a/gcc/ada/libgnat/a-timoio.adb +++ b/gcc/ada/libgnat/a-timoio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-timoio.ads b/gcc/ada/libgnat/a-timoio.ads index 55c536b..8c28a0a 100644 --- a/gcc/ada/libgnat/a-timoio.ads +++ b/gcc/ada/libgnat/a-timoio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1993-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-timoio__128.adb b/gcc/ada/libgnat/a-timoio__128.adb index d475ce5..0780c9c 100644 --- a/gcc/ada/libgnat/a-timoio__128.adb +++ b/gcc/ada/libgnat/a-timoio__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tiocst.adb b/gcc/ada/libgnat/a-tiocst.adb index b870878..401fdf7 100644 --- a/gcc/ada/libgnat/a-tiocst.adb +++ b/gcc/ada/libgnat/a-tiocst.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tiocst.ads b/gcc/ada/libgnat/a-tiocst.ads index c2a05f0..50c76c6 100644 --- a/gcc/ada/libgnat/a-tiocst.ads +++ b/gcc/ada/libgnat/a-tiocst.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tirsfi.adb b/gcc/ada/libgnat/a-tirsfi.adb index 5c00c77..33f9d7f 100644 --- a/gcc/ada/libgnat/a-tirsfi.adb +++ b/gcc/ada/libgnat/a-tirsfi.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-tirsfi.ads b/gcc/ada/libgnat/a-tirsfi.ads index 7aed7ba..f10fa90 100644 --- a/gcc/ada/libgnat/a-tirsfi.ads +++ b/gcc/ada/libgnat/a-tirsfi.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-titest.adb b/gcc/ada/libgnat/a-titest.adb index db51b9e..451857f 100644 --- a/gcc/ada/libgnat/a-titest.adb +++ b/gcc/ada/libgnat/a-titest.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-undesu.adb b/gcc/ada/libgnat/a-undesu.adb index 4728048..d041b5d 100644 --- a/gcc/ada/libgnat/a-undesu.adb +++ b/gcc/ada/libgnat/a-undesu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wichha.adb b/gcc/ada/libgnat/a-wichha.adb index da8e39f..b0e49da 100644 --- a/gcc/ada/libgnat/a-wichha.adb +++ b/gcc/ada/libgnat/a-wichha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wichun.adb b/gcc/ada/libgnat/a-wichun.adb index 9bfb589..b967c03 100644 --- a/gcc/ada/libgnat/a-wichun.adb +++ b/gcc/ada/libgnat/a-wichun.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wichun.ads b/gcc/ada/libgnat/a-wichun.ads index 27ce111..e352388 100644 --- a/gcc/ada/libgnat/a-wichun.ads +++ b/gcc/ada/libgnat/a-wichun.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-witeio.adb b/gcc/ada/libgnat/a-witeio.adb index dbc0f2a..39203db 100644 --- a/gcc/ada/libgnat/a-witeio.adb +++ b/gcc/ada/libgnat/a-witeio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -274,7 +274,7 @@ package body Ada.Wide_Text_IO is ----------------- function End_Of_File (File : File_Type) return Boolean is - ch : int; + ch : int; begin FIO.Check_Read_Status (AP (File)); @@ -368,7 +368,7 @@ package body Ada.Wide_Text_IO is ----------------- function End_Of_Page (File : File_Type) return Boolean is - ch : int; + ch : int; begin FIO.Check_Read_Status (AP (File)); @@ -444,7 +444,7 @@ package body Ada.Wide_Text_IO is (File : File_Type; Item : out Wide_Character) is - C : Character; + C : Character; begin FIO.Check_Read_Status (AP (File)); diff --git a/gcc/ada/libgnat/a-witeio.ads b/gcc/ada/libgnat/a-witeio.ads index 910154d..b9e569d 100644 --- a/gcc/ada/libgnat/a-witeio.ads +++ b/gcc/ada/libgnat/a-witeio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-wrstfi.adb b/gcc/ada/libgnat/a-wrstfi.adb index ce8ce44..0d15ca5 100644 --- a/gcc/ada/libgnat/a-wrstfi.adb +++ b/gcc/ada/libgnat/a-wrstfi.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wrstfi.ads b/gcc/ada/libgnat/a-wrstfi.ads index b389bc7..805d940 100644 --- a/gcc/ada/libgnat/a-wrstfi.ads +++ b/gcc/ada/libgnat/a-wrstfi.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtcoau.adb b/gcc/ada/libgnat/a-wtcoau.adb index d8dd79f..5e17e44 100644 --- a/gcc/ada/libgnat/a-wtcoau.adb +++ b/gcc/ada/libgnat/a-wtcoau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtcoau.ads b/gcc/ada/libgnat/a-wtcoau.ads index 5541983..202fa61 100644 --- a/gcc/ada/libgnat/a-wtcoau.ads +++ b/gcc/ada/libgnat/a-wtcoau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtcoio.adb b/gcc/ada/libgnat/a-wtcoio.adb index fcca1bb..d55309b 100644 --- a/gcc/ada/libgnat/a-wtcoio.adb +++ b/gcc/ada/libgnat/a-wtcoio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtcstr.adb b/gcc/ada/libgnat/a-wtcstr.adb index acb6cc5..e00031c 100644 --- a/gcc/ada/libgnat/a-wtcstr.adb +++ b/gcc/ada/libgnat/a-wtcstr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtcstr.ads b/gcc/ada/libgnat/a-wtcstr.ads index e062d09..6f1c5a7 100644 --- a/gcc/ada/libgnat/a-wtcstr.ads +++ b/gcc/ada/libgnat/a-wtcstr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtdeau.adb b/gcc/ada/libgnat/a-wtdeau.adb index f1a65e0..df7c4e2 100644 --- a/gcc/ada/libgnat/a-wtdeau.adb +++ b/gcc/ada/libgnat/a-wtdeau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtdeau.ads b/gcc/ada/libgnat/a-wtdeau.ads index 00fbca59..7efcc05 100644 --- a/gcc/ada/libgnat/a-wtdeau.ads +++ b/gcc/ada/libgnat/a-wtdeau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtdeio.adb b/gcc/ada/libgnat/a-wtdeio.adb index f8c91d1..283fefb 100644 --- a/gcc/ada/libgnat/a-wtdeio.adb +++ b/gcc/ada/libgnat/a-wtdeio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtdeio__128.adb b/gcc/ada/libgnat/a-wtdeio__128.adb index 6a483e2..880e160 100644 --- a/gcc/ada/libgnat/a-wtdeio__128.adb +++ b/gcc/ada/libgnat/a-wtdeio__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtedit.adb b/gcc/ada/libgnat/a-wtedit.adb index 57ed1dd..64bb989 100644 --- a/gcc/ada/libgnat/a-wtedit.adb +++ b/gcc/ada/libgnat/a-wtedit.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -450,13 +450,13 @@ package body Ada.Wide_Text_IO.Editing is or else Pic.Start_Currency < Pic.Radix_Position then Answer (Pic.Start_Currency .. Pic.End_Currency) := - (others => ' '); + [others => ' ']; Answer (Pic.End_Currency - Currency_Symbol'Length + 1 .. Pic.End_Currency) := Currency_Symbol; else Answer (Pic.Start_Currency .. Pic.End_Currency) := - (others => ' '); + [others => ' ']; Answer (Pic.Start_Currency .. Pic.Start_Currency + Currency_Symbol'Length - 1) := Currency_Symbol; diff --git a/gcc/ada/libgnat/a-wtedit.ads b/gcc/ada/libgnat/a-wtedit.ads index 1736a15..ff2f53a 100644 --- a/gcc/ada/libgnat/a-wtedit.ads +++ b/gcc/ada/libgnat/a-wtedit.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-wtenau.adb b/gcc/ada/libgnat/a-wtenau.adb index 8a4dde9..5c102bc 100644 --- a/gcc/ada/libgnat/a-wtenau.adb +++ b/gcc/ada/libgnat/a-wtenau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -227,7 +227,7 @@ package body Ada.Wide_Text_IO.Enumeration_Aux is Start : out Natural; Stop : out Natural) is - WC : Wide_Character; + WC : Wide_Character; -- Processing for Scan_Enum_Lit diff --git a/gcc/ada/libgnat/a-wtenau.ads b/gcc/ada/libgnat/a-wtenau.ads index b26bc8a..2ba0438 100644 --- a/gcc/ada/libgnat/a-wtenau.ads +++ b/gcc/ada/libgnat/a-wtenau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtenio.adb b/gcc/ada/libgnat/a-wtenio.adb index 5a406f8..924e039 100644 --- a/gcc/ada/libgnat/a-wtenio.adb +++ b/gcc/ada/libgnat/a-wtenio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtfiau.adb b/gcc/ada/libgnat/a-wtfiau.adb index 66376b7..889beef 100644 --- a/gcc/ada/libgnat/a-wtfiau.adb +++ b/gcc/ada/libgnat/a-wtfiau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtfiau.ads b/gcc/ada/libgnat/a-wtfiau.ads index e557283..9af6ec1 100644 --- a/gcc/ada/libgnat/a-wtfiau.ads +++ b/gcc/ada/libgnat/a-wtfiau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtfiio.adb b/gcc/ada/libgnat/a-wtfiio.adb index 954ab95..b568335 100644 --- a/gcc/ada/libgnat/a-wtfiio.adb +++ b/gcc/ada/libgnat/a-wtfiio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtfiio__128.adb b/gcc/ada/libgnat/a-wtfiio__128.adb index d74902e..92cbf44 100644 --- a/gcc/ada/libgnat/a-wtfiio__128.adb +++ b/gcc/ada/libgnat/a-wtfiio__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtflau.adb b/gcc/ada/libgnat/a-wtflau.adb index 6f486b7..bcaca62 100644 --- a/gcc/ada/libgnat/a-wtflau.adb +++ b/gcc/ada/libgnat/a-wtflau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtflau.ads b/gcc/ada/libgnat/a-wtflau.ads index 0303b63..70d036c 100644 --- a/gcc/ada/libgnat/a-wtflau.ads +++ b/gcc/ada/libgnat/a-wtflau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtflio.adb b/gcc/ada/libgnat/a-wtflio.adb index acbe1f5..34a6ddd 100644 --- a/gcc/ada/libgnat/a-wtflio.adb +++ b/gcc/ada/libgnat/a-wtflio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtgeau.adb b/gcc/ada/libgnat/a-wtgeau.adb index ed823f1..0831c3a 100644 --- a/gcc/ada/libgnat/a-wtgeau.adb +++ b/gcc/ada/libgnat/a-wtgeau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -343,7 +343,6 @@ package body Ada.Wide_Text_IO.Generic_Aux is Ptr : in out Integer) is Junk : Boolean; - pragma Unreferenced (Junk); begin Load_Extended_Digits (File, Buf, Ptr, Junk); end Load_Extended_Digits; @@ -411,7 +410,7 @@ package body Ada.Wide_Text_IO.Generic_Aux is Buf : out String; Ptr : in out Natural) is - Loaded : Boolean; + Loaded : Boolean; begin -- Skip initial blanks and load possible sign diff --git a/gcc/ada/libgnat/a-wtgeau.ads b/gcc/ada/libgnat/a-wtgeau.ads index b3c1fa4..822ee83 100644 --- a/gcc/ada/libgnat/a-wtgeau.ads +++ b/gcc/ada/libgnat/a-wtgeau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtinau.adb b/gcc/ada/libgnat/a-wtinau.adb index 1630428..0628cc6 100644 --- a/gcc/ada/libgnat/a-wtinau.adb +++ b/gcc/ada/libgnat/a-wtinau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -54,7 +54,7 @@ package body Ada.Wide_Text_IO.Integer_Aux is Load_Integer (File, Buf, Stop); end if; - Item := Scan (Buf, Ptr'Access, Stop); + Scan (Buf, Ptr'Access, Stop, Item); Check_End_Of_Field (Buf, Stop, Ptr, Width); end Get; @@ -71,7 +71,7 @@ package body Ada.Wide_Text_IO.Integer_Aux is begin String_Skip (From, Pos); - Item := Scan (From, Pos'Access, From'Last); + Scan (From, Pos'Access, From'Last, Item); Last := Pos - 1; exception diff --git a/gcc/ada/libgnat/a-wtinau.ads b/gcc/ada/libgnat/a-wtinau.ads index 661f25e..37ac2d1 100644 --- a/gcc/ada/libgnat/a-wtinau.ads +++ b/gcc/ada/libgnat/a-wtinau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -38,8 +38,11 @@ private generic type Num is (<>); - with function Scan - (Str : String; Ptr : not null access Integer; Max : Integer) return Num; + with procedure Scan + (Str : String; + Ptr : not null access Integer; + Max : Integer; + Res : out Num); with procedure Set_Image (V : Num; S : in out String; P : in out Natural); with procedure Set_Image_Width diff --git a/gcc/ada/libgnat/a-wtinio.adb b/gcc/ada/libgnat/a-wtinio.adb index 336b591..27191fe 100644 --- a/gcc/ada/libgnat/a-wtinio.adb +++ b/gcc/ada/libgnat/a-wtinio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtinio__128.adb b/gcc/ada/libgnat/a-wtinio__128.adb index 8c0191d..6a364c8 100644 --- a/gcc/ada/libgnat/a-wtinio__128.adb +++ b/gcc/ada/libgnat/a-wtinio__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtmoio.adb b/gcc/ada/libgnat/a-wtmoio.adb index ffefa13..446df8a 100644 --- a/gcc/ada/libgnat/a-wtmoio.adb +++ b/gcc/ada/libgnat/a-wtmoio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wtmoio.ads b/gcc/ada/libgnat/a-wtmoio.ads index d772c41..d95c2a3 100644 --- a/gcc/ada/libgnat/a-wtmoio.ads +++ b/gcc/ada/libgnat/a-wtmoio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- diff --git a/gcc/ada/libgnat/a-wtmoio__128.adb b/gcc/ada/libgnat/a-wtmoio__128.adb index 155f312..ac83e09 100644 --- a/gcc/ada/libgnat/a-wtmoio__128.adb +++ b/gcc/ada/libgnat/a-wtmoio__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wttest.adb b/gcc/ada/libgnat/a-wttest.adb index 69eb6be..885b8d5 100644 --- a/gcc/ada/libgnat/a-wttest.adb +++ b/gcc/ada/libgnat/a-wttest.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-wwboio.adb b/gcc/ada/libgnat/a-wwboio.adb index a5c85a1..c7e333d 100644 --- a/gcc/ada/libgnat/a-wwboio.adb +++ b/gcc/ada/libgnat/a-wwboio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,6 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Wide_Text_IO; use Ada.Wide_Text_IO; with Ada.Unchecked_Deallocation; package body Ada.Wide_Text_IO.Wide_Bounded_IO is diff --git a/gcc/ada/libgnat/a-zchhan.adb b/gcc/ada/libgnat/a-zchhan.adb index 61405f7..99007db 100644 --- a/gcc/ada/libgnat/a-zchhan.adb +++ b/gcc/ada/libgnat/a-zchhan.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-zchuni.adb b/gcc/ada/libgnat/a-zchuni.adb index 3c6e720..dea8a13 100644 --- a/gcc/ada/libgnat/a-zchuni.adb +++ b/gcc/ada/libgnat/a-zchuni.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-zchuni.ads b/gcc/ada/libgnat/a-zchuni.ads index 0030fd1..9d8764a 100644 --- a/gcc/ada/libgnat/a-zchuni.ads +++ b/gcc/ada/libgnat/a-zchuni.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-zrstfi.adb b/gcc/ada/libgnat/a-zrstfi.adb index ba07af8..d81bff4 100644 --- a/gcc/ada/libgnat/a-zrstfi.adb +++ b/gcc/ada/libgnat/a-zrstfi.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-zrstfi.ads b/gcc/ada/libgnat/a-zrstfi.ads index 56d3ef4..6e06b60 100644 --- a/gcc/ada/libgnat/a-zrstfi.ads +++ b/gcc/ada/libgnat/a-zrstfi.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztcoau.adb b/gcc/ada/libgnat/a-ztcoau.adb index a367827..2f62810 100644 --- a/gcc/ada/libgnat/a-ztcoau.adb +++ b/gcc/ada/libgnat/a-ztcoau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztcoio.adb b/gcc/ada/libgnat/a-ztcoio.adb index 9ec590a..5c1bcfb 100644 --- a/gcc/ada/libgnat/a-ztcoio.adb +++ b/gcc/ada/libgnat/a-ztcoio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztcstr.adb b/gcc/ada/libgnat/a-ztcstr.adb index e4aa3c1..bed7026 100644 --- a/gcc/ada/libgnat/a-ztcstr.adb +++ b/gcc/ada/libgnat/a-ztcstr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztcstr.ads b/gcc/ada/libgnat/a-ztcstr.ads index 86c65d79..a9eb40c 100644 --- a/gcc/ada/libgnat/a-ztcstr.ads +++ b/gcc/ada/libgnat/a-ztcstr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztdeau.adb b/gcc/ada/libgnat/a-ztdeau.adb index 71e214c1..744bb61 100644 --- a/gcc/ada/libgnat/a-ztdeau.adb +++ b/gcc/ada/libgnat/a-ztdeau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztdeau.ads b/gcc/ada/libgnat/a-ztdeau.ads index b70fb21..dc13d33 100644 --- a/gcc/ada/libgnat/a-ztdeau.ads +++ b/gcc/ada/libgnat/a-ztdeau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztdeio.adb b/gcc/ada/libgnat/a-ztdeio.adb index c8bf59f..544a6fd 100644 --- a/gcc/ada/libgnat/a-ztdeio.adb +++ b/gcc/ada/libgnat/a-ztdeio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztdeio__128.adb b/gcc/ada/libgnat/a-ztdeio__128.adb index 11cbb01..51045f6 100644 --- a/gcc/ada/libgnat/a-ztdeio__128.adb +++ b/gcc/ada/libgnat/a-ztdeio__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztedit.adb b/gcc/ada/libgnat/a-ztedit.adb index b044621..459e7e7 100644 --- a/gcc/ada/libgnat/a-ztedit.adb +++ b/gcc/ada/libgnat/a-ztedit.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -451,13 +451,13 @@ package body Ada.Wide_Wide_Text_IO.Editing is or else Pic.Start_Currency < Pic.Radix_Position then Answer (Pic.Start_Currency .. Pic.End_Currency) := - (others => ' '); + [others => ' ']; Answer (Pic.End_Currency - Currency_Symbol'Length + 1 .. Pic.End_Currency) := Currency_Symbol; else Answer (Pic.Start_Currency .. Pic.End_Currency) := - (others => ' '); + [others => ' ']; Answer (Pic.Start_Currency .. Pic.Start_Currency + Currency_Symbol'Length - 1) := Currency_Symbol; diff --git a/gcc/ada/libgnat/a-ztedit.ads b/gcc/ada/libgnat/a-ztedit.ads index d846432..ef2ed90 100644 --- a/gcc/ada/libgnat/a-ztedit.ads +++ b/gcc/ada/libgnat/a-ztedit.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-ztenau.adb b/gcc/ada/libgnat/a-ztenau.adb index f4bffec..b03ad8f 100644 --- a/gcc/ada/libgnat/a-ztenau.adb +++ b/gcc/ada/libgnat/a-ztenau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -229,7 +229,7 @@ package body Ada.Wide_Wide_Text_IO.Enumeration_Aux is Start : out Natural; Stop : out Natural) is - WC : Wide_Wide_Character; + WC : Wide_Wide_Character; -- Processing for Scan_Enum_Lit diff --git a/gcc/ada/libgnat/a-ztenau.ads b/gcc/ada/libgnat/a-ztenau.ads index 263072f..8dd4f3b 100644 --- a/gcc/ada/libgnat/a-ztenau.ads +++ b/gcc/ada/libgnat/a-ztenau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztenio.adb b/gcc/ada/libgnat/a-ztenio.adb index 998632b..bb383d5 100644 --- a/gcc/ada/libgnat/a-ztenio.adb +++ b/gcc/ada/libgnat/a-ztenio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztexio.adb b/gcc/ada/libgnat/a-ztexio.adb index b72a1d4..db0017e 100644 --- a/gcc/ada/libgnat/a-ztexio.adb +++ b/gcc/ada/libgnat/a-ztexio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -274,7 +274,7 @@ package body Ada.Wide_Wide_Text_IO is ----------------- function End_Of_File (File : File_Type) return Boolean is - ch : int; + ch : int; begin FIO.Check_Read_Status (AP (File)); @@ -368,7 +368,7 @@ package body Ada.Wide_Wide_Text_IO is ----------------- function End_Of_Page (File : File_Type) return Boolean is - ch : int; + ch : int; begin FIO.Check_Read_Status (AP (File)); @@ -444,7 +444,7 @@ package body Ada.Wide_Wide_Text_IO is (File : File_Type; Item : out Wide_Wide_Character) is - C : Character; + C : Character; begin FIO.Check_Read_Status (AP (File)); diff --git a/gcc/ada/libgnat/a-ztexio.ads b/gcc/ada/libgnat/a-ztexio.ads index 5983e0e..2986149 100644 --- a/gcc/ada/libgnat/a-ztexio.ads +++ b/gcc/ada/libgnat/a-ztexio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/a-ztfiau.adb b/gcc/ada/libgnat/a-ztfiau.adb index 340b90a..06c7cb9 100644 --- a/gcc/ada/libgnat/a-ztfiau.adb +++ b/gcc/ada/libgnat/a-ztfiau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztfiau.ads b/gcc/ada/libgnat/a-ztfiau.ads index 23a7ee9..6291926 100644 --- a/gcc/ada/libgnat/a-ztfiau.ads +++ b/gcc/ada/libgnat/a-ztfiau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztfiio.adb b/gcc/ada/libgnat/a-ztfiio.adb index 5c12e2a..2f2664e 100644 --- a/gcc/ada/libgnat/a-ztfiio.adb +++ b/gcc/ada/libgnat/a-ztfiio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztfiio__128.adb b/gcc/ada/libgnat/a-ztfiio__128.adb index f089fd6..72cd17f 100644 --- a/gcc/ada/libgnat/a-ztfiio__128.adb +++ b/gcc/ada/libgnat/a-ztfiio__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztflau.adb b/gcc/ada/libgnat/a-ztflau.adb index d7dd9e2..74a01c1 100644 --- a/gcc/ada/libgnat/a-ztflau.adb +++ b/gcc/ada/libgnat/a-ztflau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztflau.ads b/gcc/ada/libgnat/a-ztflau.ads index 769e20e..76ce423 100644 --- a/gcc/ada/libgnat/a-ztflau.ads +++ b/gcc/ada/libgnat/a-ztflau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztflio.adb b/gcc/ada/libgnat/a-ztflio.adb index 7550695..69f5f01 100644 --- a/gcc/ada/libgnat/a-ztflio.adb +++ b/gcc/ada/libgnat/a-ztflio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztgeau.adb b/gcc/ada/libgnat/a-ztgeau.adb index 9a4fdb0..42e4daf 100644 --- a/gcc/ada/libgnat/a-ztgeau.adb +++ b/gcc/ada/libgnat/a-ztgeau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -343,7 +343,6 @@ package body Ada.Wide_Wide_Text_IO.Generic_Aux is Ptr : in out Integer) is Junk : Boolean; - pragma Unreferenced (Junk); begin Load_Extended_Digits (File, Buf, Ptr, Junk); end Load_Extended_Digits; @@ -411,7 +410,7 @@ package body Ada.Wide_Wide_Text_IO.Generic_Aux is Buf : out String; Ptr : in out Natural) is - Loaded : Boolean; + Loaded : Boolean; begin -- Skip initial blanks and load possible sign diff --git a/gcc/ada/libgnat/a-ztgeau.ads b/gcc/ada/libgnat/a-ztgeau.ads index c885028..aa8ade4 100644 --- a/gcc/ada/libgnat/a-ztgeau.ads +++ b/gcc/ada/libgnat/a-ztgeau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztinau.adb b/gcc/ada/libgnat/a-ztinau.adb index 8693557..d7df8ef 100644 --- a/gcc/ada/libgnat/a-ztinau.adb +++ b/gcc/ada/libgnat/a-ztinau.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -54,7 +54,7 @@ package body Ada.Wide_Wide_Text_IO.Integer_Aux is Load_Integer (File, Buf, Stop); end if; - Item := Scan (Buf, Ptr'Access, Stop); + Scan (Buf, Ptr'Access, Stop, Item); Check_End_Of_Field (Buf, Stop, Ptr, Width); end Get; @@ -71,7 +71,7 @@ package body Ada.Wide_Wide_Text_IO.Integer_Aux is begin String_Skip (From, Pos); - Item := Scan (From, Pos'Access, From'Last); + Scan (From, Pos'Access, From'Last, Item); Last := Pos - 1; exception diff --git a/gcc/ada/libgnat/a-ztinau.ads b/gcc/ada/libgnat/a-ztinau.ads index dc40c7e..c1871af 100644 --- a/gcc/ada/libgnat/a-ztinau.ads +++ b/gcc/ada/libgnat/a-ztinau.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -38,8 +38,11 @@ private generic type Num is (<>); - with function Scan - (Str : String; Ptr : not null access Integer; Max : Integer) return Num; + with procedure Scan + (Str : String; + Ptr : not null access Integer; + Max : Integer; + Res : out Num); with procedure Set_Image (V : Num; S : in out String; P : in out Natural); with procedure Set_Image_Width diff --git a/gcc/ada/libgnat/a-ztinio.adb b/gcc/ada/libgnat/a-ztinio.adb index 5050188..442323d 100644 --- a/gcc/ada/libgnat/a-ztinio.adb +++ b/gcc/ada/libgnat/a-ztinio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztinio__128.adb b/gcc/ada/libgnat/a-ztinio__128.adb index 942df64..5ebfc8a 100644 --- a/gcc/ada/libgnat/a-ztinio__128.adb +++ b/gcc/ada/libgnat/a-ztinio__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztmoio.adb b/gcc/ada/libgnat/a-ztmoio.adb index a312091..dfdcd2d 100644 --- a/gcc/ada/libgnat/a-ztmoio.adb +++ b/gcc/ada/libgnat/a-ztmoio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-ztmoio__128.adb b/gcc/ada/libgnat/a-ztmoio__128.adb index 41991c2..4e37863 100644 --- a/gcc/ada/libgnat/a-ztmoio__128.adb +++ b/gcc/ada/libgnat/a-ztmoio__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-zttest.adb b/gcc/ada/libgnat/a-zttest.adb index d4c1ef0..9e31cb8 100644 --- a/gcc/ada/libgnat/a-zttest.adb +++ b/gcc/ada/libgnat/a-zttest.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/a-zzboio.adb b/gcc/ada/libgnat/a-zzboio.adb index 8cdc027..d04aed6 100644 --- a/gcc/ada/libgnat/a-zzboio.adb +++ b/gcc/ada/libgnat/a-zzboio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,6 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Wide_Wide_Text_IO; use Ada.Wide_Wide_Text_IO; with Ada.Unchecked_Deallocation; package body Ada.Wide_Wide_Text_IO.Wide_Wide_Bounded_IO is diff --git a/gcc/ada/libgnat/g-allein.ads b/gcc/ada/libgnat/g-allein.ads index 9b381d3..b0a4884 100644 --- a/gcc/ada/libgnat/g-allein.ads +++ b/gcc/ada/libgnat/g-allein.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-alleve.adb b/gcc/ada/libgnat/g-alleve.adb index 5dc7230..0dba029 100644 --- a/gcc/ada/libgnat/g-alleve.adb +++ b/gcc/ada/libgnat/g-alleve.adb @@ -7,7 +7,7 @@ -- B o d y -- -- (Soft Binding Version) -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-alleve.ads b/gcc/ada/libgnat/g-alleve.ads index cf0028a..4811096 100644 --- a/gcc/ada/libgnat/g-alleve.ads +++ b/gcc/ada/libgnat/g-alleve.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Soft Binding Version) -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-alleve__hard.adb b/gcc/ada/libgnat/g-alleve__hard.adb index f2f8ac2..3de5f79 100644 --- a/gcc/ada/libgnat/g-alleve__hard.adb +++ b/gcc/ada/libgnat/g-alleve__hard.adb @@ -7,7 +7,7 @@ -- B o d y -- -- (Hard Binding Version) -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-alleve__hard.ads b/gcc/ada/libgnat/g-alleve__hard.ads index b8a3281..b230a5a 100644 --- a/gcc/ada/libgnat/g-alleve__hard.ads +++ b/gcc/ada/libgnat/g-alleve__hard.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Hard Binding Version) -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-altcon.adb b/gcc/ada/libgnat/g-altcon.adb index 58975f4..0421767 100644 --- a/gcc/ada/libgnat/g-altcon.adb +++ b/gcc/ada/libgnat/g-altcon.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-altcon.ads b/gcc/ada/libgnat/g-altcon.ads index ad84a80..f3935e8 100644 --- a/gcc/ada/libgnat/g-altcon.ads +++ b/gcc/ada/libgnat/g-altcon.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-altive.ads b/gcc/ada/libgnat/g-altive.ads index 32e603a..86cb2f0 100644 --- a/gcc/ada/libgnat/g-altive.ads +++ b/gcc/ada/libgnat/g-altive.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-alveop.adb b/gcc/ada/libgnat/g-alveop.adb index 65a1115..5160e57 100644 --- a/gcc/ada/libgnat/g-alveop.adb +++ b/gcc/ada/libgnat/g-alveop.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-alveop.ads b/gcc/ada/libgnat/g-alveop.ads index 3250fdf..5323137 100644 --- a/gcc/ada/libgnat/g-alveop.ads +++ b/gcc/ada/libgnat/g-alveop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-alvety.ads b/gcc/ada/libgnat/g-alvety.ads index 3fec714..03b84ec 100644 --- a/gcc/ada/libgnat/g-alvety.ads +++ b/gcc/ada/libgnat/g-alvety.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-alvevi.ads b/gcc/ada/libgnat/g-alvevi.ads index 8c10959..27ac8c7 100644 --- a/gcc/ada/libgnat/g-alvevi.ads +++ b/gcc/ada/libgnat/g-alvevi.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-arrspl.adb b/gcc/ada/libgnat/g-arrspl.adb index 6a8518b..38a3245 100644 --- a/gcc/ada/libgnat/g-arrspl.adb +++ b/gcc/ada/libgnat/g-arrspl.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -181,20 +181,20 @@ package body GNAT.Array_Split is then -- Whole string, or no separator used - return (Before => Array_End, - After => Array_End); + return [Before => Array_End, + After => Array_End]; elsif Index = 1 then - return (Before => Array_End, - After => S.D.Source (S.D.Slices (Index).Stop + 1)); + return [Before => Array_End, + After => S.D.Source (S.D.Slices (Index).Stop + 1)]; elsif Index = S.D.N_Slice then - return (Before => S.D.Source (S.D.Slices (Index).Start - 1), - After => Array_End); + return [Before => S.D.Source (S.D.Slices (Index).Start - 1), + After => Array_End]; else - return (Before => S.D.Source (S.D.Slices (Index).Start - 1), - After => S.D.Source (S.D.Slices (Index).Stop + 1)); + return [Before => S.D.Source (S.D.Slices (Index).Start - 1), + After => S.D.Source (S.D.Slices (Index).Stop + 1)]; end if; end Separators; diff --git a/gcc/ada/libgnat/g-arrspl.ads b/gcc/ada/libgnat/g-arrspl.ads index 3d943c0..625c13b 100644 --- a/gcc/ada/libgnat/g-arrspl.ads +++ b/gcc/ada/libgnat/g-arrspl.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-awk.adb b/gcc/ada/libgnat/g-awk.adb index c48d7ef..1c88785 100644 --- a/gcc/ada/libgnat/g-awk.adb +++ b/gcc/ada/libgnat/g-awk.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-awk.ads b/gcc/ada/libgnat/g-awk.ads index b499101..906af51 100644 --- a/gcc/ada/libgnat/g-awk.ads +++ b/gcc/ada/libgnat/g-awk.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-binenv.adb b/gcc/ada/libgnat/g-binenv.adb index 4bf39cd..00d9809 100644 --- a/gcc/ada/libgnat/g-binenv.adb +++ b/gcc/ada/libgnat/g-binenv.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2015-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-binenv.ads b/gcc/ada/libgnat/g-binenv.ads index ba9a9b1..6bd7cbb 100644 --- a/gcc/ada/libgnat/g-binenv.ads +++ b/gcc/ada/libgnat/g-binenv.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2015-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-brapre.ads b/gcc/ada/libgnat/g-brapre.ads index 21ae351..a106f55 100644 --- a/gcc/ada/libgnat/g-brapre.ads +++ b/gcc/ada/libgnat/g-brapre.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2019-2021, AdaCore -- +-- Copyright (C) 2019-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-bubsor.adb b/gcc/ada/libgnat/g-bubsor.adb index 70d50fc..16ea7bf 100644 --- a/gcc/ada/libgnat/g-bubsor.adb +++ b/gcc/ada/libgnat/g-bubsor.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-bubsor.ads b/gcc/ada/libgnat/g-bubsor.ads index acf47ed..f29f128 100644 --- a/gcc/ada/libgnat/g-bubsor.ads +++ b/gcc/ada/libgnat/g-bubsor.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-busora.adb b/gcc/ada/libgnat/g-busora.adb index 08317e7..973fc12 100644 --- a/gcc/ada/libgnat/g-busora.adb +++ b/gcc/ada/libgnat/g-busora.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-busora.ads b/gcc/ada/libgnat/g-busora.ads index 670e7b6..479f1ea 100644 --- a/gcc/ada/libgnat/g-busora.ads +++ b/gcc/ada/libgnat/g-busora.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-busorg.adb b/gcc/ada/libgnat/g-busorg.adb index 0f74f59..e5d747d 100644 --- a/gcc/ada/libgnat/g-busorg.adb +++ b/gcc/ada/libgnat/g-busorg.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-busorg.ads b/gcc/ada/libgnat/g-busorg.ads index 64d6d03..0139c20 100644 --- a/gcc/ada/libgnat/g-busorg.ads +++ b/gcc/ada/libgnat/g-busorg.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-byorma.adb b/gcc/ada/libgnat/g-byorma.adb index 451549d..6887baf 100644 --- a/gcc/ada/libgnat/g-byorma.adb +++ b/gcc/ada/libgnat/g-byorma.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2006-2021, AdaCore -- +-- Copyright (C) 2006-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package body GNAT.Byte_Order_Mark is -------------- diff --git a/gcc/ada/libgnat/g-byorma.ads b/gcc/ada/libgnat/g-byorma.ads index e7b6275..1b18169 100644 --- a/gcc/ada/libgnat/g-byorma.ads +++ b/gcc/ada/libgnat/g-byorma.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2006-2021, AdaCore -- +-- Copyright (C) 2006-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -61,8 +61,6 @@ -- cases depend on the first character of the XML file being < so that the -- encoding of this character can be recognized. -pragma Compiler_Unit_Warning; - package GNAT.Byte_Order_Mark is type BOM_Kind is diff --git a/gcc/ada/libgnat/g-bytswa.adb b/gcc/ada/libgnat/g-bytswa.adb index c37073e..6a0260f 100644 --- a/gcc/ada/libgnat/g-bytswa.adb +++ b/gcc/ada/libgnat/g-bytswa.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2006-2021, AdaCore -- +-- Copyright (C) 2006-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-bytswa.ads b/gcc/ada/libgnat/g-bytswa.ads index d8bbb00..4742693 100644 --- a/gcc/ada/libgnat/g-bytswa.ads +++ b/gcc/ada/libgnat/g-bytswa.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2006-2021, AdaCore -- +-- Copyright (C) 2006-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-calend.adb b/gcc/ada/libgnat/g-calend.adb index 8200b60..61294aa 100644 --- a/gcc/ada/libgnat/g-calend.adb +++ b/gcc/ada/libgnat/g-calend.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -44,7 +44,6 @@ package body GNAT.Calendar is Month : Month_Number; Day : Day_Number; Day_Secs : Day_Duration; - pragma Unreferenced (Day_Secs); begin Split (Date, Year, Month, Day, Day_Secs); return Julian_Day (Year, Month, Day) - Julian_Day (Year, 1, 1) + 1; @@ -59,7 +58,6 @@ package body GNAT.Calendar is Month : Month_Number; Day : Day_Number; Day_Secs : Day_Duration; - pragma Unreferenced (Day_Secs); begin Split (Date, Year, Month, Day, Day_Secs); return Day_Name'Val ((Julian_Day (Year, Month, Day)) mod 7); @@ -77,7 +75,6 @@ package body GNAT.Calendar is Minute : Minute_Number; Second : Second_Number; Sub_Second : Second_Duration; - pragma Unreferenced (Year, Month, Day, Minute, Second, Sub_Second); begin Split (Date, Year, Month, Day, Hour, Minute, Second, Sub_Second); return Hour; @@ -137,7 +134,6 @@ package body GNAT.Calendar is Minute : Minute_Number; Second : Second_Number; Sub_Second : Second_Duration; - pragma Unreferenced (Year, Month, Day, Hour, Second, Sub_Second); begin Split (Date, Year, Month, Day, Hour, Minute, Second, Sub_Second); return Minute; @@ -155,7 +151,6 @@ package body GNAT.Calendar is Minute : Minute_Number; Second : Second_Number; Sub_Second : Second_Duration; - pragma Unreferenced (Year, Month, Day, Hour, Minute, Sub_Second); begin Split (Date, Year, Month, Day, Hour, Minute, Second, Sub_Second); return Second; @@ -222,8 +217,6 @@ package body GNAT.Calendar is Ds : Day_Duration; Le : Boolean; - pragma Unreferenced (Ds, Le); - begin -- Even though the input time zone is UTC (0), the flag Use_TZ will -- ensure that Split picks up the local time zone. ???But Use_TZ is @@ -257,7 +250,6 @@ package body GNAT.Calendar is Minute : Minute_Number; Second : Second_Number; Sub_Second : Second_Duration; - pragma Unreferenced (Year, Month, Day, Hour, Minute, Second); begin Split (Date, Year, Month, Day, Hour, Minute, Second, Sub_Second); return Sub_Second; @@ -398,7 +390,6 @@ package body GNAT.Calendar is function Week_In_Year (Date : Time) return Week_In_Year_Number is Year : Year_Number; Week : Week_In_Year_Number; - pragma Unreferenced (Year); begin Year_Week_In_Year (Date, Year, Week); return Week; @@ -423,8 +414,6 @@ package body GNAT.Calendar is Shift : Week_In_Year_Number; Start_Week : Week_In_Year_Number; - pragma Unreferenced (Hour, Minute, Second, Sub_Second); - function Is_Leap (Year : Year_Number) return Boolean; -- Return True if Year denotes a leap year. Leap centennial years are -- properly handled. diff --git a/gcc/ada/libgnat/g-calend.ads b/gcc/ada/libgnat/g-calend.ads index 29f055f..efa295f 100644 --- a/gcc/ada/libgnat/g-calend.ads +++ b/gcc/ada/libgnat/g-calend.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-casuti.adb b/gcc/ada/libgnat/g-casuti.adb index d18f452..5b5af16 100644 --- a/gcc/ada/libgnat/g-casuti.adb +++ b/gcc/ada/libgnat/g-casuti.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-casuti.ads b/gcc/ada/libgnat/g-casuti.ads index f711711..3f8079b 100644 --- a/gcc/ada/libgnat/g-casuti.ads +++ b/gcc/ada/libgnat/g-casuti.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-catiio.adb b/gcc/ada/libgnat/g-catiio.adb index 462e0d2..5e5a7d8 100644 --- a/gcc/ada/libgnat/g-catiio.adb +++ b/gcc/ada/libgnat/g-catiio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -627,8 +627,8 @@ package body GNAT.Calendar.Time_IO is subtype String3 is String (1 .. 3); Abbrev_Upper_Month_Names : constant array (Ada.Calendar.Month_Number) of String3 := - ("JAN", "FEB", "MAR", "APR", "MAY", "JUN", - "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"); + ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", + "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"]; -- Short version of the month names, used when parsing date strings S : String := Str; diff --git a/gcc/ada/libgnat/g-catiio.ads b/gcc/ada/libgnat/g-catiio.ads index 3c2cef9..3930ae1 100644 --- a/gcc/ada/libgnat/g-catiio.ads +++ b/gcc/ada/libgnat/g-catiio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-cgi.adb b/gcc/ada/libgnat/g-cgi.adb index 0c3b6a4..007b466 100644 --- a/gcc/ada/libgnat/g-cgi.adb +++ b/gcc/ada/libgnat/g-cgi.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-cgi.ads b/gcc/ada/libgnat/g-cgi.ads index 2108cda..ec805e1 100644 --- a/gcc/ada/libgnat/g-cgi.ads +++ b/gcc/ada/libgnat/g-cgi.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-cgicoo.adb b/gcc/ada/libgnat/g-cgicoo.adb index 4f5f120..be060bc 100644 --- a/gcc/ada/libgnat/g-cgicoo.adb +++ b/gcc/ada/libgnat/g-cgicoo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-cgicoo.ads b/gcc/ada/libgnat/g-cgicoo.ads index 4e59abc..09f5634 100644 --- a/gcc/ada/libgnat/g-cgicoo.ads +++ b/gcc/ada/libgnat/g-cgicoo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-cgideb.adb b/gcc/ada/libgnat/g-cgideb.adb index f127ded..118abfa 100644 --- a/gcc/ada/libgnat/g-cgideb.adb +++ b/gcc/ada/libgnat/g-cgideb.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -167,7 +167,7 @@ package body GNAT.CGI.Debug is package body HTML_IO is - NL : constant String := (1 => ASCII.LF); + NL : constant String := [ASCII.LF]; function Bold (S : String) return String; -- Returns S as an HTML bold string @@ -270,7 +270,7 @@ package body GNAT.CGI.Debug is function Title (IO : Format; Str : String) return String is Spaces : constant Natural := (80 - Str'Length) / 2; - Indent : constant String (1 .. Spaces) := (others => ' '); + Indent : constant String (1 .. Spaces) := [others => ' ']; begin return Indent & Str & New_Line (IO); end Title; diff --git a/gcc/ada/libgnat/g-cgideb.ads b/gcc/ada/libgnat/g-cgideb.ads index bb9a0f3..153ab43 100644 --- a/gcc/ada/libgnat/g-cgideb.ads +++ b/gcc/ada/libgnat/g-cgideb.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-comlin.adb b/gcc/ada/libgnat/g-comlin.adb index 7f7040b..e583c27 100644 --- a/gcc/ada/libgnat/g-comlin.adb +++ b/gcc/ada/libgnat/g-comlin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -465,8 +465,8 @@ package body GNAT.Command_Line is if Do_Expansion then declare - Arg : constant String := - Argument (Parser, Parser.Current_Argument - 1); + Arg : constant String := + Argument (Parser, Parser.Current_Argument - 1); begin for Index in Arg'Range loop if Arg (Index) in '*' | '?' | '[' then @@ -1063,7 +1063,7 @@ package body GNAT.Command_Line is Parser.In_Expansion := False; Parser.Switch_Character := Switch_Char; Parser.Stop_At_First := Stop_At_First_Non_Switch; - Parser.Section := (others => 1); + Parser.Section := [others => 1]; -- If we are using sections, we have to preprocess the command line to -- delimit them. A section can be repeated, so we just give each item @@ -1257,7 +1257,7 @@ package body GNAT.Command_Line is Expanded : String; Section : String := "") is - Def : Alias_Definition; + Def : Alias_Definition; begin if Config = null then @@ -2235,7 +2235,6 @@ package body GNAT.Command_Line is Add_Before : Boolean := False) is Success : Boolean; - pragma Unreferenced (Success); begin Add_Switch (Cmd, Switch, Parameter, Separator, Section, Add_Before, Success); @@ -2453,7 +2452,6 @@ package body GNAT.Command_Line is Section : String := "") is Success : Boolean; - pragma Unreferenced (Success); begin Remove_Switch (Cmd, Switch, Remove_All, Has_Parameter, Section, Success); end Remove_Switch; @@ -3225,7 +3223,7 @@ package body GNAT.Command_Line is if N /= "" then Put (" "); Put (N); - Put ((1 .. Max_Len - N'Length + 1 => ' ')); + Put ([1 .. Max_Len - N'Length + 1 => ' ']); if Config.Switches (S).Help /= null then Put (Config.Switches (S).Help.all); @@ -3243,8 +3241,8 @@ package body GNAT.Command_Line is if Config.Aliases (A).Section.all = Section then Put (" "); Put (Config.Aliases (A).Alias.all); - Put ((1 .. Max_Len - Config.Aliases (A).Alias'Length + 1 - => ' ')); + Put ([1 .. Max_Len - Config.Aliases (A).Alias'Length + 1 + => ' ']); Put ("Equivalent to " & Config.Aliases (A).Expansion.all); New_Line; end if; diff --git a/gcc/ada/libgnat/g-comlin.ads b/gcc/ada/libgnat/g-comlin.ads index e5f493e..a2d9071 100644 --- a/gcc/ada/libgnat/g-comlin.ads +++ b/gcc/ada/libgnat/g-comlin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1097,11 +1097,11 @@ private -- This type and this variable are provided to store the current switch -- and parameter. - Is_Switch : Is_Switch_Type (1 .. Arg_Count) := (others => False); + Is_Switch : Is_Switch_Type (1 .. Arg_Count) := [others => False]; -- Indicates wich arguments on the command line are considered not be -- switches or parameters to switches (leaving e.g. filenames,...) - Section : Section_Type (1 .. Arg_Count) := (others => 1); + Section : Section_Type (1 .. Arg_Count) := [others => 1]; -- Contains the number of the section associated with the current -- switch. If this number is 0, then it is a section delimiter, which is -- never returned by GetOpt. diff --git a/gcc/ada/libgnat/g-comver.adb b/gcc/ada/libgnat/g-comver.adb index 575caac..70ae5c7 100644 --- a/gcc/ada/libgnat/g-comver.adb +++ b/gcc/ada/libgnat/g-comver.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-comver.ads b/gcc/ada/libgnat/g-comver.ads index 7de2811..7768bf9 100644 --- a/gcc/ada/libgnat/g-comver.ads +++ b/gcc/ada/libgnat/g-comver.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-cppexc.adb b/gcc/ada/libgnat/g-cppexc.adb index f20eb7e..d805e68 100644 --- a/gcc/ada/libgnat/g-cppexc.adb +++ b/gcc/ada/libgnat/g-cppexc.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2013-2021, AdaCore -- +-- Copyright (C) 2013-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-cppexc.ads b/gcc/ada/libgnat/g-cppexc.ads index ddfa02c..8791437 100644 --- a/gcc/ada/libgnat/g-cppexc.ads +++ b/gcc/ada/libgnat/g-cppexc.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2013-2021, AdaCore -- +-- Copyright (C) 2013-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-crc32.adb b/gcc/ada/libgnat/g-crc32.adb index 16beef1..6d0d3c3 100644 --- a/gcc/ada/libgnat/g-crc32.adb +++ b/gcc/ada/libgnat/g-crc32.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-crc32.ads b/gcc/ada/libgnat/g-crc32.ads index 3b59c3c..65f20dc 100644 --- a/gcc/ada/libgnat/g-crc32.ads +++ b/gcc/ada/libgnat/g-crc32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, AdaCore -- +-- Copyright (C) 2004-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-ctrl_c.adb b/gcc/ada/libgnat/g-ctrl_c.adb index d238781..752a5ae 100644 --- a/gcc/ada/libgnat/g-ctrl_c.adb +++ b/gcc/ada/libgnat/g-ctrl_c.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-ctrl_c.ads b/gcc/ada/libgnat/g-ctrl_c.ads index d46e4e7..77c45ac 100644 --- a/gcc/ada/libgnat/g-ctrl_c.ads +++ b/gcc/ada/libgnat/g-ctrl_c.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-curexc.ads b/gcc/ada/libgnat/g-curexc.ads index 82d1cd6..c589d61 100644 --- a/gcc/ada/libgnat/g-curexc.ads +++ b/gcc/ada/libgnat/g-curexc.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1996-2021, AdaCore -- +-- Copyright (C) 1996-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-debpoo.adb b/gcc/ada/libgnat/g-debpoo.adb index 0092139..ecab282 100644 --- a/gcc/ada/libgnat/g-debpoo.adb +++ b/gcc/ada/libgnat/g-debpoo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -777,7 +777,7 @@ package body GNAT.Debug_Pools is function Is_Valid_Or_Handled (Storage : System.Address; Valid : Boolean) return Boolean is - Int_Storage : constant Integer_Address := To_Integer (Storage); + Int_Storage : constant Integer_Address := To_Integer (Storage); begin -- The pool only returns addresses aligned on Storage_Alignment so @@ -1148,7 +1148,7 @@ package body GNAT.Debug_Pools is Modulo : constant Storage_Count := Size_In_Storage_Elements mod Dead_Bytes; begin - M.all := (others => Dead); + M.all := [others => Dead]; -- Any bytes left (up to three of them) @@ -1942,7 +1942,7 @@ package body GNAT.Debug_Pools is Grand_Total : Float; Max : array (1 .. Size) of Traceback_Htable_Elem_Ptr := - (others => null); + [others => null]; -- Sorted array for the biggest memory users Allocated_In_Pool : Byte_Count; diff --git a/gcc/ada/libgnat/g-debpoo.ads b/gcc/ada/libgnat/g-debpoo.ads index fce04c4..bf21369 100644 --- a/gcc/ada/libgnat/g-debpoo.ads +++ b/gcc/ada/libgnat/g-debpoo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-debuti.adb b/gcc/ada/libgnat/g-debuti.adb index d064401..70290ff 100644 --- a/gcc/ada/libgnat/g-debuti.adb +++ b/gcc/ada/libgnat/g-debuti.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, AdaCore -- +-- Copyright (C) 1997-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-debuti.ads b/gcc/ada/libgnat/g-debuti.ads index 109f56a..4782bb2 100644 --- a/gcc/ada/libgnat/g-debuti.ads +++ b/gcc/ada/libgnat/g-debuti.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-decstr.adb b/gcc/ada/libgnat/g-decstr.adb index 89824095..7cac94d 100644 --- a/gcc/ada/libgnat/g-decstr.adb +++ b/gcc/ada/libgnat/g-decstr.adb @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-decstr.ads b/gcc/ada/libgnat/g-decstr.ads index cf6f5c3..76afa9a 100644 --- a/gcc/ada/libgnat/g-decstr.ads +++ b/gcc/ada/libgnat/g-decstr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-deutst.ads b/gcc/ada/libgnat/g-deutst.ads index f8f9087..309f5fd 100644 --- a/gcc/ada/libgnat/g-deutst.ads +++ b/gcc/ada/libgnat/g-deutst.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-diopit.adb b/gcc/ada/libgnat/g-diopit.adb index 3090bee..a785264 100644 --- a/gcc/ada/libgnat/g-diopit.adb +++ b/gcc/ada/libgnat/g-diopit.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-diopit.ads b/gcc/ada/libgnat/g-diopit.ads index 9eec0f6..3f51b5c 100644 --- a/gcc/ada/libgnat/g-diopit.ads +++ b/gcc/ada/libgnat/g-diopit.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-dirope.adb b/gcc/ada/libgnat/g-dirope.adb index ba68626..36e5f01 100644 --- a/gcc/ada/libgnat/g-dirope.adb +++ b/gcc/ada/libgnat/g-dirope.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-dirope.ads b/gcc/ada/libgnat/g-dirope.ads index 3568f77..f0c5543 100644 --- a/gcc/ada/libgnat/g-dirope.ads +++ b/gcc/ada/libgnat/g-dirope.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-dynhta.adb b/gcc/ada/libgnat/g-dynhta.adb index 75d1e61..cb45ec3 100644 --- a/gcc/ada/libgnat/g-dynhta.adb +++ b/gcc/ada/libgnat/g-dynhta.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-dynhta.ads b/gcc/ada/libgnat/g-dynhta.ads index 27ea715..742d4cc 100644 --- a/gcc/ada/libgnat/g-dynhta.ads +++ b/gcc/ada/libgnat/g-dynhta.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -46,7 +46,8 @@ -- GNAT.HTable to keep as much coherency as possible between these two -- related units. -pragma Compiler_Unit_Warning; +-- Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in +-- gcc-interface/Make-lang.in for details on the constraints. package GNAT.Dynamic_HTables is diff --git a/gcc/ada/libgnat/g-dyntab.adb b/gcc/ada/libgnat/g-dyntab.adb index 9f14b68..edc0a9d 100644 --- a/gcc/ada/libgnat/g-dyntab.adb +++ b/gcc/ada/libgnat/g-dyntab.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with GNAT.Heap_Sort_G; with Ada.Unchecked_Deallocation; diff --git a/gcc/ada/libgnat/g-dyntab.ads b/gcc/ada/libgnat/g-dyntab.ads index 1cb26b4..7cad735 100644 --- a/gcc/ada/libgnat/g-dyntab.ads +++ b/gcc/ada/libgnat/g-dyntab.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -45,7 +45,8 @@ -- GNAT.Table -- Table (the compiler unit) -pragma Compiler_Unit_Warning; +-- Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in +-- gcc-interface/Make-lang.in for details on the constraints. with Ada.Unchecked_Conversion; diff --git a/gcc/ada/libgnat/g-eacodu.adb b/gcc/ada/libgnat/g-eacodu.adb index c9e62ab..6d6fb4c 100644 --- a/gcc/ada/libgnat/g-eacodu.adb +++ b/gcc/ada/libgnat/g-eacodu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-encstr.adb b/gcc/ada/libgnat/g-encstr.adb index e701bc6..422b1d0 100644 --- a/gcc/ada/libgnat/g-encstr.adb +++ b/gcc/ada/libgnat/g-encstr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-encstr.ads b/gcc/ada/libgnat/g-encstr.ads index fc1e97d..86128de 100644 --- a/gcc/ada/libgnat/g-encstr.ads +++ b/gcc/ada/libgnat/g-encstr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-enutst.ads b/gcc/ada/libgnat/g-enutst.ads index 06a1a99..711bcbe 100644 --- a/gcc/ada/libgnat/g-enutst.ads +++ b/gcc/ada/libgnat/g-enutst.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-excact.adb b/gcc/ada/libgnat/g-excact.adb index 7184559..70161f6 100644 --- a/gcc/ada/libgnat/g-excact.adb +++ b/gcc/ada/libgnat/g-excact.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-excact.ads b/gcc/ada/libgnat/g-excact.ads index d4bda84..1101546 100644 --- a/gcc/ada/libgnat/g-excact.ads +++ b/gcc/ada/libgnat/g-excact.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-except.ads b/gcc/ada/libgnat/g-except.ads index 8e33a4e..9002146 100644 --- a/gcc/ada/libgnat/g-except.ads +++ b/gcc/ada/libgnat/g-except.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-exctra.adb b/gcc/ada/libgnat/g-exctra.adb index 819e204..f578c68 100644 --- a/gcc/ada/libgnat/g-exctra.adb +++ b/gcc/ada/libgnat/g-exctra.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-exctra.ads b/gcc/ada/libgnat/g-exctra.ads index 1cfe661..f6b928c 100644 --- a/gcc/ada/libgnat/g-exctra.ads +++ b/gcc/ada/libgnat/g-exctra.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-expect.adb b/gcc/ada/libgnat/g-expect.adb index b945731..e43ef4f 100644 --- a/gcc/ada/libgnat/g-expect.adb +++ b/gcc/ada/libgnat/g-expect.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -193,7 +193,7 @@ package body GNAT.Expect is Str : String; Filter_On : Filter_Type) is - Current_Filter : Filter_List; + Current_Filter : Filter_List; begin if Pid.Filters_Lock = 0 then @@ -264,7 +264,6 @@ package body GNAT.Expect is procedure Close (Descriptor : in out Process_Descriptor) is Status : Integer; - pragma Unreferenced (Status); begin Close (Descriptor, Status); end Close; @@ -351,7 +350,7 @@ package body GNAT.Expect is Full_Buffer : Boolean := False) is N : Expect_Match; - Descriptors : Array_Of_Pd := (1 => Descriptor'Unrestricted_Access); + Descriptors : Array_Of_Pd := [Descriptor'Unrestricted_Access]; Try_Until : constant Time := Clock + Duration (Timeout) / 1000.0; Timeout_Tmp : Integer := Timeout; @@ -508,7 +507,7 @@ package body GNAT.Expect is Full_Buffer : Boolean := False) is N : Expect_Match; - Descriptors : Array_Of_Pd := (1 => Descriptor'Unrestricted_Access); + Descriptors : Array_Of_Pd := [Descriptor'Unrestricted_Access]; begin pragma Assert (Matched'First = 0); @@ -976,7 +975,6 @@ package body GNAT.Expect is declare Result : Expect_Match; - pragma Unreferenced (Result); begin -- This loop runs until the call to Expect raises Process_Died @@ -1078,7 +1076,7 @@ package body GNAT.Expect is function Has_Process (Regexp : Multiprocess_Regexp_Array) return Boolean is begin - return Regexp /= (Regexp'Range => (null, null)); + return Regexp /= [Regexp'Range => (null, null)]; end Has_Process; --------------- @@ -1294,8 +1292,8 @@ package body GNAT.Expect is Add_LF : Boolean := True; Empty_Buffer : Boolean := False) is - Line_Feed : aliased constant String := (1 .. 1 => ASCII.LF); - Descriptors : Array_Of_Pd := (1 => Descriptor'Unrestricted_Access); + Line_Feed : aliased constant String := [1 .. 1 => ASCII.LF]; + Descriptors : Array_Of_Pd := [Descriptor'Unrestricted_Access]; Result : Expect_Match; Discard : Natural; @@ -1439,7 +1437,7 @@ package body GNAT.Expect is Pipe3 : not null access Pipe_Type) is Status : Boolean; - pragma Unreferenced (Status); + pragma Warnings (Off, "modified by call, but value overwritten"); begin -- Create the pipes diff --git a/gcc/ada/libgnat/g-expect.ads b/gcc/ada/libgnat/g-expect.ads index 985e73d..6358946 100644 --- a/gcc/ada/libgnat/g-expect.ads +++ b/gcc/ada/libgnat/g-expect.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-exptty.adb b/gcc/ada/libgnat/g-exptty.adb index d5ad5bb..20f3a1a 100644 --- a/gcc/ada/libgnat/g-exptty.adb +++ b/gcc/ada/libgnat/g-exptty.adb @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-exptty.ads b/gcc/ada/libgnat/g-exptty.ads index 7c7a7c7..ca24f8c 100644 --- a/gcc/ada/libgnat/g-exptty.ads +++ b/gcc/ada/libgnat/g-exptty.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-flocon.ads b/gcc/ada/libgnat/g-flocon.ads index cc8859b..5e7da54 100644 --- a/gcc/ada/libgnat/g-flocon.ads +++ b/gcc/ada/libgnat/g-flocon.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-forstr.adb b/gcc/ada/libgnat/g-forstr.adb index 04539be..8ce8d1c 100644 --- a/gcc/ada/libgnat/g-forstr.adb +++ b/gcc/ada/libgnat/g-forstr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2014-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -131,7 +131,7 @@ package body GNAT.Formatted_String is return Formatted_String' (Finalization.Controlled with D => new Data'(Format'Length, 1, 1, - Null_Unbounded_String, 0, 0, (0, 0), Format)); + Null_Unbounded_String, 0, 0, [0, 0], Format)); end "+"; --------- @@ -433,7 +433,7 @@ package body GNAT.Formatted_String is declare R : String (1 .. Natural'Max (Natural'Max (F_Spec.Width, Len), - Length (Res))) := (others => ' '); + Length (Res))) := [others => ' ']; begin if F_Spec.Left_Justify then R (1 .. Length (Res)) := To_String (Res); @@ -785,7 +785,7 @@ package body GNAT.Formatted_String is elsif F.Precision > E - S + 1 then Len := F.Precision - (E - S + 1); - Buffer (S - Len .. S - 1) := (others => '0'); + Buffer (S - Len .. S - 1) := [others => '0']; S := S - Len; end if; diff --git a/gcc/ada/libgnat/g-forstr.ads b/gcc/ada/libgnat/g-forstr.ads index 7ef5f7d..c0f3aa6 100644 --- a/gcc/ada/libgnat/g-forstr.ads +++ b/gcc/ada/libgnat/g-forstr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2014-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-graphs.adb b/gcc/ada/libgnat/g-graphs.adb index 2565204..fb2356a 100644 --- a/gcc/ada/libgnat/g-graphs.adb +++ b/gcc/ada/libgnat/g-graphs.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2018-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-graphs.ads b/gcc/ada/libgnat/g-graphs.ads index d593f9f..68298ed 100644 --- a/gcc/ada/libgnat/g-graphs.ads +++ b/gcc/ada/libgnat/g-graphs.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2018-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,8 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; +-- Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in +-- gcc-interface/Make-lang.in for details on the constraints. with GNAT.Dynamic_HTables; use GNAT.Dynamic_HTables; with GNAT.Lists; use GNAT.Lists; diff --git a/gcc/ada/libgnat/g-heasor.adb b/gcc/ada/libgnat/g-heasor.adb index 4984a35..464b5d6 100644 --- a/gcc/ada/libgnat/g-heasor.adb +++ b/gcc/ada/libgnat/g-heasor.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-heasor.ads b/gcc/ada/libgnat/g-heasor.ads index 6bc026f..6e14fc7 100644 --- a/gcc/ada/libgnat/g-heasor.ads +++ b/gcc/ada/libgnat/g-heasor.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -46,8 +46,6 @@ -- Note: GNAT.Heap_Sort replaces and obsoletes GNAT.Heap_Sort_A, which is -- retained in the GNAT library for backwards compatibility. -pragma Compiler_Unit_Warning; - package GNAT.Heap_Sort is pragma Pure; diff --git a/gcc/ada/libgnat/g-hesora.adb b/gcc/ada/libgnat/g-hesora.adb index 28926dd..d969561 100644 --- a/gcc/ada/libgnat/g-hesora.adb +++ b/gcc/ada/libgnat/g-hesora.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package body GNAT.Heap_Sort_A is ---------- diff --git a/gcc/ada/libgnat/g-hesora.ads b/gcc/ada/libgnat/g-hesora.ads index 62dd10b..e8a04a4 100644 --- a/gcc/ada/libgnat/g-hesora.ads +++ b/gcc/ada/libgnat/g-hesora.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -40,8 +40,6 @@ -- worst case and is in place with no additional storage required. See -- the body for exact details of the algorithm used. -pragma Compiler_Unit_Warning; - package GNAT.Heap_Sort_A is pragma Preelaborate; diff --git a/gcc/ada/libgnat/g-hesorg.adb b/gcc/ada/libgnat/g-hesorg.adb index 0575af2..13f5a62 100644 --- a/gcc/ada/libgnat/g-hesorg.adb +++ b/gcc/ada/libgnat/g-hesorg.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-hesorg.ads b/gcc/ada/libgnat/g-hesorg.ads index e24e82d..76a7086 100644 --- a/gcc/ada/libgnat/g-hesorg.ads +++ b/gcc/ada/libgnat/g-hesorg.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-htable.adb b/gcc/ada/libgnat/g-htable.adb index 4aeeb1d..0680474 100644 --- a/gcc/ada/libgnat/g-htable.adb +++ b/gcc/ada/libgnat/g-htable.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -34,7 +34,5 @@ -- supply a dummy body, the old incorrect body is picked up during the -- bootstrap process). -pragma Compiler_Unit_Warning; - package body GNAT.HTable is end GNAT.HTable; diff --git a/gcc/ada/libgnat/g-htable.ads b/gcc/ada/libgnat/g-htable.ads index 373b2e9..599ed1c 100644 --- a/gcc/ada/libgnat/g-htable.ads +++ b/gcc/ada/libgnat/g-htable.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -39,8 +39,6 @@ -- See file s-htable.ads for full documentation of the interface -pragma Compiler_Unit_Warning; - with System.HTable; package GNAT.HTable is diff --git a/gcc/ada/libgnat/g-io.adb b/gcc/ada/libgnat/g-io.adb index 24b041f..4009428 100644 --- a/gcc/ada/libgnat/g-io.adb +++ b/gcc/ada/libgnat/g-io.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-io.ads b/gcc/ada/libgnat/g-io.ads index 4700347..1143014 100644 --- a/gcc/ada/libgnat/g-io.ads +++ b/gcc/ada/libgnat/g-io.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-io_aux.adb b/gcc/ada/libgnat/g-io_aux.adb index e904f37..db40abb 100644 --- a/gcc/ada/libgnat/g-io_aux.adb +++ b/gcc/ada/libgnat/g-io_aux.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-io_aux.ads b/gcc/ada/libgnat/g-io_aux.ads index a78a168..636acb9 100644 --- a/gcc/ada/libgnat/g-io_aux.ads +++ b/gcc/ada/libgnat/g-io_aux.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-lists.adb b/gcc/ada/libgnat/g-lists.adb index 99414f6..4d85907 100644 --- a/gcc/ada/libgnat/g-lists.adb +++ b/gcc/ada/libgnat/g-lists.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2018-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-lists.ads b/gcc/ada/libgnat/g-lists.ads index 3525877b..be5f6cf 100644 --- a/gcc/ada/libgnat/g-lists.ads +++ b/gcc/ada/libgnat/g-lists.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2018-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,8 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; +-- Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in +-- gcc-interface/Make-lang.in for details on the constraints. package GNAT.Lists is diff --git a/gcc/ada/libgnat/g-locfil.adb b/gcc/ada/libgnat/g-locfil.adb index 75a7d8a..5b90823 100644 --- a/gcc/ada/libgnat/g-locfil.adb +++ b/gcc/ada/libgnat/g-locfil.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-locfil.ads b/gcc/ada/libgnat/g-locfil.ads index 5005ded..c05e134 100644 --- a/gcc/ada/libgnat/g-locfil.ads +++ b/gcc/ada/libgnat/g-locfil.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-mbdira.adb b/gcc/ada/libgnat/g-mbdira.adb index cb7ecd2..75af0f7 100644 --- a/gcc/ada/libgnat/g-mbdira.adb +++ b/gcc/ada/libgnat/g-mbdira.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-mbdira.ads b/gcc/ada/libgnat/g-mbdira.ads index 28b66fb..18fb28d 100644 --- a/gcc/ada/libgnat/g-mbdira.ads +++ b/gcc/ada/libgnat/g-mbdira.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/g-mbflra.adb b/gcc/ada/libgnat/g-mbflra.adb index a35787b..60f345b 100644 --- a/gcc/ada/libgnat/g-mbflra.adb +++ b/gcc/ada/libgnat/g-mbflra.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -118,7 +118,6 @@ package body GNAT.MBBS_Float_Random is function Euclid (P, Q : Int) return Int is X, Y, GCD : Int; - pragma Unreferenced (Y, GCD); begin Euclid (P, Q, X, Y, GCD); return X; diff --git a/gcc/ada/libgnat/g-mbflra.ads b/gcc/ada/libgnat/g-mbflra.ads index d761e18..a53e4e3 100644 --- a/gcc/ada/libgnat/g-mbflra.ads +++ b/gcc/ada/libgnat/g-mbflra.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/g-md5.adb b/gcc/ada/libgnat/g-md5.adb index b977af0..8b70d561 100644 --- a/gcc/ada/libgnat/g-md5.adb +++ b/gcc/ada/libgnat/g-md5.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-md5.ads b/gcc/ada/libgnat/g-md5.ads index 62131e3..3564036 100644 --- a/gcc/ada/libgnat/g-md5.ads +++ b/gcc/ada/libgnat/g-md5.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-memdum.adb b/gcc/ada/libgnat/g-memdum.adb index cd8f7ca..880f4c0 100644 --- a/gcc/ada/libgnat/g-memdum.adb +++ b/gcc/ada/libgnat/g-memdum.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2021, AdaCore -- +-- Copyright (C) 2003-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -128,7 +128,7 @@ package body GNAT.Memory_Dump is (Count - Ctr, 16, 0, Offset_Buf, Last); Len := Last - 4; - Line_Buf (1 .. AIL - Len - 2) := (others => '0'); + Line_Buf (1 .. AIL - Len - 2) := [others => '0']; Line_Buf (AIL - Len - 1 .. AIL - 2) := Offset_Buf (4 .. Last - 1); Line_Buf (AIL - 1 .. AIL) := ": "; @@ -138,7 +138,7 @@ package body GNAT.Memory_Dump is null; end case; - Line_Buf (AIL + 1 .. Line_Buf'Last) := (others => ' '); + Line_Buf (AIL + 1 .. Line_Buf'Last) := [others => ' ']; Line_Buf (AIL + 3 * 16 + 1) := '"'; end if; diff --git a/gcc/ada/libgnat/g-memdum.ads b/gcc/ada/libgnat/g-memdum.ads index be74588..44a0070 100644 --- a/gcc/ada/libgnat/g-memdum.ads +++ b/gcc/ada/libgnat/g-memdum.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2003-2021, AdaCore -- +-- Copyright (C) 2003-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-moreex.adb b/gcc/ada/libgnat/g-moreex.adb index f61cd94..0f9153d 100644 --- a/gcc/ada/libgnat/g-moreex.adb +++ b/gcc/ada/libgnat/g-moreex.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-moreex.ads b/gcc/ada/libgnat/g-moreex.ads index 7b0b87d..becea8c 100644 --- a/gcc/ada/libgnat/g-moreex.ads +++ b/gcc/ada/libgnat/g-moreex.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-os_lib.adb b/gcc/ada/libgnat/g-os_lib.adb index 0bb7aec..a3bf57b 100644 --- a/gcc/ada/libgnat/g-os_lib.adb +++ b/gcc/ada/libgnat/g-os_lib.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-os_lib.ads b/gcc/ada/libgnat/g-os_lib.ads index 56ce37b..82a04e4 100644 --- a/gcc/ada/libgnat/g-os_lib.ads +++ b/gcc/ada/libgnat/g-os_lib.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-pehage.adb b/gcc/ada/libgnat/g-pehage.adb index 606656b..534b39f 100644 --- a/gcc/ada/libgnat/g-pehage.adb +++ b/gcc/ada/libgnat/g-pehage.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-pehage.ads b/gcc/ada/libgnat/g-pehage.ads index 41913cb..d7647a4 100644 --- a/gcc/ada/libgnat/g-pehage.ads +++ b/gcc/ada/libgnat/g-pehage.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-rannum.adb b/gcc/ada/libgnat/g-rannum.adb index 2983201..40f25c1 100644 --- a/gcc/ada/libgnat/g-rannum.adb +++ b/gcc/ada/libgnat/g-rannum.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -385,7 +385,7 @@ is Result : Image_String; begin - Result := (others => ' '); + Result := [others => ' ']; Result (1 .. Sys_Max_Image_Width) := Image (Gen.Rep); if Gen.Have_Gaussian then diff --git a/gcc/ada/libgnat/g-rannum.ads b/gcc/ada/libgnat/g-rannum.ads index 462e3a2..e3aaed1 100644 --- a/gcc/ada/libgnat/g-rannum.ads +++ b/gcc/ada/libgnat/g-rannum.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-regexp.adb b/gcc/ada/libgnat/g-regexp.adb index 3652af1..3f6ee7a 100644 --- a/gcc/ada/libgnat/g-regexp.adb +++ b/gcc/ada/libgnat/g-regexp.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-regexp.ads b/gcc/ada/libgnat/g-regexp.ads index c94a3fe..94a78bc 100644 --- a/gcc/ada/libgnat/g-regexp.ads +++ b/gcc/ada/libgnat/g-regexp.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-regist.adb b/gcc/ada/libgnat/g-regist.adb index 6bd636f..22c5ec3 100644 --- a/gcc/ada/libgnat/g-regist.adb +++ b/gcc/ada/libgnat/g-regist.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-regist.ads b/gcc/ada/libgnat/g-regist.ads index 0a8c9d0..2d74ef9 100644 --- a/gcc/ada/libgnat/g-regist.ads +++ b/gcc/ada/libgnat/g-regist.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-regpat.adb b/gcc/ada/libgnat/g-regpat.adb index 95ecb60..6b21193 100644 --- a/gcc/ada/libgnat/g-regpat.adb +++ b/gcc/ada/libgnat/g-regpat.adb @@ -7,7 +7,7 @@ -- B o d y -- -- -- -- Copyright (C) 1986 by University of Toronto. -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-regpat.ads b/gcc/ada/libgnat/g-regpat.ads index f80c72d..d818393 100644 --- a/gcc/ada/libgnat/g-regpat.ads +++ b/gcc/ada/libgnat/g-regpat.ads @@ -7,7 +7,7 @@ -- S p e c -- -- -- -- Copyright (C) 1986 by University of Toronto. -- --- Copyright (C) 1996-2021, AdaCore -- +-- Copyright (C) 1996-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-rewdat.adb b/gcc/ada/libgnat/g-rewdat.adb index 3b4a0d0..44cbc81 100644 --- a/gcc/ada/libgnat/g-rewdat.adb +++ b/gcc/ada/libgnat/g-rewdat.adb @@ -5,7 +5,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2014-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-rewdat.ads b/gcc/ada/libgnat/g-rewdat.ads index 8149565..0b38030 100644 --- a/gcc/ada/libgnat/g-rewdat.ads +++ b/gcc/ada/libgnat/g-rewdat.ads @@ -5,7 +5,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2014-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sechas.adb b/gcc/ada/libgnat/g-sechas.adb index 178b59b..2ae9cca 100644 --- a/gcc/ada/libgnat/g-sechas.adb +++ b/gcc/ada/libgnat/g-sechas.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -238,7 +238,7 @@ package body GNAT.Secure_Hashes is mod FC.M_State.Block_Length; declare Pad : Stream_Element_Array (1 .. 1 + Zeroes + Size_Length) := - (1 => 128, others => 0); + [1 => 128, others => 0]; Index : Stream_Element_Offset; First_Index : Stream_Element_Offset; @@ -281,7 +281,7 @@ package body GNAT.Secure_Hashes is declare Outer_C : Context; Opad : Stream_Element_Array := - (1 .. Stream_Element_Offset (Block_Length) => 16#5c#); + [1 .. Stream_Element_Offset (Block_Length) => 16#5c#]; begin for J in C.Key'Range loop @@ -329,7 +329,7 @@ package body GNAT.Secure_Hashes is declare Ipad : Stream_Element_Array := - (1 .. Stream_Element_Offset (Block_Length) => 16#36#); + [1 .. Stream_Element_Offset (Block_Length) => 16#36#]; begin for J in C.Key'Range loop diff --git a/gcc/ada/libgnat/g-sechas.ads b/gcc/ada/libgnat/g-sechas.ads index 79f86bc..c9d1e71 100644 --- a/gcc/ada/libgnat/g-sechas.ads +++ b/gcc/ada/libgnat/g-sechas.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sehamd.adb b/gcc/ada/libgnat/g-sehamd.adb index b59740a..8ba0938 100644 --- a/gcc/ada/libgnat/g-sehamd.adb +++ b/gcc/ada/libgnat/g-sehamd.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sehamd.ads b/gcc/ada/libgnat/g-sehamd.ads index 148ecb1..2c787fb 100644 --- a/gcc/ada/libgnat/g-sehamd.ads +++ b/gcc/ada/libgnat/g-sehamd.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -68,7 +68,7 @@ private Initial_D : constant := 16#10325476#; Initial_State : constant Hash_State.State := - (Initial_A, Initial_B, Initial_C, Initial_D); + [Initial_A, Initial_B, Initial_C, Initial_D]; -- Initialization vector from RFC 1321 end GNAT.Secure_Hashes.MD5; diff --git a/gcc/ada/libgnat/g-sehash.adb b/gcc/ada/libgnat/g-sehash.adb index 920ba59..20a53a7 100644 --- a/gcc/ada/libgnat/g-sehash.adb +++ b/gcc/ada/libgnat/g-sehash.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sehash.ads b/gcc/ada/libgnat/g-sehash.ads index 602032f..597ffae 100644 --- a/gcc/ada/libgnat/g-sehash.ads +++ b/gcc/ada/libgnat/g-sehash.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -62,11 +62,11 @@ package GNAT.Secure_Hashes.SHA1 is private Initial_State : constant Hash_State.State := - (0 => 16#67452301#, + [0 => 16#67452301#, 1 => 16#EFCDAB89#, 2 => 16#98BADCFE#, 3 => 16#10325476#, - 4 => 16#C3D2E1F0#); + 4 => 16#C3D2E1F0#]; -- Initialization vector from FIPS PUB 180-3 end GNAT.Secure_Hashes.SHA1; diff --git a/gcc/ada/libgnat/g-sercom.adb b/gcc/ada/libgnat/g-sercom.adb index 20628fb..1cdcae5 100644 --- a/gcc/ada/libgnat/g-sercom.adb +++ b/gcc/ada/libgnat/g-sercom.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sercom.ads b/gcc/ada/libgnat/g-sercom.ads index 4c9b0b7..e704103 100644 --- a/gcc/ada/libgnat/g-sercom.ads +++ b/gcc/ada/libgnat/g-sercom.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -192,7 +192,7 @@ private end record; Data_Rate_Value : constant array (Data_Rate) of Interfaces.C.unsigned := - (B75 => 75, + [B75 => 75, B110 => 110, B150 => 150, B300 => 300, @@ -217,7 +217,7 @@ private B2500000 => 2_500_000, B3000000 => 3_000_000, B3500000 => 3_500_000, - B4000000 => 4_000_000); + B4000000 => 4_000_000]; function To_C (Port : Serial_Port) return Serial_Port_Descriptor is (Port.H); diff --git a/gcc/ada/libgnat/g-sercom__linux.adb b/gcc/ada/libgnat/g-sercom__linux.adb index dbcb171..a2a64b1 100644 --- a/gcc/ada/libgnat/g-sercom__linux.adb +++ b/gcc/ada/libgnat/g-sercom__linux.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -80,7 +80,7 @@ package body GNAT.Serial_Communications is pragma Import (C, fcntl, "fcntl"); C_Data_Rate : constant array (Data_Rate) of unsigned := - (B75 => OSC.B75, + [B75 => OSC.B75, B110 => OSC.B110, B150 => OSC.B150, B300 => OSC.B300, @@ -105,18 +105,18 @@ package body GNAT.Serial_Communications is B2500000 => OSC.B2500000, B3000000 => OSC.B3000000, B3500000 => OSC.B3500000, - B4000000 => OSC.B4000000); + B4000000 => OSC.B4000000]; C_Bits : constant array (Data_Bits) of unsigned := - (CS7 => OSC.CS7, CS8 => OSC.CS8); + [CS7 => OSC.CS7, CS8 => OSC.CS8]; C_Stop_Bits : constant array (Stop_Bits_Number) of unsigned := - (One => 0, Two => OSC.CSTOPB); + [One => 0, Two => OSC.CSTOPB]; C_Parity : constant array (Parity_Check) of unsigned := - (None => 0, + [None => 0, Odd => OSC.PARENB or OSC.PARODD, - Even => OSC.PARENB); + Even => OSC.PARENB]; procedure Raise_Error (Message : String; Error : Integer := Errno); pragma No_Return (Raise_Error); diff --git a/gcc/ada/libgnat/g-sercom__mingw.adb b/gcc/ada/libgnat/g-sercom__mingw.adb index d278bfa..aea78ae 100644 --- a/gcc/ada/libgnat/g-sercom__mingw.adb +++ b/gcc/ada/libgnat/g-sercom__mingw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sestin.ads b/gcc/ada/libgnat/g-sestin.ads index 8b69d90..a11fb78c 100644 --- a/gcc/ada/libgnat/g-sestin.ads +++ b/gcc/ada/libgnat/g-sestin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, AdaCore -- +-- Copyright (C) 2004-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sets.adb b/gcc/ada/libgnat/g-sets.adb index 2a7efc5..fb0fe18 100644 --- a/gcc/ada/libgnat/g-sets.adb +++ b/gcc/ada/libgnat/g-sets.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2018-2021, AdaCore -- +-- Copyright (C) 2018-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sets.ads b/gcc/ada/libgnat/g-sets.ads index 4bd4e92..660e868 100644 --- a/gcc/ada/libgnat/g-sets.ads +++ b/gcc/ada/libgnat/g-sets.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2018-2021, AdaCore -- +-- Copyright (C) 2018-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,8 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; +-- Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in +-- gcc-interface/Make-lang.in for details on the constraints. with GNAT.Dynamic_HTables; use GNAT.Dynamic_HTables; diff --git a/gcc/ada/libgnat/g-sha1.adb b/gcc/ada/libgnat/g-sha1.adb index 8f4dbfc..4c50322 100644 --- a/gcc/ada/libgnat/g-sha1.adb +++ b/gcc/ada/libgnat/g-sha1.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sha1.ads b/gcc/ada/libgnat/g-sha1.ads index 5b8bf91..fb90b9c 100644 --- a/gcc/ada/libgnat/g-sha1.ads +++ b/gcc/ada/libgnat/g-sha1.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sha224.ads b/gcc/ada/libgnat/g-sha224.ads index ea2337d..821cf30 100644 --- a/gcc/ada/libgnat/g-sha224.ads +++ b/gcc/ada/libgnat/g-sha224.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sha256.ads b/gcc/ada/libgnat/g-sha256.ads index 90af358..4439090 100644 --- a/gcc/ada/libgnat/g-sha256.ads +++ b/gcc/ada/libgnat/g-sha256.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sha384.ads b/gcc/ada/libgnat/g-sha384.ads index 89e3fd8..2ac9c49 100644 --- a/gcc/ada/libgnat/g-sha384.ads +++ b/gcc/ada/libgnat/g-sha384.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sha512.ads b/gcc/ada/libgnat/g-sha512.ads index 4f50899..3793b6c 100644 --- a/gcc/ada/libgnat/g-sha512.ads +++ b/gcc/ada/libgnat/g-sha512.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-shsh32.adb b/gcc/ada/libgnat/g-shsh32.adb index a332e12..7b8afd8 100644 --- a/gcc/ada/libgnat/g-shsh32.adb +++ b/gcc/ada/libgnat/g-shsh32.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-shsh32.ads b/gcc/ada/libgnat/g-shsh32.ads index f23075b..80d7819 100644 --- a/gcc/ada/libgnat/g-shsh32.ads +++ b/gcc/ada/libgnat/g-shsh32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -50,7 +50,7 @@ package GNAT.Secure_Hashes.SHA2_32 is -- SHA-224 and SHA-256 operate on 32-bit big endian words K : constant Hash_State.State (0 .. 63) := - (16#428a2f98#, 16#71374491#, 16#b5c0fbcf#, 16#e9b5dba5#, + [16#428a2f98#, 16#71374491#, 16#b5c0fbcf#, 16#e9b5dba5#, 16#3956c25b#, 16#59f111f1#, 16#923f82a4#, 16#ab1c5ed5#, 16#d807aa98#, 16#12835b01#, 16#243185be#, 16#550c7dc3#, 16#72be5d74#, 16#80deb1fe#, 16#9bdc06a7#, 16#c19bf174#, @@ -65,7 +65,7 @@ package GNAT.Secure_Hashes.SHA2_32 is 16#19a4c116#, 16#1e376c08#, 16#2748774c#, 16#34b0bcb5#, 16#391c0cb3#, 16#4ed8aa4a#, 16#5b9cca4f#, 16#682e6ff3#, 16#748f82ee#, 16#78a5636f#, 16#84c87814#, 16#8cc70208#, - 16#90befffa#, 16#a4506ceb#, 16#bef9a3f7#, 16#c67178f2#); + 16#90befffa#, 16#a4506ceb#, 16#bef9a3f7#, 16#c67178f2#]; -- Constants from FIPS PUB 180-3 function Sigma0 (X : Word) return Word; @@ -86,23 +86,23 @@ package GNAT.Secure_Hashes.SHA2_32 is S1 => S1); SHA224_Init_State : constant Hash_State.State (0 .. 7) := - (0 => 16#c1059ed8#, + [0 => 16#c1059ed8#, 1 => 16#367cd507#, 2 => 16#3070dd17#, 3 => 16#f70e5939#, 4 => 16#ffc00b31#, 5 => 16#68581511#, 6 => 16#64f98fa7#, - 7 => 16#befa4fa4#); + 7 => 16#befa4fa4#]; SHA256_Init_State : constant Hash_State.State (0 .. 7) := - (0 => 16#6a09e667#, + [0 => 16#6a09e667#, 1 => 16#bb67ae85#, 2 => 16#3c6ef372#, 3 => 16#a54ff53a#, 4 => 16#510e527f#, 5 => 16#9b05688c#, 6 => 16#1f83d9ab#, - 7 => 16#5be0cd19#); + 7 => 16#5be0cd19#]; -- Initialization vectors from FIPS PUB 180-3 end GNAT.Secure_Hashes.SHA2_32; diff --git a/gcc/ada/libgnat/g-shsh64.adb b/gcc/ada/libgnat/g-shsh64.adb index c756b9d..c2b9002 100644 --- a/gcc/ada/libgnat/g-shsh64.adb +++ b/gcc/ada/libgnat/g-shsh64.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-shsh64.ads b/gcc/ada/libgnat/g-shsh64.ads index 1d67007..eed0ec9 100644 --- a/gcc/ada/libgnat/g-shsh64.ads +++ b/gcc/ada/libgnat/g-shsh64.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -50,7 +50,7 @@ package GNAT.Secure_Hashes.SHA2_64 is -- SHA-384 and SHA-512 operate on 64-bit big endian words K : Hash_State.State (0 .. 79) := - (16#428a2f98d728ae22#, 16#7137449123ef65cd#, + [16#428a2f98d728ae22#, 16#7137449123ef65cd#, 16#b5c0fbcfec4d3b2f#, 16#e9b5dba58189dbbc#, 16#3956c25bf348b538#, 16#59f111f1b605d019#, 16#923f82a4af194f9b#, 16#ab1c5ed5da6d8118#, @@ -89,7 +89,7 @@ package GNAT.Secure_Hashes.SHA2_64 is 16#28db77f523047d84#, 16#32caab7b40c72493#, 16#3c9ebe0a15c9bebc#, 16#431d67c49c100d4c#, 16#4cc5d4becb3e42b6#, 16#597f299cfc657e2a#, - 16#5fcb6fab3ad6faec#, 16#6c44198c4a475817#); + 16#5fcb6fab3ad6faec#, 16#6c44198c4a475817#]; -- Constants from FIPS PUB 180-3 function Sigma0 (X : Word) return Word; @@ -110,23 +110,23 @@ package GNAT.Secure_Hashes.SHA2_64 is S1 => S1); SHA384_Init_State : constant Hash_State.State := - (0 => 16#cbbb9d5dc1059ed8#, + [0 => 16#cbbb9d5dc1059ed8#, 1 => 16#629a292a367cd507#, 2 => 16#9159015a3070dd17#, 3 => 16#152fecd8f70e5939#, 4 => 16#67332667ffc00b31#, 5 => 16#8eb44a8768581511#, 6 => 16#db0c2e0d64f98fa7#, - 7 => 16#47b5481dbefa4fa4#); + 7 => 16#47b5481dbefa4fa4#]; SHA512_Init_State : constant Hash_State.State := - (0 => 16#6a09e667f3bcc908#, + [0 => 16#6a09e667f3bcc908#, 1 => 16#bb67ae8584caa73b#, 2 => 16#3c6ef372fe94f82b#, 3 => 16#a54ff53a5f1d36f1#, 4 => 16#510e527fade682d1#, 5 => 16#9b05688c2b3e6c1f#, 6 => 16#1f83d9abfb41bd6b#, - 7 => 16#5be0cd19137e2179#); + 7 => 16#5be0cd19137e2179#]; -- Initialization vectors from FIPS PUB 180-3 end GNAT.Secure_Hashes.SHA2_64; diff --git a/gcc/ada/libgnat/g-shshco.adb b/gcc/ada/libgnat/g-shshco.adb index f5ebf5d..2df5d86 100644 --- a/gcc/ada/libgnat/g-shshco.adb +++ b/gcc/ada/libgnat/g-shshco.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-shshco.ads b/gcc/ada/libgnat/g-shshco.ads index 7df8682..0a540d0 100644 --- a/gcc/ada/libgnat/g-shshco.ads +++ b/gcc/ada/libgnat/g-shshco.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-soccon.ads b/gcc/ada/libgnat/g-soccon.ads index b352a37..c18d796 100644 --- a/gcc/ada/libgnat/g-soccon.ads +++ b/gcc/ada/libgnat/g-soccon.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-socket.adb b/gcc/ada/libgnat/g-socket.adb index 75a2b27..12abb68 100644 --- a/gcc/ada/libgnat/g-socket.adb +++ b/gcc/ada/libgnat/g-socket.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -71,31 +71,31 @@ package body GNAT.Sockets is -- Correspondence tables Levels : constant array (Level_Type) of C.int := - (Socket_Level => SOSC.SOL_SOCKET, + [Socket_Level => SOSC.SOL_SOCKET, IP_Protocol_For_IP_Level => SOSC.IPPROTO_IP, IP_Protocol_For_IPv6_Level => SOSC.IPPROTO_IPV6, IP_Protocol_For_UDP_Level => SOSC.IPPROTO_UDP, IP_Protocol_For_TCP_Level => SOSC.IPPROTO_TCP, IP_Protocol_For_ICMP_Level => SOSC.IPPROTO_ICMP, IP_Protocol_For_IGMP_Level => SOSC.IPPROTO_IGMP, - IP_Protocol_For_RAW_Level => SOSC.IPPROTO_RAW); + IP_Protocol_For_RAW_Level => SOSC.IPPROTO_RAW]; Modes : constant array (Mode_Type) of C.int := - (Socket_Stream => SOSC.SOCK_STREAM, + [Socket_Stream => SOSC.SOCK_STREAM, Socket_Datagram => SOSC.SOCK_DGRAM, - Socket_Raw => SOSC.SOCK_RAW); + Socket_Raw => SOSC.SOCK_RAW]; Shutmodes : constant array (Shutmode_Type) of C.int := - (Shut_Read => SOSC.SHUT_RD, + [Shut_Read => SOSC.SHUT_RD, Shut_Write => SOSC.SHUT_WR, - Shut_Read_Write => SOSC.SHUT_RDWR); + Shut_Read_Write => SOSC.SHUT_RDWR]; Requests : constant array (Request_Name) of SOSC.IOCTL_Req_T := - (Non_Blocking_IO => SOSC.FIONBIO, - N_Bytes_To_Read => SOSC.FIONREAD); + [Non_Blocking_IO => SOSC.FIONBIO, + N_Bytes_To_Read => SOSC.FIONREAD]; Options : constant array (Specific_Option_Name) of C.int := - (Keep_Alive => SOSC.SO_KEEPALIVE, + [Keep_Alive => SOSC.SO_KEEPALIVE, Keep_Alive_Count => SOSC.TCP_KEEPCNT, Keep_Alive_Idle => SOSC.TCP_KEEPIDLE, Keep_Alive_Interval => SOSC.TCP_KEEPINTVL, @@ -120,15 +120,15 @@ package body GNAT.Sockets is IPv6_Only => SOSC.IPV6_V6ONLY, Send_Timeout => SOSC.SO_SNDTIMEO, Receive_Timeout => SOSC.SO_RCVTIMEO, - Busy_Polling => SOSC.SO_BUSY_POLL); + Busy_Polling => SOSC.SO_BUSY_POLL]; -- ??? Note: for OpenSolaris, Receive_Packet_Info should be IP_RECVPKTINFO, -- but for Linux compatibility this constant is the same as IP_PKTINFO. Flags : constant array (0 .. 3) of C.int := - (0 => SOSC.MSG_OOB, -- Process_Out_Of_Band_Data + [0 => SOSC.MSG_OOB, -- Process_Out_Of_Band_Data 1 => SOSC.MSG_PEEK, -- Peek_At_Incoming_Data 2 => SOSC.MSG_WAITALL, -- Wait_For_A_Full_Reception - 3 => SOSC.MSG_EOR); -- Send_End_Of_Record + 3 => SOSC.MSG_EOR]; -- Send_End_Of_Record Socket_Error_Id : constant Exception_Id := Socket_Error'Identity; Host_Error_Id : constant Exception_Id := Host_Error'Identity; @@ -1184,8 +1184,8 @@ package body GNAT.Sockets is Numeric_Serv : Boolean := False) return Host_Service is SA : aliased Sockaddr; - H : aliased C.char_array := (1 .. SOSC.NI_MAXHOST => C.nul); - S : aliased C.char_array := (1 .. SOSC.NI_MAXSERV => C.nul); + H : aliased C.char_array := [1 .. SOSC.NI_MAXHOST => C.nul]; + S : aliased C.char_array := [1 .. SOSC.NI_MAXSERV => C.nul]; RC : C.int; Len : C.int; begin @@ -1621,7 +1621,7 @@ package body GNAT.Sockets is when Family_Inet => 4 * Value.Sin_V4'Length, when Family_Inet6 => 6 * 5 + 4 * 4); -- 1234:1234:1234:1234:1234:1234:123.123.123.123 - Dst : aliased C.char_array := (1 .. C.size_t (Size) => C.nul); + Dst : aliased C.char_array := [1 .. C.size_t (Size) => C.nul]; Ia : aliased In_Addr_Union (Value.Family); begin case Value.Family is diff --git a/gcc/ada/libgnat/g-socket.ads b/gcc/ada/libgnat/g-socket.ads index 4372f3e..41ede44 100644 --- a/gcc/ada/libgnat/g-socket.ads +++ b/gcc/ada/libgnat/g-socket.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -506,7 +506,7 @@ package GNAT.Sockets is -- Octet for Internet address Inet_Addr_Bytes_Length : constant array (Family_Inet_4_6) of Natural := - (Family_Inet => 4, Family_Inet6 => 16); + [Family_Inet => 4, Family_Inet6 => 16]; type Inet_Addr_Bytes is array (Natural range <>) of Inet_Addr_Comp_Type; @@ -521,10 +521,10 @@ package GNAT.Sockets is type Inet_Addr_Type (Family : Family_Inet_4_6 := Family_Inet) is record case Family is when Family_Inet => - Sin_V4 : Inet_Addr_V4_Type := (others => 0); + Sin_V4 : Inet_Addr_V4_Type := [others => 0]; when Family_Inet6 => - Sin_V6 : Inet_Addr_V6_Type := (others => 0); + Sin_V6 : Inet_Addr_V6_Type := [others => 0]; end case; end record; @@ -571,7 +571,7 @@ package GNAT.Sockets is -- Idem for IPv6 protocol IPv4_To_IPv6_Prefix : constant Inet_Addr_Bytes := - (1 .. 10 => 0, 11 .. 12 => 255); + [1 .. 10 => 0, 11 .. 12 => 255]; -- Prefix for IPv4 mapped to IPv6 addresses -- Functions to handle masks and prefixes @@ -1122,7 +1122,7 @@ package GNAT.Sockets is Family : Family_Type := Family_Inet; Mode : Mode_Type := Socket_Stream; Level : Level_Type := IP_Protocol_For_IP_Level); - -- Create an endpoint for communication. Raises Socket_Error on error. + -- Create an endpoint for communication. Raises Socket_Error on error procedure Create_Socket_Pair (Left : out Socket_Type; @@ -1529,37 +1529,39 @@ private No_Port : constant Port_Type := 0; Any_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (others => 0)); + (Family_Inet, [others => 0]); Any_Inet6_Addr : constant Inet_Addr_Type := - (Family_Inet6, (others => 0)); + (Family_Inet6, [others => 0]); No_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (others => 0)); + (Family_Inet, [others => 0]); Broadcast_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (others => 255)); + (Family_Inet, [others => 255]); Loopback_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (127, 0, 0, 1)); + (Family_Inet, [127, 0, 0, 1]); Loopback_Inet6_Addr : constant Inet_Addr_Type := (Family_Inet6, - (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)); + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); Unspecified_Group_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (224, 0, 0, 0)); + (Family_Inet, [224, 0, 0, 0]); All_Hosts_Group_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (224, 0, 0, 1)); + (Family_Inet, [224, 0, 0, 1]); All_Routers_Group_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (224, 0, 0, 2)); + (Family_Inet, [224, 0, 0, 2]); Unspecified_Group_Inet6_Addr : constant Inet_Addr_Type := - (Family_Inet6, (255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)); + (Family_Inet6, [255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); All_Hosts_Group_Inet6_Addr : constant Inet_Addr_Type := - (Family_Inet6, (255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)); + (Family_Inet6, [255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); All_Routers_Group_Inet6_Addr : constant Inet_Addr_Type := - (Family_Inet6, (255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2)); + (Family_Inet6, [255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2]); No_Sock_Addr : constant Sock_Addr_Type := (Family_Inet, No_Inet_Addr, 0); - Max_Name_Length : constant := 64; - -- The constant MAXHOSTNAMELEN is usually set to 64 + Max_Name_Length : constant := SOSC.NI_MAXHOST; + -- Most systems don't provide constants that specify the maximum size + -- of either a FQDN or a service name. In order to aid applications in + -- allocating buffers, the constant NI_MAXHOST is defined in <netdb.h>. subtype Name_Index is Natural range 1 .. Max_Name_Length; diff --git a/gcc/ada/libgnat/g-socket__dummy.adb b/gcc/ada/libgnat/g-socket__dummy.adb index a15ff5f..4c8f53e 100644 --- a/gcc/ada/libgnat/g-socket__dummy.adb +++ b/gcc/ada/libgnat/g-socket__dummy.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-socket__dummy.ads b/gcc/ada/libgnat/g-socket__dummy.ads index 617c14f..b27327f 100644 --- a/gcc/ada/libgnat/g-socket__dummy.ads +++ b/gcc/ada/libgnat/g-socket__dummy.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-socpol.adb b/gcc/ada/libgnat/g-socpol.adb index 3f153af..fd27211 100644 --- a/gcc/ada/libgnat/g-socpol.adb +++ b/gcc/ada/libgnat/g-socpol.adb @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, AdaCore -- +-- Copyright (C) 2020-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -36,7 +36,7 @@ with GNAT.Sockets.Thin; package body GNAT.Sockets.Poll is To_C : constant array (Wait_Event_Type) of Events_Type := - (Input => SOC.POLLIN or SOC.POLLPRI, Output => SOC.POLLOUT); + [Input => SOC.POLLIN or SOC.POLLPRI, Output => SOC.POLLOUT]; -- To convert Wait_Event_Type to C I/O events flags procedure Set_Mode (Item : out Pollfd; Mode : Wait_Event_Set); @@ -50,11 +50,11 @@ package body GNAT.Sockets.Poll is -- raise Constraint_Error if Index is more than number of sockets in Self function Status (Item : Pollfd) return Event_Set is - (Input => (Item.REvents and To_C (Input)) /= 0, - Output => (Item.REvents and To_C (Output)) /= 0, - Error => (Item.REvents and SOC.POLLERR) /= 0, - Hang_Up => (Item.REvents and SOC.POLLHUP) /= 0, - Invalid_Request => (Item.REvents and SOC.POLLNVAL) /= 0); + ([Input => (Item.REvents and To_C (Input)) /= 0, + Output => (Item.REvents and To_C (Output)) /= 0, + Error => (Item.REvents and SOC.POLLERR) /= 0, + Hang_Up => (Item.REvents and SOC.POLLHUP) /= 0, + Invalid_Request => (Item.REvents and SOC.POLLNVAL) /= 0]); -- Get I/O events from C word procedure Wait @@ -188,8 +188,8 @@ package body GNAT.Sockets.Poll is begin Check_Range (Self, Index); return - (Input => (Self.Fds (Index).Events and To_C (Input)) /= 0, - Output => (Self.Fds (Index).Events and To_C (Output)) /= 0); + [Input => (Self.Fds (Index).Events and To_C (Input)) /= 0, + Output => (Self.Fds (Index).Events and To_C (Output)) /= 0]; end Get_Events; ------------ diff --git a/gcc/ada/libgnat/g-socpol.ads b/gcc/ada/libgnat/g-socpol.ads index 71ce1bb..c84c4de 100644 --- a/gcc/ada/libgnat/g-socpol.ads +++ b/gcc/ada/libgnat/g-socpol.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, AdaCore -- +-- Copyright (C) 2020-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -171,10 +171,10 @@ package GNAT.Sockets.Poll is private - Input_Event : constant Wait_Event_Set := (Input => True, Output => False); - Output_Event : constant Wait_Event_Set := (Input => False, Output => True); - Both_Events : constant Wait_Event_Set := (others => True); - Error_Event : constant Wait_Event_Set := (others => False); + Input_Event : constant Wait_Event_Set := [Input => True, Output => False]; + Output_Event : constant Wait_Event_Set := [Input => False, Output => True]; + Both_Events : constant Wait_Event_Set := [others => True]; + Error_Event : constant Wait_Event_Set := [others => False]; package SOC renames System.OS_Constants; diff --git a/gcc/ada/libgnat/g-socpol__dummy.adb b/gcc/ada/libgnat/g-socpol__dummy.adb index bc78268..55849d5 100644 --- a/gcc/ada/libgnat/g-socpol__dummy.adb +++ b/gcc/ada/libgnat/g-socpol__dummy.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, AdaCore -- +-- Copyright (C) 2020-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-socpol__dummy.ads b/gcc/ada/libgnat/g-socpol__dummy.ads index 2d7ae3c..bfd68a4 100644 --- a/gcc/ada/libgnat/g-socpol__dummy.ads +++ b/gcc/ada/libgnat/g-socpol__dummy.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, AdaCore -- +-- Copyright (C) 2020-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-socthi.adb b/gcc/ada/libgnat/g-socthi.adb index 7f7568e..e70b85b 100644 --- a/gcc/ada/libgnat/g-socthi.adb +++ b/gcc/ada/libgnat/g-socthi.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-socthi.ads b/gcc/ada/libgnat/g-socthi.ads index f1b0e2e..834167c 100644 --- a/gcc/ada/libgnat/g-socthi.ads +++ b/gcc/ada/libgnat/g-socthi.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-socthi__dummy.adb b/gcc/ada/libgnat/g-socthi__dummy.adb index c054207..7e38645 100644 --- a/gcc/ada/libgnat/g-socthi__dummy.adb +++ b/gcc/ada/libgnat/g-socthi__dummy.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-socthi__dummy.ads b/gcc/ada/libgnat/g-socthi__dummy.ads index 687ad34..276d0f6 100644 --- a/gcc/ada/libgnat/g-socthi__dummy.ads +++ b/gcc/ada/libgnat/g-socthi__dummy.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-socthi__mingw.adb b/gcc/ada/libgnat/g-socthi__mingw.adb index aa9305d..6bbdd0b 100644 --- a/gcc/ada/libgnat/g-socthi__mingw.adb +++ b/gcc/ada/libgnat/g-socthi__mingw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-socthi__mingw.ads b/gcc/ada/libgnat/g-socthi__mingw.ads index 6fb921a..e292907 100644 --- a/gcc/ada/libgnat/g-socthi__mingw.ads +++ b/gcc/ada/libgnat/g-socthi__mingw.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-socthi__vxworks.adb b/gcc/ada/libgnat/g-socthi__vxworks.adb index f2a7185..aeae52d 100644 --- a/gcc/ada/libgnat/g-socthi__vxworks.adb +++ b/gcc/ada/libgnat/g-socthi__vxworks.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-socthi__vxworks.ads b/gcc/ada/libgnat/g-socthi__vxworks.ads index 5f85fd1..d031ab8 100644 --- a/gcc/ada/libgnat/g-socthi__vxworks.ads +++ b/gcc/ada/libgnat/g-socthi__vxworks.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-soliop.ads b/gcc/ada/libgnat/g-soliop.ads index 0c07900..8917e7d 100644 --- a/gcc/ada/libgnat/g-soliop.ads +++ b/gcc/ada/libgnat/g-soliop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-soliop__lynxos.ads b/gcc/ada/libgnat/g-soliop__lynxos.ads index 4310ead..0deebaa 100644 --- a/gcc/ada/libgnat/g-soliop__lynxos.ads +++ b/gcc/ada/libgnat/g-soliop__lynxos.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-soliop__mingw.ads b/gcc/ada/libgnat/g-soliop__mingw.ads index 422dbba..8df7b74 100644 --- a/gcc/ada/libgnat/g-soliop__mingw.ads +++ b/gcc/ada/libgnat/g-soliop__mingw.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-soliop__qnx.ads b/gcc/ada/libgnat/g-soliop__qnx.ads index 916bc43..e536837 100644 --- a/gcc/ada/libgnat/g-soliop__qnx.ads +++ b/gcc/ada/libgnat/g-soliop__qnx.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-soliop__solaris.ads b/gcc/ada/libgnat/g-soliop__solaris.ads index aaef320..d795e93 100644 --- a/gcc/ada/libgnat/g-soliop__solaris.ads +++ b/gcc/ada/libgnat/g-soliop__solaris.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sopowa.adb b/gcc/ada/libgnat/g-sopowa.adb index dae6f7d..74cd263 100644 --- a/gcc/ada/libgnat/g-sopowa.adb +++ b/gcc/ada/libgnat/g-sopowa.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, AdaCore -- +-- Copyright (C) 2020-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sopowa__mingw.adb b/gcc/ada/libgnat/g-sopowa__mingw.adb index 7fb9f53..26c7da4 100644 --- a/gcc/ada/libgnat/g-sopowa__mingw.adb +++ b/gcc/ada/libgnat/g-sopowa__mingw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, AdaCore -- +-- Copyright (C) 2020-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sopowa__posix.adb b/gcc/ada/libgnat/g-sopowa__posix.adb index 3bb24f5..6332530 100644 --- a/gcc/ada/libgnat/g-sopowa__posix.adb +++ b/gcc/ada/libgnat/g-sopowa__posix.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, AdaCore -- +-- Copyright (C) 2020-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sothco.adb b/gcc/ada/libgnat/g-sothco.adb index aa27101..328fe4b 100644 --- a/gcc/ada/libgnat/g-sothco.adb +++ b/gcc/ada/libgnat/g-sothco.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, AdaCore -- +-- Copyright (C) 2008-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sothco.ads b/gcc/ada/libgnat/g-sothco.ads index b48657b..d46625b 100644 --- a/gcc/ada/libgnat/g-sothco.ads +++ b/gcc/ada/libgnat/g-sothco.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, AdaCore -- +-- Copyright (C) 2008-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -75,16 +75,16 @@ package GNAT.Sockets.Thin_Common is ------------------------------------------- Families : constant array (Family_Type) of C.int := - (Family_Unspec => SOSC.AF_UNSPEC, + [Family_Unspec => SOSC.AF_UNSPEC, Family_Unix => SOSC.AF_UNIX, Family_Inet => SOSC.AF_INET, - Family_Inet6 => SOSC.AF_INET6); + Family_Inet6 => SOSC.AF_INET6]; Lengths : constant array (Family_Type) of C.unsigned_char := - (Family_Unspec => 0, + [Family_Unspec => 0, Family_Unix => SOSC.SIZEOF_sockaddr_un, Family_Inet => SOSC.SIZEOF_sockaddr_in, - Family_Inet6 => SOSC.SIZEOF_sockaddr_in6); + Family_Inet6 => SOSC.SIZEOF_sockaddr_in6]; ---------------------------- -- Generic socket address -- @@ -160,7 +160,7 @@ package GNAT.Sockets.Thin_Common is Sin_Addr : In_Addr := (others => 0); -- IPv4 address - Sin_Zero : C.char_array (1 .. 8) := (others => C.nul); + Sin_Zero : C.char_array (1 .. 8) := [others => C.nul]; -- Padding -- -- Note that some platforms require that all unused (reserved) bytes @@ -174,7 +174,7 @@ package GNAT.Sockets.Thin_Common is -- Port in network byte order Sin6_FlowInfo : Interfaces.Unsigned_32 := 0; - Sin6_Addr : In6_Addr := (others => 0); + Sin6_Addr : In6_Addr := [others => 0]; Sin6_Scope_Id : Interfaces.Unsigned_32 := 0; when Family_Unix => diff --git a/gcc/ada/libgnat/g-sothco__dummy.adb b/gcc/ada/libgnat/g-sothco__dummy.adb index 87b710e..6e9eae2 100644 --- a/gcc/ada/libgnat/g-sothco__dummy.adb +++ b/gcc/ada/libgnat/g-sothco__dummy.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sothco__dummy.ads b/gcc/ada/libgnat/g-sothco__dummy.ads index 6aadd8a..d1225e4 100644 --- a/gcc/ada/libgnat/g-sothco__dummy.ads +++ b/gcc/ada/libgnat/g-sothco__dummy.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, AdaCore -- +-- Copyright (C) 2008-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-souinf.ads b/gcc/ada/libgnat/g-souinf.ads index bf362c4..700f518 100644 --- a/gcc/ada/libgnat/g-souinf.ads +++ b/gcc/ada/libgnat/g-souinf.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-spchge.adb b/gcc/ada/libgnat/g-spchge.adb index f790171..3ee4ef8 100644 --- a/gcc/ada/libgnat/g-spchge.adb +++ b/gcc/ada/libgnat/g-spchge.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package body GNAT.Spelling_Checker_Generic is ------------------------ diff --git a/gcc/ada/libgnat/g-spchge.ads b/gcc/ada/libgnat/g-spchge.ads index 88bf264..1e39d1b 100644 --- a/gcc/ada/libgnat/g-spchge.ads +++ b/gcc/ada/libgnat/g-spchge.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -37,8 +37,6 @@ -- codes for ASCII characters in the range 16#20#..16#7F# have their normal -- expected encoding values (e.g. the Pos value 16#31# must be digit 1). -pragma Compiler_Unit_Warning; - package GNAT.Spelling_Checker_Generic is pragma Pure; diff --git a/gcc/ada/libgnat/g-speche.adb b/gcc/ada/libgnat/g-speche.adb index cccb3d8..7181bfc 100644 --- a/gcc/ada/libgnat/g-speche.adb +++ b/gcc/ada/libgnat/g-speche.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with GNAT.Spelling_Checker_Generic; package body GNAT.Spelling_Checker is diff --git a/gcc/ada/libgnat/g-speche.ads b/gcc/ada/libgnat/g-speche.ads index 43a434e..aad3e2a 100644 --- a/gcc/ada/libgnat/g-speche.ads +++ b/gcc/ada/libgnat/g-speche.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -34,8 +34,6 @@ -- This package provides a utility routine for checking for bad spellings -- for the case of String arguments. -pragma Compiler_Unit_Warning; - package GNAT.Spelling_Checker is pragma Pure; diff --git a/gcc/ada/libgnat/g-spipat.adb b/gcc/ada/libgnat/g-spipat.adb index 97cfdf9..6ecbd1b 100644 --- a/gcc/ada/libgnat/g-spipat.adb +++ b/gcc/ada/libgnat/g-spipat.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -367,7 +367,7 @@ package body GNAT.Spitbol.Patterns is -- one character on success, and not to make any entries on the stack. OK_For_Simple_Arbno : constant array (Pattern_Code) of Boolean := - (PC_Any_CS | + [PC_Any_CS | PC_Any_CH | PC_Any_VF | PC_Any_VP | @@ -387,7 +387,7 @@ package body GNAT.Spitbol.Patterns is PC_String_4 | PC_String_5 | PC_String_6 => True, - others => False); + others => False]; ------------------------------- -- The Pattern History Stack -- @@ -2836,7 +2836,6 @@ package body GNAT.Spitbol.Patterns is L : Natural; Start : Natural; Stop : Natural; - pragma Unreferenced (Stop); begin Get_String (Subject, S, L); @@ -2855,7 +2854,6 @@ package body GNAT.Spitbol.Patterns is Pat : Pattern) return Boolean is Start, Stop : Natural; - pragma Unreferenced (Stop); subtype String1 is String (1 .. Subject'Length); @@ -2935,7 +2933,6 @@ package body GNAT.Spitbol.Patterns is Start : Natural; Stop : Natural; - pragma Unreferenced (Start, Stop); begin Get_String (Subject, S, L); @@ -2952,7 +2949,6 @@ package body GNAT.Spitbol.Patterns is Pat : Pattern) is Start, Stop : Natural; - pragma Unreferenced (Start, Stop); subtype String1 is String (1 .. Subject'Length); @@ -3135,7 +3131,6 @@ package body GNAT.Spitbol.Patterns is Start : Natural; Stop : Natural; - pragma Unreferenced (Start, Stop); begin Get_String (Subject, S, L); @@ -3152,7 +3147,6 @@ package body GNAT.Spitbol.Patterns is Pat : PString) is Start, Stop : Natural; - pragma Unreferenced (Start, Stop); subtype String1 is String (1 .. Subject'Length); diff --git a/gcc/ada/libgnat/g-spipat.ads b/gcc/ada/libgnat/g-spipat.ads index 13d1e93..8179d56 100644 --- a/gcc/ada/libgnat/g-spipat.ads +++ b/gcc/ada/libgnat/g-spipat.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1997-2021, AdaCore -- +-- Copyright (C) 1997-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -654,19 +654,19 @@ package GNAT.Spitbol.Patterns is -- operations for constructing patterns that can be used in the pattern -- matching operations provided. - type Boolean_Func is access function return Boolean; + type Boolean_Func is access function return Boolean with Favor_Top_Level; -- General Boolean function type. When this type is used as a formal -- parameter type in this package, it indicates a deferred predicate -- pattern. The function will be called when the pattern element is -- matched and failure signalled if False is returned. - type Natural_Func is access function return Natural; + type Natural_Func is access function return Natural with Favor_Top_Level; -- General Natural function type. When this type is used as a formal -- parameter type in this package, it indicates a deferred pattern. -- The function will be called when the pattern element is matched -- to obtain the currently referenced Natural value. - type VString_Func is access function return VString; + type VString_Func is access function return VString with Favor_Top_Level; -- General VString function type. When this type is used as a formal -- parameter type in this package, it indicates a deferred pattern. -- The function will be called when the pattern element is matched diff --git a/gcc/ada/libgnat/g-spitbo.adb b/gcc/ada/libgnat/g-spitbo.adb index dee969b..af979a7 100644 --- a/gcc/ada/libgnat/g-spitbo.adb +++ b/gcc/ada/libgnat/g-spitbo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-spitbo.ads b/gcc/ada/libgnat/g-spitbo.ads index 447daeb..ba3910c 100644 --- a/gcc/ada/libgnat/g-spitbo.ads +++ b/gcc/ada/libgnat/g-spitbo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1997-2021, AdaCore -- +-- Copyright (C) 1997-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-spogwa.adb b/gcc/ada/libgnat/g-spogwa.adb index af7fcfc..2e1486f 100644 --- a/gcc/ada/libgnat/g-spogwa.adb +++ b/gcc/ada/libgnat/g-spogwa.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, AdaCore -- +-- Copyright (C) 2020-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-spogwa.ads b/gcc/ada/libgnat/g-spogwa.ads index ad9cecd..c25c95e 100644 --- a/gcc/ada/libgnat/g-spogwa.ads +++ b/gcc/ada/libgnat/g-spogwa.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, AdaCore -- +-- Copyright (C) 2020-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sptabo.ads b/gcc/ada/libgnat/g-sptabo.ads index 4f479f7..3a48fce 100644 --- a/gcc/ada/libgnat/g-sptabo.ads +++ b/gcc/ada/libgnat/g-sptabo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1997-2021, AdaCore -- +-- Copyright (C) 1997-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sptain.ads b/gcc/ada/libgnat/g-sptain.ads index be4ebc3..d1c195e 100644 --- a/gcc/ada/libgnat/g-sptain.ads +++ b/gcc/ada/libgnat/g-sptain.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1997-2021, AdaCore -- +-- Copyright (C) 1997-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sptavs.ads b/gcc/ada/libgnat/g-sptavs.ads index 9923025..03fc62d 100644 --- a/gcc/ada/libgnat/g-sptavs.ads +++ b/gcc/ada/libgnat/g-sptavs.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1997-2021, AdaCore -- +-- Copyright (C) 1997-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sse.ads b/gcc/ada/libgnat/g-sse.ads index c56d071..3b6265d 100644 --- a/gcc/ada/libgnat/g-sse.ads +++ b/gcc/ada/libgnat/g-sse.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-ssvety.ads b/gcc/ada/libgnat/g-ssvety.ads index c09f040..ea937ec 100644 --- a/gcc/ada/libgnat/g-ssvety.ads +++ b/gcc/ada/libgnat/g-ssvety.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-sthcso.adb b/gcc/ada/libgnat/g-sthcso.adb index bf80f9b..f045c02 100644 --- a/gcc/ada/libgnat/g-sthcso.adb +++ b/gcc/ada/libgnat/g-sthcso.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-stheme.adb b/gcc/ada/libgnat/g-stheme.adb index 3782972..ca00628 100644 --- a/gcc/ada/libgnat/g-stheme.adb +++ b/gcc/ada/libgnat/g-stheme.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-strhas.ads b/gcc/ada/libgnat/g-strhas.ads index 19330ab..af93203 100644 --- a/gcc/ada/libgnat/g-strhas.ads +++ b/gcc/ada/libgnat/g-strhas.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2015-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-string.adb b/gcc/ada/libgnat/g-string.adb index f8cd5ee..2730e55 100644 --- a/gcc/ada/libgnat/g-string.adb +++ b/gcc/ada/libgnat/g-string.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-string.ads b/gcc/ada/libgnat/g-string.ads index a8f2574..d9bcd4f 100644 --- a/gcc/ada/libgnat/g-string.ads +++ b/gcc/ada/libgnat/g-string.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-strspl.ads b/gcc/ada/libgnat/g-strspl.ads index 14c143e..31b78e9 100644 --- a/gcc/ada/libgnat/g-strspl.ads +++ b/gcc/ada/libgnat/g-strspl.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-stseme.adb b/gcc/ada/libgnat/g-stseme.adb index 5d8f91e..389c91e 100644 --- a/gcc/ada/libgnat/g-stseme.adb +++ b/gcc/ada/libgnat/g-stseme.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-stsifd__sockets.adb b/gcc/ada/libgnat/g-stsifd__sockets.adb index 20a97fa..02b81bb 100644 --- a/gcc/ada/libgnat/g-stsifd__sockets.adb +++ b/gcc/ada/libgnat/g-stsifd__sockets.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-table.adb b/gcc/ada/libgnat/g-table.adb index 8991e68..608cb32 100644 --- a/gcc/ada/libgnat/g-table.adb +++ b/gcc/ada/libgnat/g-table.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-table.ads b/gcc/ada/libgnat/g-table.ads index 7d3ef58..4aed42c 100644 --- a/gcc/ada/libgnat/g-table.ads +++ b/gcc/ada/libgnat/g-table.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -41,8 +41,6 @@ -- GNAT.Table -- Table (the compiler unit) -pragma Compiler_Unit_Warning; - with GNAT.Dynamic_Tables; generic diff --git a/gcc/ada/libgnat/g-tasloc.adb b/gcc/ada/libgnat/g-tasloc.adb index 2461035..38f5d3e 100644 --- a/gcc/ada/libgnat/g-tasloc.adb +++ b/gcc/ada/libgnat/g-tasloc.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, AdaCore -- +-- Copyright (C) 1997-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-tasloc.ads b/gcc/ada/libgnat/g-tasloc.ads index 8296994..6227afa 100644 --- a/gcc/ada/libgnat/g-tasloc.ads +++ b/gcc/ada/libgnat/g-tasloc.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-timsta.adb b/gcc/ada/libgnat/g-timsta.adb index 4eeed30..74463df 100644 --- a/gcc/ada/libgnat/g-timsta.adb +++ b/gcc/ada/libgnat/g-timsta.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-timsta.ads b/gcc/ada/libgnat/g-timsta.ads index 76c1a79..5aa4ed2 100644 --- a/gcc/ada/libgnat/g-timsta.ads +++ b/gcc/ada/libgnat/g-timsta.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-traceb.adb b/gcc/ada/libgnat/g-traceb.adb index d832570..ec4dff7 100644 --- a/gcc/ada/libgnat/g-traceb.adb +++ b/gcc/ada/libgnat/g-traceb.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-traceb.ads b/gcc/ada/libgnat/g-traceb.ads index 15db799..074b7a6 100644 --- a/gcc/ada/libgnat/g-traceb.ads +++ b/gcc/ada/libgnat/g-traceb.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-trasym.adb b/gcc/ada/libgnat/g-trasym.adb index 07509ee..358c79d 100644 --- a/gcc/ada/libgnat/g-trasym.adb +++ b/gcc/ada/libgnat/g-trasym.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-trasym.ads b/gcc/ada/libgnat/g-trasym.ads index c861968..afcc47e 100644 --- a/gcc/ada/libgnat/g-trasym.ads +++ b/gcc/ada/libgnat/g-trasym.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-tty.adb b/gcc/ada/libgnat/g-tty.adb index f54cc46..eae68e5 100644 --- a/gcc/ada/libgnat/g-tty.adb +++ b/gcc/ada/libgnat/g-tty.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-tty.ads b/gcc/ada/libgnat/g-tty.ads index 90e3237..c61d6bc 100644 --- a/gcc/ada/libgnat/g-tty.ads +++ b/gcc/ada/libgnat/g-tty.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-u3spch.adb b/gcc/ada/libgnat/g-u3spch.adb index 1a27143..a062887 100644 --- a/gcc/ada/libgnat/g-u3spch.adb +++ b/gcc/ada/libgnat/g-u3spch.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with GNAT.Spelling_Checker_Generic; package body GNAT.UTF_32_Spelling_Checker is diff --git a/gcc/ada/libgnat/g-u3spch.ads b/gcc/ada/libgnat/g-u3spch.ads index 56356f1..ab2fa8e 100644 --- a/gcc/ada/libgnat/g-u3spch.ads +++ b/gcc/ada/libgnat/g-u3spch.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -34,8 +34,6 @@ -- This package provides a utility routine for checking for bad spellings -- for the case of System.WCh_Cnv.UTF_32_String arguments. -pragma Compiler_Unit_Warning; - with System.WCh_Cnv; package GNAT.UTF_32_Spelling_Checker is diff --git a/gcc/ada/libgnat/g-utf_32.adb b/gcc/ada/libgnat/g-utf_32.adb index 432d77d..7ff9051 100644 --- a/gcc/ada/libgnat/g-utf_32.adb +++ b/gcc/ada/libgnat/g-utf_32.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-utf_32.ads b/gcc/ada/libgnat/g-utf_32.ads index 3cd2729..b1abd7d 100644 --- a/gcc/ada/libgnat/g-utf_32.ads +++ b/gcc/ada/libgnat/g-utf_32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-wispch.adb b/gcc/ada/libgnat/g-wispch.adb index 3f776b2..aa2b746 100644 --- a/gcc/ada/libgnat/g-wispch.adb +++ b/gcc/ada/libgnat/g-wispch.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-wispch.ads b/gcc/ada/libgnat/g-wispch.ads index de4697b..2f44752 100644 --- a/gcc/ada/libgnat/g-wispch.ads +++ b/gcc/ada/libgnat/g-wispch.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-wistsp.ads b/gcc/ada/libgnat/g-wistsp.ads index b6ba727..9b4aebf 100644 --- a/gcc/ada/libgnat/g-wistsp.ads +++ b/gcc/ada/libgnat/g-wistsp.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-zspche.adb b/gcc/ada/libgnat/g-zspche.adb index ca7b84a..f8cb7cb 100644 --- a/gcc/ada/libgnat/g-zspche.adb +++ b/gcc/ada/libgnat/g-zspche.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-zspche.ads b/gcc/ada/libgnat/g-zspche.ads index 43ae4ed..da486cc 100644 --- a/gcc/ada/libgnat/g-zspche.ads +++ b/gcc/ada/libgnat/g-zspche.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/g-zstspl.ads b/gcc/ada/libgnat/g-zstspl.ads index 377d1dd..2988987 100644 --- a/gcc/ada/libgnat/g-zstspl.ads +++ b/gcc/ada/libgnat/g-zstspl.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/gnat.ads b/gcc/ada/libgnat/gnat.ads index 612a6c8..1471c50 100644 --- a/gcc/ada/libgnat/gnat.ads +++ b/gcc/ada/libgnat/gnat.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, AdaCore -- +-- Copyright (C) 1992-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,6 +31,9 @@ -- This is the parent package for a library of useful units provided with GNAT +-- Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in +-- gcc-interface/Make-lang.in for details on the constraints. + package GNAT is pragma Pure; diff --git a/gcc/ada/libgnat/i-c.adb b/gcc/ada/libgnat/i-c.adb index 5be50ff..4b50d18 100644 --- a/gcc/ada/libgnat/i-c.adb +++ b/gcc/ada/libgnat/i-c.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,77 @@ -- -- ------------------------------------------------------------------------------ -package body Interfaces.C is +-- Ghost code, loop invariants and assertions in this unit are meant for +-- analysis only, not for run-time checking, as it would be too costly +-- otherwise. This is enforced by setting the assertion policy to Ignore. + +pragma Assertion_Policy (Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + +package body Interfaces.C + with SPARK_Mode +is + + -------------------- + -- C_Length_Ghost -- + -------------------- + + function C_Length_Ghost (Item : char_array) return size_t is + begin + for J in Item'Range loop + if Item (J) = nul then + return J - Item'First; + end if; + + pragma Loop_Invariant + (for all K in Item'First .. J => Item (K) /= nul); + end loop; + + raise Program_Error; + end C_Length_Ghost; + + function C_Length_Ghost (Item : wchar_array) return size_t is + begin + for J in Item'Range loop + if Item (J) = wide_nul then + return J - Item'First; + end if; + + pragma Loop_Invariant + (for all K in Item'First .. J => Item (K) /= wide_nul); + end loop; + + raise Program_Error; + end C_Length_Ghost; + + function C_Length_Ghost (Item : char16_array) return size_t is + begin + for J in Item'Range loop + if Item (J) = char16_nul then + return J - Item'First; + end if; + + pragma Loop_Invariant + (for all K in Item'First .. J => Item (K) /= char16_nul); + end loop; + + raise Program_Error; + end C_Length_Ghost; + + function C_Length_Ghost (Item : char32_array) return size_t is + begin + for J in Item'Range loop + if Item (J) = char32_nul then + return J - Item'First; + end if; + + pragma Loop_Invariant + (for all K in Item'First .. J => Item (K) /= char32_nul); + end loop; + + raise Program_Error; + end C_Length_Ghost; ----------------------- -- Is_Nul_Terminated -- @@ -43,6 +113,9 @@ package body Interfaces.C is if Item (J) = nul then return True; end if; + + pragma Loop_Invariant + (for all K in Item'First .. J => Item (K) /= nul); end loop; return False; @@ -56,6 +129,9 @@ package body Interfaces.C is if Item (J) = wide_nul then return True; end if; + + pragma Loop_Invariant + (for all K in Item'First .. J => Item (K) /= wide_nul); end loop; return False; @@ -69,6 +145,9 @@ package body Interfaces.C is if Item (J) = char16_nul then return True; end if; + + pragma Loop_Invariant + (for all K in Item'First .. J => Item (K) /= char16_nul); end loop; return False; @@ -82,6 +161,9 @@ package body Interfaces.C is if Item (J) = char32_nul then return True; end if; + + pragma Loop_Invariant + (for all K in Item'First .. J => Item (K) /= char32_nul); end loop; return False; @@ -112,6 +194,13 @@ package body Interfaces.C is From := Item'First; loop + pragma Loop_Invariant (From in Item'Range); + pragma Loop_Invariant + (for some J in From .. Item'Last => Item (J) = nul); + pragma Loop_Invariant + (for all J in Item'First .. From when J /= From => + Item (J) /= nul); + if From > Item'Last then raise Terminator_Error; elsif Item (From) = nul then @@ -121,6 +210,8 @@ package body Interfaces.C is end if; end loop; + pragma Assert (From = Item'First + C_Length_Ghost (Item)); + Count := Natural (From - Item'First); else @@ -128,11 +219,17 @@ package body Interfaces.C is end if; declare - R : String (1 .. Count); + Count_Cst : constant Natural := Count; + R : String (1 .. Count_Cst) with Relaxed_Initialization; begin for J in R'Range loop - R (J) := To_Ada (Item (size_t (J) + (Item'First - 1))); + R (J) := To_Ada (Item (size_t (J) - 1 + Item'First)); + + pragma Loop_Invariant (for all K in 1 .. J => R (K)'Initialized); + pragma Loop_Invariant + (for all K in 1 .. J => + R (K) = To_Ada (Item (size_t (K) - 1 + Item'First))); end loop; return R; @@ -148,12 +245,19 @@ package body Interfaces.C is Trim_Nul : Boolean := True) is From : size_t; - To : Positive; + To : Integer; begin if Trim_Nul then From := Item'First; loop + pragma Loop_Invariant (From in Item'Range); + pragma Loop_Invariant + (for some J in From .. Item'Last => Item (J) = nul); + pragma Loop_Invariant + (for all J in Item'First .. From when J /= From => + Item (J) /= nul); + if From > Item'Last then raise Terminator_Error; elsif Item (From) = nul then @@ -178,11 +282,28 @@ package body Interfaces.C is for J in 1 .. Count loop Target (To) := Character (Item (From)); + + pragma Loop_Invariant (From in Item'Range); + pragma Loop_Invariant (To in Target'Range); + pragma Loop_Invariant (To = Target'First + (J - 1)); + pragma Loop_Invariant (From = Item'First + size_t (J - 1)); + pragma Loop_Invariant + (for all J in Target'First .. To => Target (J)'Initialized); + pragma Loop_Invariant + (Target (Target'First .. To)'Initialized); + pragma Loop_Invariant + (for all K in Target'First .. To => + Target (K) = + To_Ada (Item (size_t (K - Target'First) + Item'First))); + + -- Avoid possible overflow when incrementing To in the last + -- iteration of the loop. + exit when J = Count; + From := From + 1; To := To + 1; end loop; end if; - end To_Ada; -- Convert wchar_t to Wide_Character @@ -206,6 +327,13 @@ package body Interfaces.C is From := Item'First; loop + pragma Loop_Invariant (From in Item'Range); + pragma Loop_Invariant + (for some J in From .. Item'Last => Item (J) = wide_nul); + pragma Loop_Invariant + (for all J in Item'First .. From when J /= From => + Item (J) /= wide_nul); + if From > Item'Last then raise Terminator_Error; elsif Item (From) = wide_nul then @@ -215,6 +343,8 @@ package body Interfaces.C is end if; end loop; + pragma Assert (From = Item'First + C_Length_Ghost (Item)); + Count := Natural (From - Item'First); else @@ -222,11 +352,17 @@ package body Interfaces.C is end if; declare - R : Wide_String (1 .. Count); + Count_Cst : constant Natural := Count; + R : Wide_String (1 .. Count_Cst) with Relaxed_Initialization; begin for J in R'Range loop - R (J) := To_Ada (Item (size_t (J) + (Item'First - 1))); + R (J) := To_Ada (Item (size_t (J) - 1 + Item'First)); + + pragma Loop_Invariant (for all K in 1 .. J => R (K)'Initialized); + pragma Loop_Invariant + (for all K in 1 .. J => + R (K) = To_Ada (Item (size_t (K) - 1 + Item'First))); end loop; return R; @@ -242,12 +378,19 @@ package body Interfaces.C is Trim_Nul : Boolean := True) is From : size_t; - To : Positive; + To : Integer; begin if Trim_Nul then From := Item'First; loop + pragma Loop_Invariant (From in Item'Range); + pragma Loop_Invariant + (for some J in From .. Item'Last => Item (J) = wide_nul); + pragma Loop_Invariant + (for all J in Item'First .. From when J /= From => + Item (J) /= wide_nul); + if From > Item'Last then raise Terminator_Error; elsif Item (From) = wide_nul then @@ -272,6 +415,24 @@ package body Interfaces.C is for J in 1 .. Count loop Target (To) := To_Ada (Item (From)); + + pragma Loop_Invariant (From in Item'Range); + pragma Loop_Invariant (To in Target'Range); + pragma Loop_Invariant (To = Target'First + (J - 1)); + pragma Loop_Invariant (From = Item'First + size_t (J - 1)); + pragma Loop_Invariant + (for all J in Target'First .. To => Target (J)'Initialized); + pragma Loop_Invariant + (Target (Target'First .. To)'Initialized); + pragma Loop_Invariant + (for all K in Target'First .. To => + Target (K) = + To_Ada (Item (size_t (K - Target'First) + Item'First))); + + -- Avoid possible overflow when incrementing To in the last + -- iteration of the loop. + exit when J = Count; + From := From + 1; To := To + 1; end loop; @@ -299,15 +460,24 @@ package body Interfaces.C is From := Item'First; loop + pragma Loop_Invariant (From in Item'Range); + pragma Loop_Invariant + (for some J in From .. Item'Last => Item (J) = char16_nul); + pragma Loop_Invariant + (for all J in Item'First .. From when J /= From => + Item (J) /= char16_nul); + if From > Item'Last then raise Terminator_Error; - elsif Item (From) = char16_t'Val (0) then + elsif Item (From) = char16_nul then exit; else From := From + 1; end if; end loop; + pragma Assert (From = Item'First + C_Length_Ghost (Item)); + Count := Natural (From - Item'First); else @@ -315,11 +485,17 @@ package body Interfaces.C is end if; declare - R : Wide_String (1 .. Count); + Count_Cst : constant Natural := Count; + R : Wide_String (1 .. Count_Cst) with Relaxed_Initialization; begin for J in R'Range loop - R (J) := To_Ada (Item (size_t (J) + (Item'First - 1))); + R (J) := To_Ada (Item (size_t (J) - 1 + Item'First)); + + pragma Loop_Invariant (for all K in 1 .. J => R (K)'Initialized); + pragma Loop_Invariant + (for all K in 1 .. J => + R (K) = To_Ada (Item (size_t (K) - 1 + Item'First))); end loop; return R; @@ -335,15 +511,22 @@ package body Interfaces.C is Trim_Nul : Boolean := True) is From : size_t; - To : Positive; + To : Integer; begin if Trim_Nul then From := Item'First; loop + pragma Loop_Invariant (From in Item'Range); + pragma Loop_Invariant + (for some J in From .. Item'Last => Item (J) = char16_nul); + pragma Loop_Invariant + (for all J in Item'First .. From when J /= From => + Item (J) /= char16_nul); + if From > Item'Last then raise Terminator_Error; - elsif Item (From) = char16_t'Val (0) then + elsif Item (From) = char16_nul then exit; else From := From + 1; @@ -365,6 +548,24 @@ package body Interfaces.C is for J in 1 .. Count loop Target (To) := To_Ada (Item (From)); + + pragma Loop_Invariant (From in Item'Range); + pragma Loop_Invariant (To in Target'Range); + pragma Loop_Invariant (To = Target'First + (J - 1)); + pragma Loop_Invariant (From = Item'First + size_t (J - 1)); + pragma Loop_Invariant + (for all J in Target'First .. To => Target (J)'Initialized); + pragma Loop_Invariant + (Target (Target'First .. To)'Initialized); + pragma Loop_Invariant + (for all K in Target'First .. To => + Target (K) = + To_Ada (Item (size_t (K - Target'First) + Item'First))); + + -- Avoid possible overflow when incrementing To in the last + -- iteration of the loop. + exit when J = Count; + From := From + 1; To := To + 1; end loop; @@ -392,15 +593,24 @@ package body Interfaces.C is From := Item'First; loop + pragma Loop_Invariant (From in Item'Range); + pragma Loop_Invariant + (for some J in From .. Item'Last => Item (J) = char32_nul); + pragma Loop_Invariant + (for all J in Item'First .. From when J /= From => + Item (J) /= char32_nul); + if From > Item'Last then raise Terminator_Error; - elsif Item (From) = char32_t'Val (0) then + elsif Item (From) = char32_nul then exit; else From := From + 1; end if; end loop; + pragma Assert (From = Item'First + C_Length_Ghost (Item)); + Count := Natural (From - Item'First); else @@ -408,11 +618,17 @@ package body Interfaces.C is end if; declare - R : Wide_Wide_String (1 .. Count); + Count_Cst : constant Natural := Count; + R : Wide_Wide_String (1 .. Count_Cst) with Relaxed_Initialization; begin for J in R'Range loop - R (J) := To_Ada (Item (size_t (J) + (Item'First - 1))); + R (J) := To_Ada (Item (size_t (J) - 1 + Item'First)); + + pragma Loop_Invariant (for all K in 1 .. J => R (K)'Initialized); + pragma Loop_Invariant + (for all K in 1 .. J => + R (K) = To_Ada (Item (size_t (K) - 1 + Item'First))); end loop; return R; @@ -428,15 +644,22 @@ package body Interfaces.C is Trim_Nul : Boolean := True) is From : size_t; - To : Positive; + To : Integer; begin if Trim_Nul then From := Item'First; loop + pragma Loop_Invariant (From in Item'Range); + pragma Loop_Invariant + (for some J in From .. Item'Last => Item (J) = char32_nul); + pragma Loop_Invariant + (for all J in Item'First .. From when J /= From => + Item (J) /= char32_nul); + if From > Item'Last then raise Terminator_Error; - elsif Item (From) = char32_t'Val (0) then + elsif Item (From) = char32_nul then exit; else From := From + 1; @@ -458,6 +681,24 @@ package body Interfaces.C is for J in 1 .. Count loop Target (To) := To_Ada (Item (From)); + + pragma Loop_Invariant (From in Item'Range); + pragma Loop_Invariant (To in Target'Range); + pragma Loop_Invariant (To = Target'First + (J - 1)); + pragma Loop_Invariant (From = Item'First + size_t (J - 1)); + pragma Loop_Invariant + (for all J in Target'First .. To => Target (J)'Initialized); + pragma Loop_Invariant + (Target (Target'First .. To)'Initialized); + pragma Loop_Invariant + (for all K in Target'First .. To => + Target (K) = + To_Ada (Item (size_t (K - Target'First) + Item'First))); + + -- Avoid possible overflow when incrementing To in the last + -- iteration of the loop. + exit when J = Count; + From := From + 1; To := To + 1; end loop; @@ -484,14 +725,26 @@ package body Interfaces.C is begin if Append_Nul then declare - R : char_array (0 .. Item'Length); + R : char_array (0 .. Item'Length) with Relaxed_Initialization; begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); + + pragma Loop_Invariant + (for all K in 0 .. size_t (J - Item'First) => + R (K)'Initialized); + pragma Loop_Invariant + (for all K in Item'First .. J => + R (size_t (K - Item'First)) = To_C (Item (K))); end loop; R (R'Last) := nul; + + pragma Assert + (for all J in Item'Range => + R (size_t (J - Item'First)) = To_C (Item (J))); + return R; end; @@ -512,11 +765,19 @@ package body Interfaces.C is else declare - R : char_array (0 .. Item'Length - 1); + R : char_array (0 .. Item'Length - 1) + with Relaxed_Initialization; begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); + + pragma Loop_Invariant + (for all K in 0 .. size_t (J - Item'First) => + R (K)'Initialized); + pragma Loop_Invariant + (for all K in Item'First .. J => + R (size_t (K - Item'First)) = To_C (Item (K))); end loop; return R; @@ -543,6 +804,19 @@ package body Interfaces.C is To := Target'First; for From in Item'Range loop Target (To) := char (Item (From)); + + pragma Loop_Invariant (To in Target'Range); + pragma Loop_Invariant + (To - Target'First = size_t (From - Item'First)); + pragma Loop_Invariant + (for all J in Target'First .. To => Target (J)'Initialized); + pragma Loop_Invariant + (Target (Target'First .. To)'Initialized); + pragma Loop_Invariant + (for all J in Item'First .. From => + Target (Target'First + size_t (J - Item'First)) = + To_C (Item (J))); + To := To + 1; end loop; @@ -576,14 +850,26 @@ package body Interfaces.C is begin if Append_Nul then declare - R : wchar_array (0 .. Item'Length); + R : wchar_array (0 .. Item'Length) with Relaxed_Initialization; begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); + + pragma Loop_Invariant + (for all K in 0 .. size_t (J - Item'First) => + R (K)'Initialized); + pragma Loop_Invariant + (for all K in Item'First .. J => + R (size_t (K - Item'First)) = To_C (Item (K))); end loop; R (R'Last) := wide_nul; + + pragma Assert + (for all J in Item'Range => + R (size_t (J - Item'First)) = To_C (Item (J))); + return R; end; @@ -600,11 +886,19 @@ package body Interfaces.C is else declare - R : wchar_array (0 .. Item'Length - 1); + R : wchar_array (0 .. Item'Length - 1) + with Relaxed_Initialization; begin - for J in size_t range 0 .. Item'Length - 1 loop - R (J) := To_C (Item (Integer (J) + Item'First)); + for J in Item'Range loop + R (size_t (J - Item'First)) := To_C (Item (J)); + + pragma Loop_Invariant + (for all K in 0 .. size_t (J - Item'First) => + R (K)'Initialized); + pragma Loop_Invariant + (for all K in Item'First .. J => + R (size_t (K - Item'First)) = To_C (Item (K))); end loop; return R; @@ -631,9 +925,31 @@ package body Interfaces.C is To := Target'First; for From in Item'Range loop Target (To) := To_C (Item (From)); + + pragma Loop_Invariant (To in Target'Range); + pragma Loop_Invariant + (To - Target'First = size_t (From - Item'First)); + pragma Loop_Invariant + (for all J in Target'First .. To => Target (J)'Initialized); + pragma Loop_Invariant + (Target (Target'First .. To)'Initialized); + pragma Loop_Invariant + (for all J in Item'First .. From => + Target (Target'First + size_t (J - Item'First)) = + To_C (Item (J))); + To := To + 1; end loop; + pragma Assert + (for all J in Item'Range => + Target (Target'First + size_t (J - Item'First)) = + To_C (Item (J))); + pragma Assert + (if Item'Length /= 0 then + Target (Target'First .. + Target'First + (Item'Length - 1))'Initialized); + if Append_Nul then if To > Target'Last then raise Constraint_Error; @@ -664,14 +980,26 @@ package body Interfaces.C is begin if Append_Nul then declare - R : char16_array (0 .. Item'Length); + R : char16_array (0 .. Item'Length) with Relaxed_Initialization; begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); + + pragma Loop_Invariant + (for all K in 0 .. size_t (J - Item'First) => + R (K)'Initialized); + pragma Loop_Invariant + (for all K in Item'First .. J => + R (size_t (K - Item'First)) = To_C (Item (K))); end loop; - R (R'Last) := char16_t'Val (0); + R (R'Last) := char16_nul; + + pragma Assert + (for all J in Item'Range => + R (size_t (J - Item'First)) = To_C (Item (J))); + return R; end; @@ -688,11 +1016,19 @@ package body Interfaces.C is else declare - R : char16_array (0 .. Item'Length - 1); + R : char16_array (0 .. Item'Length - 1) + with Relaxed_Initialization; begin - for J in size_t range 0 .. Item'Length - 1 loop - R (J) := To_C (Item (Integer (J) + Item'First)); + for J in Item'Range loop + R (size_t (J - Item'First)) := To_C (Item (J)); + + pragma Loop_Invariant + (for all K in 0 .. size_t (J - Item'First) => + R (K)'Initialized); + pragma Loop_Invariant + (for all K in Item'First .. J => + R (size_t (K - Item'First)) = To_C (Item (K))); end loop; return R; @@ -719,14 +1055,36 @@ package body Interfaces.C is To := Target'First; for From in Item'Range loop Target (To) := To_C (Item (From)); + + pragma Loop_Invariant (To in Target'Range); + pragma Loop_Invariant + (To - Target'First = size_t (From - Item'First)); + pragma Loop_Invariant + (for all J in Target'First .. To => Target (J)'Initialized); + pragma Loop_Invariant + (Target (Target'First .. To)'Initialized); + pragma Loop_Invariant + (for all J in Item'First .. From => + Target (Target'First + size_t (J - Item'First)) = + To_C (Item (J))); + To := To + 1; end loop; + pragma Assert + (for all J in Item'Range => + Target (Target'First + size_t (J - Item'First)) = + To_C (Item (J))); + pragma Assert + (if Item'Length /= 0 then + Target (Target'First .. + Target'First + (Item'Length - 1))'Initialized); + if Append_Nul then if To > Target'Last then raise Constraint_Error; else - Target (To) := char16_t'Val (0); + Target (To) := char16_nul; Count := Item'Length + 1; end if; @@ -752,14 +1110,26 @@ package body Interfaces.C is begin if Append_Nul then declare - R : char32_array (0 .. Item'Length); + R : char32_array (0 .. Item'Length) with Relaxed_Initialization; begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); + + pragma Loop_Invariant + (for all K in 0 .. size_t (J - Item'First) => + R (K)'Initialized); + pragma Loop_Invariant + (for all K in Item'First .. J => + R (size_t (K - Item'First)) = To_C (Item (K))); end loop; - R (R'Last) := char32_t'Val (0); + R (R'Last) := char32_nul; + + pragma Assert + (for all J in Item'Range => + R (size_t (J - Item'First)) = To_C (Item (J))); + return R; end; @@ -775,11 +1145,19 @@ package body Interfaces.C is else declare - R : char32_array (0 .. Item'Length - 1); + R : char32_array (0 .. Item'Length - 1) + with Relaxed_Initialization; begin - for J in size_t range 0 .. Item'Length - 1 loop - R (J) := To_C (Item (Integer (J) + Item'First)); + for J in Item'Range loop + R (size_t (J - Item'First)) := To_C (Item (J)); + + pragma Loop_Invariant + (for all K in 0 .. size_t (J - Item'First) => + R (K)'Initialized); + pragma Loop_Invariant + (for all K in Item'First .. J => + R (size_t (K - Item'First)) = To_C (Item (K))); end loop; return R; @@ -806,14 +1184,36 @@ package body Interfaces.C is To := Target'First; for From in Item'Range loop Target (To) := To_C (Item (From)); + + pragma Loop_Invariant (To in Target'Range); + pragma Loop_Invariant + (To - Target'First = size_t (From - Item'First)); + pragma Loop_Invariant + (for all J in Target'First .. To => Target (J)'Initialized); + pragma Loop_Invariant + (Target (Target'First .. To)'Initialized); + pragma Loop_Invariant + (for all J in Item'First .. From => + Target (Target'First + size_t (J - Item'First)) = + To_C (Item (J))); + To := To + 1; end loop; + pragma Assert + (for all J in Item'Range => + Target (Target'First + size_t (J - Item'First)) = + To_C (Item (J))); + pragma Assert + (if Item'Length /= 0 then + Target (Target'First .. + Target'First + (Item'Length - 1))'Initialized); + if Append_Nul then if To > Target'Last then raise Constraint_Error; else - Target (To) := char32_t'Val (0); + Target (To) := char32_nul; Count := Item'Length + 1; end if; diff --git a/gcc/ada/libgnat/i-c.ads b/gcc/ada/libgnat/i-c.ads index 428ea49..2023b75 100644 --- a/gcc/ada/libgnat/i-c.ads +++ b/gcc/ada/libgnat/i-c.ads @@ -13,10 +13,30 @@ -- -- ------------------------------------------------------------------------------ +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + with System.Parameters; -package Interfaces.C is - pragma Pure; +package Interfaces.C + with SPARK_Mode, Pure +is + -- Each of the types declared in Interfaces.C is C-compatible. + + -- The types int, short, long, unsigned, ptrdiff_t, size_t, double, + -- char, wchar_t, char16_t, and char32_t correspond respectively to the + -- C types having the same names. The types signed_char, unsigned_short, + -- unsigned_long, unsigned_char, C_bool, C_float, and long_double + -- correspond respectively to the C types signed char, unsigned + -- short, unsigned long, unsigned char, bool, float, and long double. -- Declaration's based on C's <limits.h> @@ -49,7 +69,11 @@ package Interfaces.C is type unsigned_char is mod (UCHAR_MAX + 1); for unsigned_char'Size use CHAR_BIT; - subtype plain_char is unsigned_char; -- ??? should be parameterized + -- Note: Ada RM states that the type of the subtype plain_char is either + -- signed_char or unsigned_char, depending on the C implementation. GNAT + -- instead choses unsigned_char always. + + subtype plain_char is unsigned_char; -- Note: the Integer qualifications used in the declaration of ptrdiff_t -- avoid ambiguities when compiling in the presence of s-auxdec.ads and @@ -80,33 +104,133 @@ package Interfaces.C is nul : constant char := char'First; - function To_C (Item : Character) return char; - function To_Ada (Item : char) return Character; + -- The functions To_C and To_Ada map between the Ada type Character and the + -- C type char. + + function To_C (Item : Character) return char + with + Post => To_C'Result = char'Val (Character'Pos (Item)); + + function To_Ada (Item : char) return Character + with + Post => To_Ada'Result = Character'Val (char'Pos (Item)); type char_array is array (size_t range <>) of aliased char; for char_array'Component_Size use CHAR_BIT; - function Is_Nul_Terminated (Item : char_array) return Boolean; + function Is_Nul_Terminated (Item : char_array) return Boolean + with + Post => Is_Nul_Terminated'Result = (for some C of Item => C = nul); + -- The result of Is_Nul_Terminated is True if Item contains nul, and is + -- False otherwise. + + function C_Length_Ghost (Item : char_array) return size_t + with + Ghost, + Pre => Is_Nul_Terminated (Item), + Post => C_Length_Ghost'Result <= Item'Last - Item'First + and then Item (Item'First + C_Length_Ghost'Result) = nul + and then (for all J in Item'First .. Item'First + C_Length_Ghost'Result + when J /= Item'First + C_Length_Ghost'Result => + Item (J) /= nul); + -- Ghost function to compute the length of a char_array up to the first nul + -- character. function To_C (Item : String; - Append_Nul : Boolean := True) return char_array; + Append_Nul : Boolean := True) return char_array + with + Pre => not (Append_Nul = False and then Item'Length = 0), + Post => To_C'Result'First = 0 + and then To_C'Result'Length = + (if Append_Nul then Item'Length + 1 else Item'Length) + and then (for all J in Item'Range => + To_C'Result (size_t (J - Item'First)) = To_C (Item (J))) + and then (if Append_Nul then To_C'Result (To_C'Result'Last) = nul); + -- The result of To_C is a char_array value of length Item'Length (if + -- Append_Nul is False) or Item'Length+1 (if Append_Nul is True). The lower + -- bound is 0. For each component Item(I), the corresponding component + -- in the result is To_C applied to Item(I). The value nul is appended if + -- Append_Nul is True. If Append_Nul is False and Item'Length is 0, then + -- To_C propagates Constraint_Error. function To_Ada (Item : char_array; - Trim_Nul : Boolean := True) return String; + Trim_Nul : Boolean := True) return String + with + Pre => (if Trim_Nul then + Is_Nul_Terminated (Item) + and then C_Length_Ghost (Item) <= size_t (Natural'Last) + else + Item'Last - Item'First < size_t (Natural'Last)), + Post => To_Ada'Result'First = 1 + and then To_Ada'Result'Length = + (if Trim_Nul then C_Length_Ghost (Item) else Item'Length) + and then (for all J in To_Ada'Result'Range => + To_Ada'Result (J) = + To_Ada (Item (size_t (J) - 1 + Item'First))); + -- The result of To_Ada is a String whose length is Item'Length (if + -- Trim_Nul is False) or the length of the slice of Item preceding the + -- first nul (if Trim_Nul is True). The lower bound of the result is 1. + -- If Trim_Nul is False, then for each component Item(I) the corresponding + -- component in the result is To_Ada applied to Item(I). If Trim_Nul + -- is True, then for each component Item(I) before the first nul the + -- corresponding component in the result is To_Ada applied to Item(I). The + -- function propagates Terminator_Error if Trim_Nul is True and Item does + -- not contain nul. procedure To_C (Item : String; Target : out char_array; Count : out size_t; - Append_Nul : Boolean := True); + Append_Nul : Boolean := True) + with + Relaxed_Initialization => Target, + Pre => Target'Length >= + (if Append_Nul then Item'Length + 1 else Item'Length), + Post => Count = (if Append_Nul then Item'Length + 1 else Item'Length) + and then + (if Count /= 0 then + Target (Target'First .. Target'First + (Count - 1))'Initialized) + and then + (for all J in Item'Range => + Target (Target'First + size_t (J - Item'First)) = To_C (Item (J))) + and then + (if Append_Nul then Target (Target'First + (Count - 1)) = nul); + -- For procedure To_C, each element of Item is converted (via the To_C + -- function) to a char, which is assigned to the corresponding element of + -- Target. If Append_Nul is True, nul is then assigned to the next element + -- of Target. In either case, Count is set to the number of Target elements + -- assigned. If Target is not long enough, Constraint_Error is propagated. procedure To_Ada (Item : char_array; Target : out String; Count : out Natural; - Trim_Nul : Boolean := True); + Trim_Nul : Boolean := True) + with + Relaxed_Initialization => Target, + Pre => (if Trim_Nul then + Is_Nul_Terminated (Item) + and then C_Length_Ghost (Item) <= size_t (Target'Length) + else + Item'Last - Item'First < size_t (Target'Length)), + Post => Count = + (if Trim_Nul then Natural (C_Length_Ghost (Item)) else Item'Length) + and then + (if Count /= 0 then + Target (Target'First .. Target'First + (Count - 1))'Initialized) + and then + (for all J in Target'First .. Target'First + (Count - 1) => + Target (J) = + To_Ada (Item (size_t (J - Target'First) + Item'First))); + -- For procedure To_Ada, each element of Item (if Trim_Nul is False) or + -- each element of Item preceding the first nul (if Trim_Nul is True) is + -- converted (via the To_Ada function) to a Character, which is assigned + -- to the corresponding element of Target. Count is set to the number of + -- Target elements assigned. If Target is not long enough, Constraint_Error + -- is propagated. If Trim_Nul is True and Item does not contain nul, then + -- Terminator_Error is propagated. ------------------------------------ -- Wide Character and Wide String -- @@ -117,32 +241,110 @@ package Interfaces.C is wide_nul : constant wchar_t := wchar_t'First; - function To_C (Item : Wide_Character) return wchar_t; - function To_Ada (Item : wchar_t) return Wide_Character; + -- To_C and To_Ada provide the mappings between the Ada and C wide + -- character types. + + function To_C (Item : Wide_Character) return wchar_t + with + Post => To_C'Result = wchar_t (Item); + + function To_Ada (Item : wchar_t) return Wide_Character + with + Post => To_Ada'Result = Wide_Character (Item); type wchar_array is array (size_t range <>) of aliased wchar_t; - function Is_Nul_Terminated (Item : wchar_array) return Boolean; + function Is_Nul_Terminated (Item : wchar_array) return Boolean + with + Post => Is_Nul_Terminated'Result = (for some C of Item => C = wide_nul); + -- The result of Is_Nul_Terminated is True if Item contains wide_nul, and + -- is False otherwise. + + -- The To_C and To_Ada subprograms that convert between Wide_String and + -- wchar_array have analogous effects to the To_C and To_Ada subprograms + -- that convert between String and char_array, except that wide_nul is + -- used instead of nul. + + function C_Length_Ghost (Item : wchar_array) return size_t + with + Ghost, + Pre => Is_Nul_Terminated (Item), + Post => C_Length_Ghost'Result <= Item'Last - Item'First + and then Item (Item'First + C_Length_Ghost'Result) = wide_nul + and then (for all J in Item'First .. Item'First + C_Length_Ghost'Result + when J /= Item'First + C_Length_Ghost'Result => + Item (J) /= wide_nul); + -- Ghost function to compute the length of a wchar_array up to the first + -- wide_nul character. function To_C (Item : Wide_String; - Append_Nul : Boolean := True) return wchar_array; + Append_Nul : Boolean := True) return wchar_array + with + Pre => not (Append_Nul = False and then Item'Length = 0), + Post => To_C'Result'First = 0 + and then To_C'Result'Length = + (if Append_Nul then Item'Length + 1 else Item'Length) + and then (for all J in Item'Range => + To_C'Result (size_t (J - Item'First)) = To_C (Item (J))) + and then (if Append_Nul then To_C'Result (To_C'Result'Last) = wide_nul); function To_Ada (Item : wchar_array; - Trim_Nul : Boolean := True) return Wide_String; + Trim_Nul : Boolean := True) return Wide_String + with + Pre => (if Trim_Nul then + Is_Nul_Terminated (Item) + and then C_Length_Ghost (Item) <= size_t (Natural'Last) + else + Item'Last - Item'First < size_t (Natural'Last)), + Post => To_Ada'Result'First = 1 + and then To_Ada'Result'Length = + (if Trim_Nul then C_Length_Ghost (Item) else Item'Length) + and then (for all J in To_Ada'Result'Range => + To_Ada'Result (J) = + To_Ada (Item (size_t (J) - 1 + Item'First))); procedure To_C (Item : Wide_String; Target : out wchar_array; Count : out size_t; - Append_Nul : Boolean := True); + Append_Nul : Boolean := True) + with + Relaxed_Initialization => Target, + Pre => Target'Length >= + (if Append_Nul then Item'Length + 1 else Item'Length), + Post => Count = (if Append_Nul then Item'Length + 1 else Item'Length) + and then + (if Count /= 0 then + Target (Target'First .. Target'First + (Count - 1))'Initialized) + and then + (for all J in Item'Range => + Target (Target'First + size_t (J - Item'First)) = To_C (Item (J))) + and then + (if Append_Nul then Target (Target'First + (Count - 1)) = wide_nul); procedure To_Ada (Item : wchar_array; Target : out Wide_String; Count : out Natural; - Trim_Nul : Boolean := True); + Trim_Nul : Boolean := True) + with + Relaxed_Initialization => Target, + Pre => (if Trim_Nul then + Is_Nul_Terminated (Item) + and then C_Length_Ghost (Item) <= size_t (Target'Length) + else + Item'Last - Item'First < size_t (Target'Length)), + Post => Count = + (if Trim_Nul then Natural (C_Length_Ghost (Item)) else Item'Length) + and then + (if Count /= 0 then + Target (Target'First .. Target'First + (Count - 1))'Initialized) + and then + (for all J in Target'First .. Target'First + (Count - 1) => + Target (J) = + To_Ada (Item (size_t (J - Target'First) + Item'First))); Terminator_Error : exception; @@ -156,40 +358,118 @@ package Interfaces.C is char16_nul : constant char16_t := char16_t'Val (0); pragma Ada_05 (char16_nul); - function To_C (Item : Wide_Character) return char16_t; + -- To_C and To_Ada provide mappings between the Ada and C 16-bit character + -- types. + + function To_C (Item : Wide_Character) return char16_t + with + Post => To_C'Result = char16_t (Item); pragma Ada_05 (To_C); - function To_Ada (Item : char16_t) return Wide_Character; + function To_Ada (Item : char16_t) return Wide_Character + with + Post => To_Ada'Result = Wide_Character (Item); pragma Ada_05 (To_Ada); type char16_array is array (size_t range <>) of aliased char16_t; pragma Ada_05 (char16_array); - function Is_Nul_Terminated (Item : char16_array) return Boolean; + function Is_Nul_Terminated (Item : char16_array) return Boolean + with + Post => Is_Nul_Terminated'Result = (for some C of Item => C = char16_nul); pragma Ada_05 (Is_Nul_Terminated); + -- The result of Is_Nul_Terminated is True if Item contains char16_nul, and + -- is False otherwise. + + -- The To_C and To_Ada subprograms that convert between Wide_String and + -- char16_array have analogous effects to the To_C and To_Ada subprograms + -- that convert between String and char_array, except that char16_nul is + -- used instead of nul. + + function C_Length_Ghost (Item : char16_array) return size_t + with + Ghost, + Pre => Is_Nul_Terminated (Item), + Post => C_Length_Ghost'Result <= Item'Last - Item'First + and then Item (Item'First + C_Length_Ghost'Result) = char16_nul + and then (for all J in Item'First .. Item'First + C_Length_Ghost'Result + when J /= Item'First + C_Length_Ghost'Result => + Item (J) /= char16_nul); + -- Ghost function to compute the length of a char16_array up to the first + -- char16_nul character. function To_C (Item : Wide_String; - Append_Nul : Boolean := True) return char16_array; + Append_Nul : Boolean := True) return char16_array + with + Pre => not (Append_Nul = False and then Item'Length = 0), + Post => To_C'Result'First = 0 + and then To_C'Result'Length = + (if Append_Nul then Item'Length + 1 else Item'Length) + and then (for all J in Item'Range => + To_C'Result (size_t (J - Item'First)) = To_C (Item (J))) + and then + (if Append_Nul then To_C'Result (To_C'Result'Last) = char16_nul); pragma Ada_05 (To_C); function To_Ada (Item : char16_array; - Trim_Nul : Boolean := True) return Wide_String; + Trim_Nul : Boolean := True) return Wide_String + with + Pre => (if Trim_Nul then + Is_Nul_Terminated (Item) + and then C_Length_Ghost (Item) <= size_t (Natural'Last) + else + Item'Last - Item'First < size_t (Natural'Last)), + Post => To_Ada'Result'First = 1 + and then To_Ada'Result'Length = + (if Trim_Nul then C_Length_Ghost (Item) else Item'Length) + and then (for all J in To_Ada'Result'Range => + To_Ada'Result (J) = + To_Ada (Item (size_t (J) - 1 + Item'First))); pragma Ada_05 (To_Ada); procedure To_C (Item : Wide_String; Target : out char16_array; Count : out size_t; - Append_Nul : Boolean := True); + Append_Nul : Boolean := True) + with + Relaxed_Initialization => Target, + Pre => Target'Length >= + (if Append_Nul then Item'Length + 1 else Item'Length), + Post => Count = (if Append_Nul then Item'Length + 1 else Item'Length) + and then + (if Count /= 0 then + Target (Target'First .. Target'First + (Count - 1))'Initialized) + and then + (for all J in Item'Range => + Target (Target'First + size_t (J - Item'First)) = To_C (Item (J))) + and then + (if Append_Nul then Target (Target'First + (Count - 1)) = char16_nul); pragma Ada_05 (To_C); procedure To_Ada (Item : char16_array; Target : out Wide_String; Count : out Natural; - Trim_Nul : Boolean := True); + Trim_Nul : Boolean := True) + with + Relaxed_Initialization => Target, + Pre => (if Trim_Nul then + Is_Nul_Terminated (Item) + and then C_Length_Ghost (Item) <= size_t (Target'Length) + else + Item'Last - Item'First < size_t (Target'Length)), + Post => Count = + (if Trim_Nul then Natural (C_Length_Ghost (Item)) else Item'Length) + and then + (if Count /= 0 then + Target (Target'First .. Target'First + (Count - 1))'Initialized) + and then + (for all J in Target'First .. Target'First + (Count - 1) => + Target (J) = + To_Ada (Item (size_t (J - Target'First) + Item'First))); pragma Ada_05 (To_Ada); type char32_t is new Wide_Wide_Character; @@ -198,40 +478,118 @@ package Interfaces.C is char32_nul : constant char32_t := char32_t'Val (0); pragma Ada_05 (char32_nul); - function To_C (Item : Wide_Wide_Character) return char32_t; + -- To_C and To_Ada provide mappings between the Ada and C 32-bit character + -- types. + + function To_C (Item : Wide_Wide_Character) return char32_t + with + Post => To_C'Result = char32_t (Item); pragma Ada_05 (To_C); - function To_Ada (Item : char32_t) return Wide_Wide_Character; + function To_Ada (Item : char32_t) return Wide_Wide_Character + with + Post => To_Ada'Result = Wide_Wide_Character (Item); pragma Ada_05 (To_Ada); type char32_array is array (size_t range <>) of aliased char32_t; pragma Ada_05 (char32_array); - function Is_Nul_Terminated (Item : char32_array) return Boolean; + function Is_Nul_Terminated (Item : char32_array) return Boolean + with + Post => Is_Nul_Terminated'Result = (for some C of Item => C = char32_nul); pragma Ada_05 (Is_Nul_Terminated); + -- The result of Is_Nul_Terminated is True if Item contains char32_nul, and + -- is False otherwise. + + function C_Length_Ghost (Item : char32_array) return size_t + with + Ghost, + Pre => Is_Nul_Terminated (Item), + Post => C_Length_Ghost'Result <= Item'Last - Item'First + and then Item (Item'First + C_Length_Ghost'Result) = char32_nul + and then (for all J in Item'First .. Item'First + C_Length_Ghost'Result + when J /= Item'First + C_Length_Ghost'Result => + Item (J) /= char32_nul); + -- Ghost function to compute the length of a char32_array up to the first + -- char32_nul character. + + -- The To_C and To_Ada subprograms that convert between Wide_Wide_String + -- and char32_array have analogous effects to the To_C and To_Ada + -- subprograms that convert between String and char_array, except + -- that char32_nul is used instead of nul. function To_C (Item : Wide_Wide_String; - Append_Nul : Boolean := True) return char32_array; + Append_Nul : Boolean := True) return char32_array + with + Pre => not (Append_Nul = False and then Item'Length = 0), + Post => To_C'Result'First = 0 + and then To_C'Result'Length = + (if Append_Nul then Item'Length + 1 else Item'Length) + and then (for all J in Item'Range => + To_C'Result (size_t (J - Item'First)) = To_C (Item (J))) + and then + (if Append_Nul then To_C'Result (To_C'Result'Last) = char32_nul); pragma Ada_05 (To_C); function To_Ada (Item : char32_array; - Trim_Nul : Boolean := True) return Wide_Wide_String; + Trim_Nul : Boolean := True) return Wide_Wide_String + with + Pre => (if Trim_Nul then + Is_Nul_Terminated (Item) + and then C_Length_Ghost (Item) <= size_t (Natural'Last) + else + Item'Last - Item'First < size_t (Natural'Last)), + Post => To_Ada'Result'First = 1 + and then To_Ada'Result'Length = + (if Trim_Nul then C_Length_Ghost (Item) else Item'Length) + and then (for all J in To_Ada'Result'Range => + To_Ada'Result (J) = + To_Ada (Item (size_t (J) - 1 + Item'First))); pragma Ada_05 (To_Ada); procedure To_C (Item : Wide_Wide_String; Target : out char32_array; Count : out size_t; - Append_Nul : Boolean := True); + Append_Nul : Boolean := True) + with + Relaxed_Initialization => Target, + Pre => Target'Length >= + (if Append_Nul then Item'Length + 1 else Item'Length), + Post => Count = (if Append_Nul then Item'Length + 1 else Item'Length) + and then + (if Count /= 0 then + Target (Target'First .. Target'First + (Count - 1))'Initialized) + and then + (for all J in Item'Range => + Target (Target'First + size_t (J - Item'First)) = To_C (Item (J))) + and then + (if Append_Nul then Target (Target'First + (Count - 1)) = char32_nul); pragma Ada_05 (To_C); procedure To_Ada (Item : char32_array; Target : out Wide_Wide_String; Count : out Natural; - Trim_Nul : Boolean := True); + Trim_Nul : Boolean := True) + with + Relaxed_Initialization => Target, + Pre => (if Trim_Nul then + Is_Nul_Terminated (Item) + and then C_Length_Ghost (Item) <= size_t (Target'Length) + else + Item'Last - Item'First < size_t (Target'Length)), + Post => Count = + (if Trim_Nul then Natural (C_Length_Ghost (Item)) else Item'Length) + and then + (if Count /= 0 then + Target (Target'First .. Target'First + (Count - 1))'Initialized) + and then + (for all J in Target'First .. Target'First + (Count - 1) => + Target (J) = + To_Ada (Item (size_t (J - Target'First) + Item'First))); pragma Ada_05 (To_Ada); end Interfaces.C; diff --git a/gcc/ada/libgnat/i-cexten.ads b/gcc/ada/libgnat/i-cexten.ads index 70d2621..b2b4d08 100644 --- a/gcc/ada/libgnat/i-cexten.ads +++ b/gcc/ada/libgnat/i-cexten.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/i-cexten__128.ads b/gcc/ada/libgnat/i-cexten__128.ads index c07c5ab..d70df6e 100644 --- a/gcc/ada/libgnat/i-cexten__128.ads +++ b/gcc/ada/libgnat/i-cexten__128.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/i-cobol.adb b/gcc/ada/libgnat/i-cobol.adb index b4b62ee..b42efd8 100644 --- a/gcc/ada/libgnat/i-cobol.adb +++ b/gcc/ada/libgnat/i-cobol.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -34,8 +34,7 @@ -- particular COBOL format is completely contained in the private part of -- the spec. -with Interfaces; use Interfaces; -with System; use System; +with System; use System; with Ada.Unchecked_Conversion; package body Interfaces.COBOL is diff --git a/gcc/ada/libgnat/i-cobol.ads b/gcc/ada/libgnat/i-cobol.ads index cf96e25..49f122e 100644 --- a/gcc/ada/libgnat/i-cobol.ads +++ b/gcc/ada/libgnat/i-cobol.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (ASCII Version) -- -- -- --- Copyright (C) 1993-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -61,7 +61,7 @@ package Interfaces.COBOL is type COBOL_Character is new Character; - Ada_To_COBOL : array (Standard.Character) of COBOL_Character := ( + Ada_To_COBOL : array (Standard.Character) of COBOL_Character := [ COBOL_Character'Val (000), COBOL_Character'Val (001), COBOL_Character'Val (002), COBOL_Character'Val (003), COBOL_Character'Val (004), COBOL_Character'Val (005), @@ -189,9 +189,9 @@ package Interfaces.COBOL is COBOL_Character'Val (248), COBOL_Character'Val (249), COBOL_Character'Val (250), COBOL_Character'Val (251), COBOL_Character'Val (252), COBOL_Character'Val (253), - COBOL_Character'Val (254), COBOL_Character'Val (255)); + COBOL_Character'Val (254), COBOL_Character'Val (255)]; - COBOL_To_Ada : array (COBOL_Character) of Standard.Character := ( + COBOL_To_Ada : array (COBOL_Character) of Standard.Character := [ Standard.Character'Val (000), Standard.Character'Val (001), Standard.Character'Val (002), Standard.Character'Val (003), Standard.Character'Val (004), Standard.Character'Val (005), @@ -319,7 +319,7 @@ package Interfaces.COBOL is Standard.Character'Val (248), Standard.Character'Val (249), Standard.Character'Val (250), Standard.Character'Val (251), Standard.Character'Val (252), Standard.Character'Val (253), - Standard.Character'Val (254), Standard.Character'Val (255)); + Standard.Character'Val (254), Standard.Character'Val (255)]; type Alphanumeric is array (Positive range <>) of COBOL_Character; -- pragma Pack (Alphanumeric); diff --git a/gcc/ada/libgnat/i-cpoint.adb b/gcc/ada/libgnat/i-cpoint.adb index 4c39274..3bab800 100644 --- a/gcc/ada/libgnat/i-cpoint.adb +++ b/gcc/ada/libgnat/i-cpoint.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/i-cpoint.ads b/gcc/ada/libgnat/i-cpoint.ads index 08b89ba..59c3dd7 100644 --- a/gcc/ada/libgnat/i-cpoint.ads +++ b/gcc/ada/libgnat/i-cpoint.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1993-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/i-cstrea.adb b/gcc/ada/libgnat/i-cstrea.adb index 40113f2..e0b1b62 100644 --- a/gcc/ada/libgnat/i-cstrea.adb +++ b/gcc/ada/libgnat/i-cstrea.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1996-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/i-cstrea.ads b/gcc/ada/libgnat/i-cstrea.ads index 48f2125..9f344c8 100644 --- a/gcc/ada/libgnat/i-cstrea.ads +++ b/gcc/ada/libgnat/i-cstrea.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/i-cstrin.adb b/gcc/ada/libgnat/i-cstrin.adb index eba95d4..e2f0f21 100644 --- a/gcc/ada/libgnat/i-cstrin.adb +++ b/gcc/ada/libgnat/i-cstrin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/i-cstrin.ads b/gcc/ada/libgnat/i-cstrin.ads index 2b27f9f..5c1b259 100644 --- a/gcc/ada/libgnat/i-cstrin.ads +++ b/gcc/ada/libgnat/i-cstrin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1993-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/i-fortra.adb b/gcc/ada/libgnat/i-fortra.adb index eba61c2..e7970a9 100644 --- a/gcc/ada/libgnat/i-fortra.adb +++ b/gcc/ada/libgnat/i-fortra.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/i-pacdec.adb b/gcc/ada/libgnat/i-pacdec.adb index 8b8acc9..b5b3bf6 100644 --- a/gcc/ada/libgnat/i-pacdec.adb +++ b/gcc/ada/libgnat/i-pacdec.adb @@ -7,7 +7,7 @@ -- B o d y -- -- (Version for IBM Mainframe Packed Decimal Format) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -48,7 +48,7 @@ package body Interfaces.Packed_Decimal is -- using table look up in this direction because divides are expensive. Packed_Byte : constant array (00 .. 99) of Unsigned_8 := - (16#00#, 16#01#, 16#02#, 16#03#, 16#04#, + [16#00#, 16#01#, 16#02#, 16#03#, 16#04#, 16#05#, 16#06#, 16#07#, 16#08#, 16#09#, 16#10#, 16#11#, 16#12#, 16#13#, 16#14#, 16#15#, 16#16#, 16#17#, 16#18#, 16#19#, @@ -67,7 +67,7 @@ package body Interfaces.Packed_Decimal is 16#80#, 16#81#, 16#82#, 16#83#, 16#84#, 16#85#, 16#86#, 16#87#, 16#88#, 16#89#, 16#90#, 16#91#, 16#92#, 16#93#, 16#94#, - 16#95#, 16#96#, 16#97#, 16#98#, 16#99#); + 16#95#, 16#96#, 16#97#, 16#98#, 16#99#]; --------------------- -- Int32_To_Packed -- diff --git a/gcc/ada/libgnat/i-pacdec.ads b/gcc/ada/libgnat/i-pacdec.ads index d68767f..d6f57a1 100644 --- a/gcc/ada/libgnat/i-pacdec.ads +++ b/gcc/ada/libgnat/i-pacdec.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Version for IBM Mainframe Packed Decimal Format) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -91,7 +91,7 @@ package Interfaces.Packed_Decimal is -- Range of possible byte lengths Packed_Size : constant array (1 .. 18) of Byte_Length := - (01 => 01, -- Length in bytes for digits 1 + [01 => 01, -- Length in bytes for digits 1 02 => 02, -- Length in bytes for digits 2 03 => 02, -- Length in bytes for digits 2 04 => 03, -- Length in bytes for digits 2 @@ -108,7 +108,7 @@ package Interfaces.Packed_Decimal is 15 => 08, -- Length in bytes for digits 2 16 => 09, -- Length in bytes for digits 2 17 => 09, -- Length in bytes for digits 2 - 18 => 10); -- Length in bytes for digits 2 + 18 => 10]; -- Length in bytes for digits 2 ------------------------- -- Conversion Routines -- diff --git a/gcc/ada/libgnat/i-vxwoio.adb b/gcc/ada/libgnat/i-vxwoio.adb index f1e449f..aa43f3a 100644 --- a/gcc/ada/libgnat/i-vxwoio.adb +++ b/gcc/ada/libgnat/i-vxwoio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/i-vxwoio.ads b/gcc/ada/libgnat/i-vxwoio.ads index e1743ad..745210e 100644 --- a/gcc/ada/libgnat/i-vxwoio.ads +++ b/gcc/ada/libgnat/i-vxwoio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/i-vxwork.ads b/gcc/ada/libgnat/i-vxwork.ads index 0ba1e6e..e544180 100644 --- a/gcc/ada/libgnat/i-vxwork.ads +++ b/gcc/ada/libgnat/i-vxwork.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/i-vxwork__x86.ads b/gcc/ada/libgnat/i-vxwork__x86.ads index 659167f..474da0f 100644 --- a/gcc/ada/libgnat/i-vxwork__x86.ads +++ b/gcc/ada/libgnat/i-vxwork__x86.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/interfac.ads b/gcc/ada/libgnat/interfac.ads index 186cb84..b12ced8 100644 --- a/gcc/ada/libgnat/interfac.ads +++ b/gcc/ada/libgnat/interfac.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -35,8 +35,6 @@ -- This is the compiler version of this unit -pragma Compiler_Unit_Warning; - package Interfaces is pragma No_Elaboration_Code_All; pragma Pure; diff --git a/gcc/ada/libgnat/interfac__2020.ads b/gcc/ada/libgnat/interfac__2020.ads index a353604..579e8b4 100644 --- a/gcc/ada/libgnat/interfac__2020.ads +++ b/gcc/ada/libgnat/interfac__2020.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/memtrack.adb b/gcc/ada/libgnat/memtrack.adb index b34ac04..80e9cbb 100644 --- a/gcc/ada/libgnat/memtrack.adb +++ b/gcc/ada/libgnat/memtrack.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-addima.adb b/gcc/ada/libgnat/s-addima.adb index af8d67f..61566c9 100644 --- a/gcc/ada/libgnat/s-addima.adb +++ b/gcc/ada/libgnat/s-addima.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-addima.ads b/gcc/ada/libgnat/s-addima.ads index 4eae027..6c7a376 100644 --- a/gcc/ada/libgnat/s-addima.ads +++ b/gcc/ada/libgnat/s-addima.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-addope.adb b/gcc/ada/libgnat/s-addope.adb index 0e02178..ce9bb5c 100644 --- a/gcc/ada/libgnat/s-addope.adb +++ b/gcc/ada/libgnat/s-addope.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with Ada.Unchecked_Conversion; package body System.Address_Operations is diff --git a/gcc/ada/libgnat/s-addope.ads b/gcc/ada/libgnat/s-addope.ads index d1c3cb5..f904fb6 100644 --- a/gcc/ada/libgnat/s-addope.ads +++ b/gcc/ada/libgnat/s-addope.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -40,8 +40,6 @@ -- inappropriate use by applications programs). In addition, the logical -- operations may not be available if type Address is a signed integer. -pragma Compiler_Unit_Warning; - package System.Address_Operations is pragma Pure; diff --git a/gcc/ada/libgnat/s-aoinar.adb b/gcc/ada/libgnat/s-aoinar.adb index 41d0cda..5432572 100644 --- a/gcc/ada/libgnat/s-aoinar.adb +++ b/gcc/ada/libgnat/s-aoinar.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-aoinar.ads b/gcc/ada/libgnat/s-aoinar.ads index 8d80bb1..8ed9bfe 100644 --- a/gcc/ada/libgnat/s-aoinar.ads +++ b/gcc/ada/libgnat/s-aoinar.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/s-aomoar.adb b/gcc/ada/libgnat/s-aomoar.adb index 617a5b3..f96d252 100644 --- a/gcc/ada/libgnat/s-aomoar.adb +++ b/gcc/ada/libgnat/s-aomoar.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-aomoar.ads b/gcc/ada/libgnat/s-aomoar.ads index 7e19d7f..a70af35 100644 --- a/gcc/ada/libgnat/s-aomoar.ads +++ b/gcc/ada/libgnat/s-aomoar.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/s-aotase.adb b/gcc/ada/libgnat/s-aotase.adb index 94b28df..36911e9f 100644 --- a/gcc/ada/libgnat/s-aotase.adb +++ b/gcc/ada/libgnat/s-aotase.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-aotase.ads b/gcc/ada/libgnat/s-aotase.ads index 77f343e..2b0b911 100644 --- a/gcc/ada/libgnat/s-aotase.ads +++ b/gcc/ada/libgnat/s-aotase.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/s-aridou.adb b/gcc/ada/libgnat/s-aridou.adb index b47c319..0fefb6b 100644 --- a/gcc/ada/libgnat/s-aridou.adb +++ b/gcc/ada/libgnat/s-aridou.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,7 +31,20 @@ with Ada.Unchecked_Conversion; -package body System.Arith_Double is +package body System.Arith_Double + with SPARK_Mode +is + -- Contracts, ghost code, loop invariants and assertions in this unit are + -- meant for analysis only, not for run-time checking, as it would be too + -- costly otherwise. This is enforced by setting the assertion policy to + -- Ignore. + + pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); pragma Suppress (Overflow_Check); pragma Suppress (Range_Check); @@ -42,6 +55,39 @@ package body System.Arith_Double is Double_Size : constant Natural := Double_Int'Size; Single_Size : constant Natural := Double_Int'Size / 2; + -- Log of Single_Size in base 2, so that Single_Size = 2 ** Log_Single_Size + Log_Single_Size : constant Natural := + (case Single_Size is + when 32 => 5, + when 64 => 6, + when 128 => 7, + when others => raise Program_Error) + with Ghost; + + -- Power-of-two constants + + pragma Warnings + (Off, "non-preelaborable call not allowed in preelaborated unit", + Reason => "Ghost code is not compiled"); + pragma Warnings + (Off, "non-static constant in preelaborated unit", + Reason => "Ghost code is not compiled"); + Big_0 : constant Big_Integer := + Big (Double_Uns'(0)) + with Ghost; + Big_2xxSingle : constant Big_Integer := + Big (Double_Int'(2 ** Single_Size)) + with Ghost; + Big_2xxDouble_Minus_1 : constant Big_Integer := + Big (Double_Uns'(2 ** (Double_Size - 1))) + with Ghost; + Big_2xxDouble : constant Big_Integer := + Big (Double_Uns'(2 ** Double_Size - 1)) + 1 + with Ghost; + pragma Warnings + (On, "non-preelaborable call not allowed in preelaborated unit"); + pragma Warnings (On, "non-static constant in preelaborated unit"); + ----------------------- -- Local Subprograms -- ----------------------- @@ -57,7 +103,9 @@ package body System.Arith_Double is -- Length doubling multiplication function "/" (A : Double_Uns; B : Single_Uns) return Double_Uns is - (A / Double_Uns (B)); + (A / Double_Uns (B)) + with + Pre => B /= 0; -- Length doubling division function "&" (Hi, Lo : Single_Uns) return Double_Uns is @@ -66,16 +114,35 @@ package body System.Arith_Double is function "abs" (X : Double_Int) return Double_Uns is (if X = Double_Int'First - then 2 ** (Double_Size - 1) + then Double_Uns'(2 ** (Double_Size - 1)) else Double_Uns (Double_Int'(abs X))); -- Convert absolute value of X to unsigned. Note that we can't just use -- the expression of the Else since it overflows for X = Double_Int'First. function "rem" (A : Double_Uns; B : Single_Uns) return Double_Uns is - (A rem Double_Uns (B)); + (A rem Double_Uns (B)) + with + Pre => B /= 0; -- Length doubling remainder - function Le3 (X1, X2, X3, Y1, Y2, Y3 : Single_Uns) return Boolean; + function Big_2xx (N : Natural) return Big_Integer is + (Big (Double_Uns'(2 ** N))) + with + Ghost, + Pre => N < Double_Size, + Post => Big_2xx'Result > 0; + -- 2**N as a big integer + + function Big3 (X1, X2, X3 : Single_Uns) return Big_Integer is + (Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (X1)) + + Big_2xxSingle * Big (Double_Uns (X2)) + + Big (Double_Uns (X3))) + with Ghost; + -- X1&X2&X3 as a big integer + + function Le3 (X1, X2, X3, Y1, Y2, Y3 : Single_Uns) return Boolean + with + Post => Le3'Result = (Big3 (X1, X2, X3) <= Big3 (Y1, Y2, Y3)); -- Determines if (3 * Single_Size)-bit value X1&X2&X3 <= Y1&Y2&Y3 function Lo (A : Double_Uns) return Single_Uns is @@ -86,16 +153,27 @@ package body System.Arith_Double is (Single_Uns (Shift_Right (A, Single_Size))); -- High order half of double value - procedure Sub3 (X1, X2, X3 : in out Single_Uns; Y1, Y2, Y3 : Single_Uns); + procedure Sub3 (X1, X2, X3 : in out Single_Uns; Y1, Y2, Y3 : Single_Uns) + with + Pre => Big3 (X1, X2, X3) >= Big3 (Y1, Y2, Y3), + Post => Big3 (X1, X2, X3) = Big3 (X1, X2, X3)'Old - Big3 (Y1, Y2, Y3); -- Computes X1&X2&X3 := X1&X2&X3 - Y1&Y1&Y3 mod 2 ** (3 * Single_Size) - function To_Neg_Int (A : Double_Uns) return Double_Int; + function To_Neg_Int (A : Double_Uns) return Double_Int + with + Annotate => (GNATprove, Terminating), + Pre => In_Double_Int_Range (-Big (A)), + Post => Big (To_Neg_Int'Result) = -Big (A); -- Convert to negative integer equivalent. If the input is in the range -- 0 .. 2 ** (Double_Size - 1), then the corresponding nonpositive signed -- integer (obtained by negating the given value) is returned, otherwise -- constraint error is raised. - function To_Pos_Int (A : Double_Uns) return Double_Int; + function To_Pos_Int (A : Double_Uns) return Double_Int + with + Annotate => (GNATprove, Terminating), + Pre => In_Double_Int_Range (Big (A)), + Post => Big (To_Pos_Int'Result) = Big (A); -- Convert to positive integer equivalent. If the input is in the range -- 0 .. 2 ** (Double_Size - 1) - 1, then the corresponding non-negative -- signed integer is returned, otherwise constraint error is raised. @@ -104,6 +182,419 @@ package body System.Arith_Double is pragma No_Return (Raise_Error); -- Raise constraint error with appropriate message + ------------------ + -- Local Lemmas -- + ------------------ + + procedure Inline_Le3 (X1, X2, X3, Y1, Y2, Y3 : Single_Uns) + with + Ghost, + Pre => Le3 (X1, X2, X3, Y1, Y2, Y3), + Post => Big3 (X1, X2, X3) <= Big3 (Y1, Y2, Y3); + + procedure Lemma_Abs_Commutation (X : Double_Int) + with + Ghost, + Post => abs (Big (X)) = Big (Double_Uns'(abs X)); + + procedure Lemma_Abs_Div_Commutation (X, Y : Big_Integer) + with + Ghost, + Pre => Y /= 0, + Post => abs (X / Y) = abs X / abs Y; + + procedure Lemma_Abs_Mult_Commutation (X, Y : Big_Integer) + with + Ghost, + Post => abs (X * Y) = abs X * abs Y; + + procedure Lemma_Mult_Non_Negative (X, Y : Big_Integer) + with + Ghost, + Pre => (X >= Big_0 and then Y >= Big_0) + or else (X <= Big_0 and then Y <= Big_0), + Post => X * Y >= Big_0; + + procedure Lemma_Mult_Non_Positive (X, Y : Big_Integer) + with + Ghost, + Pre => (X <= Big_0 and then Y >= Big_0) + or else (X >= Big_0 and then Y <= Big_0), + Post => X * Y <= Big_0; + + procedure Lemma_Abs_Rem_Commutation (X, Y : Big_Integer) + with + Ghost, + Pre => Y /= 0, + Post => abs (X rem Y) = (abs X) rem (abs Y); + + procedure Lemma_Add_Commutation (X : Double_Uns; Y : Single_Uns) + with + Ghost, + Pre => X <= 2 ** Double_Size - 2 ** Single_Size, + Post => Big (X) + Big (Double_Uns (Y)) = Big (X + Double_Uns (Y)); + + procedure Lemma_Add_One (X : Double_Uns) + with + Ghost, + Pre => X /= Double_Uns'Last, + Post => Big (X + Double_Uns'(1)) = Big (X) + 1; + + procedure Lemma_Bounded_Powers_Of_2_Increasing (M, N : Natural) + with + Ghost, + Pre => M < N and then N < Double_Size, + Post => Double_Uns'(2)**M < Double_Uns'(2)**N; + + procedure Lemma_Deep_Mult_Commutation + (Factor : Big_Integer; + X, Y : Single_Uns) + with + Ghost, + Post => + Factor * Big (Double_Uns (X)) * Big (Double_Uns (Y)) = + Factor * Big (Double_Uns (X) * Double_Uns (Y)); + + procedure Lemma_Div_Commutation (X, Y : Double_Uns) + with + Ghost, + Pre => Y /= 0, + Post => Big (X) / Big (Y) = Big (X / Y); + + procedure Lemma_Div_Definition + (A : Double_Uns; + B : Single_Uns; + Q : Double_Uns; + R : Double_Uns) + with + Ghost, + Pre => B /= 0 and then Q = A / B and then R = A rem B, + Post => Big (A) = Big (Double_Uns (B)) * Big (Q) + Big (R); + + procedure Lemma_Div_Ge (X, Y, Z : Big_Integer) + with + Ghost, + Pre => Z > 0 and then X >= Y * Z, + Post => X / Z >= Y; + + procedure Lemma_Div_Lt (X, Y, Z : Big_Natural) + with + Ghost, + Pre => Z > 0 and then X < Y * Z, + Post => X / Z < Y; + + procedure Lemma_Div_Eq (A, B, S, R : Big_Integer) + with + Ghost, + Pre => A * S = B * S + R and then S /= 0, + Post => A = B + R / S; + + procedure Lemma_Double_Shift (X : Double_Uns; S, S1 : Double_Uns) + with + Ghost, + Pre => S <= Double_Uns (Double_Size) + and then S1 <= Double_Uns (Double_Size), + Post => Shift_Left (Shift_Left (X, Natural (S)), Natural (S1)) = + Shift_Left (X, Natural (S + S1)); + + procedure Lemma_Double_Shift (X : Single_Uns; S, S1 : Natural) + with + Ghost, + Pre => S <= Single_Size - S1, + Post => Shift_Left (Shift_Left (X, S), S1) = Shift_Left (X, S + S1); + + procedure Lemma_Double_Shift (X : Double_Uns; S, S1 : Natural) + with + Ghost, + Pre => S <= Double_Size - S1, + Post => Shift_Left (Shift_Left (X, S), S1) = Shift_Left (X, S + S1); + + procedure Lemma_Double_Shift_Right (X : Double_Uns; S, S1 : Double_Uns) + with + Ghost, + Pre => S <= Double_Uns (Double_Size) + and then S1 <= Double_Uns (Double_Size), + Post => Shift_Right (Shift_Right (X, Natural (S)), Natural (S1)) = + Shift_Right (X, Natural (S + S1)); + + procedure Lemma_Double_Shift_Right (X : Double_Uns; S, S1 : Natural) + with + Ghost, + Pre => S <= Double_Size - S1, + Post => Shift_Right (Shift_Right (X, S), S1) = Shift_Right (X, S + S1); + + procedure Lemma_Ge_Commutation (A, B : Double_Uns) + with + Ghost, + Pre => A >= B, + Post => Big (A) >= Big (B); + + procedure Lemma_Ge_Mult (A, B, C, D : Big_Integer) + with + Ghost, + Pre => A >= B and then B * C >= D and then C > 0, + Post => A * C >= D; + + procedure Lemma_Gt_Commutation (A, B : Double_Uns) + with + Ghost, + Pre => A > B, + Post => Big (A) > Big (B); + + procedure Lemma_Gt_Mult (A, B, C, D : Big_Integer) + with + Ghost, + Pre => A >= B and then B * C > D and then C > 0, + Post => A * C > D; + + procedure Lemma_Hi_Lo (Xu : Double_Uns; Xhi, Xlo : Single_Uns) + with + Ghost, + Pre => Xhi = Hi (Xu) and Xlo = Lo (Xu), + Post => Big (Xu) = + Big_2xxSingle * Big (Double_Uns (Xhi)) + Big (Double_Uns (Xlo)); + + procedure Lemma_Hi_Lo_3 (Xu : Double_Uns; Xhi, Xlo : Single_Uns) + with + Ghost, + Pre => Xhi = Hi (Xu) and then Xlo = Lo (Xu), + Post => Big (Xu) = Big3 (0, Xhi, Xlo); + + procedure Lemma_Lo_Is_Ident (X : Double_Uns) + with + Ghost, + Pre => Big (X) < Big_2xxSingle, + Post => Double_Uns (Lo (X)) = X; + + procedure Lemma_Lt_Commutation (A, B : Double_Uns) + with + Ghost, + Pre => A < B, + Post => Big (A) < Big (B); + + procedure Lemma_Lt_Mult (A, B, C, D : Big_Integer) + with + Ghost, + Pre => A < B and then B * C <= D and then C > 0, + Post => A * C < D; + + procedure Lemma_Mult_Commutation (X, Y : Single_Uns) + with + Ghost, + Post => + Big (Double_Uns (X)) * Big (Double_Uns (Y)) = + Big (Double_Uns (X) * Double_Uns (Y)); + + procedure Lemma_Mult_Commutation (X, Y : Double_Int) + with + Ghost, + Pre => In_Double_Int_Range (Big (X) * Big (Y)), + Post => Big (X) * Big (Y) = Big (X * Y); + + procedure Lemma_Mult_Commutation (X, Y, Z : Double_Uns) + with + Ghost, + Pre => Big (X) * Big (Y) < Big_2xxDouble and then Z = X * Y, + Post => Big (X) * Big (Y) = Big (Z); + + procedure Lemma_Mult_Decomposition + (Mult : Big_Integer; + Xu, Yu : Double_Uns; + Xhi, Xlo, Yhi, Ylo : Single_Uns) + with + Ghost, + Pre => Mult = Big (Xu) * Big (Yu) + and then Xhi = Hi (Xu) + and then Xlo = Lo (Xu) + and then Yhi = Hi (Yu) + and then Ylo = Lo (Yu), + Post => Mult = + Big_2xxSingle * Big_2xxSingle * (Big (Double_Uns'(Xhi * Yhi))) + + Big_2xxSingle * (Big (Double_Uns'(Xhi * Ylo))) + + Big_2xxSingle * (Big (Double_Uns'(Xlo * Yhi))) + + (Big (Double_Uns'(Xlo * Ylo))); + + procedure Lemma_Mult_Distribution (X, Y, Z : Big_Integer) + with + Ghost, + Post => X * (Y + Z) = X * Y + X * Z; + + procedure Lemma_Neg_Div (X, Y : Big_Integer) + with + Ghost, + Pre => Y /= 0, + Post => X / Y = (-X) / (-Y); + + procedure Lemma_Neg_Rem (X, Y : Big_Integer) + with + Ghost, + Pre => Y /= 0, + Post => X rem Y = X rem (-Y); + + procedure Lemma_Not_In_Range_Big2xx64 + with + Post => not In_Double_Int_Range (Big_2xxDouble) + and then not In_Double_Int_Range (-Big_2xxDouble); + + procedure Lemma_Powers_Of_2 (M, N : Natural) + with + Ghost, + Pre => M < Double_Size + and then N < Double_Size + and then M + N <= Double_Size, + Post => + Big_2xx (M) * Big_2xx (N) = + (if M + N = Double_Size then Big_2xxDouble else Big_2xx (M + N)); + + procedure Lemma_Powers_Of_2_Commutation (M : Natural) + with + Ghost, + Subprogram_Variant => (Decreases => M), + Pre => M <= Double_Size, + Post => Big (Double_Uns'(2))**M = + (if M < Double_Size then Big_2xx (M) else Big_2xxDouble); + + procedure Lemma_Powers_Of_2_Increasing (M, N : Natural) + with + Ghost, + Subprogram_Variant => (Increases => M), + Pre => M < N, + Post => Big (Double_Uns'(2))**M < Big (Double_Uns'(2))**N; + + procedure Lemma_Rem_Abs (X, Y : Big_Integer) + with + Ghost, + Pre => Y /= 0, + Post => X rem Y = X rem (abs Y); + pragma Unreferenced (Lemma_Rem_Abs); + + procedure Lemma_Rem_Commutation (X, Y : Double_Uns) + with + Ghost, + Pre => Y /= 0, + Post => Big (X) rem Big (Y) = Big (X rem Y); + + procedure Lemma_Rem_Is_Ident (X, Y : Big_Integer) + with + Ghost, + Pre => abs X < abs Y, + Post => X rem Y = X; + pragma Unreferenced (Lemma_Rem_Is_Ident); + + procedure Lemma_Rem_Sign (X, Y : Big_Integer) + with + Ghost, + Pre => Y /= 0, + Post => Same_Sign (X rem Y, X); + pragma Unreferenced (Lemma_Rem_Sign); + + procedure Lemma_Rev_Div_Definition (A, B, Q, R : Big_Natural) + with + Ghost, + Pre => A = B * Q + R and then R < B, + Post => Q = A / B and then R = A rem B; + + procedure Lemma_Shift_Right (X : Double_Uns; Shift : Natural) + with + Ghost, + Pre => Shift < Double_Size, + Post => Big (Shift_Right (X, Shift)) = Big (X) / Big_2xx (Shift); + + procedure Lemma_Shift_Without_Drop + (X, Y : Double_Uns; + Mask : Single_Uns; + Shift : Natural) + with + Ghost, + Pre => (Hi (X) and Mask) = 0 -- X has the first Shift bits off + and then Shift <= Single_Size + and then Mask = Shift_Left (Single_Uns'Last, Single_Size - Shift) + and then Y = Shift_Left (X, Shift), + Post => Big (Y) = Big_2xx (Shift) * Big (X); + + procedure Lemma_Simplify (X, Y : Big_Integer) + with + Ghost, + Pre => Y /= 0, + Post => X * Y / Y = X; + + procedure Lemma_Substitution (A, B, C, C1, D : Big_Integer) + with + Ghost, + Pre => C = C1 and then A = B * C + D, + Post => A = B * C1 + D; + + procedure Lemma_Subtract_Commutation (X, Y : Double_Uns) + with + Ghost, + Pre => X >= Y, + Post => Big (X) - Big (Y) = Big (X - Y); + + procedure Lemma_Subtract_Double_Uns (X, Y : Double_Int) + with + Ghost, + Pre => X >= 0 and then X <= Y, + Post => Double_Uns (Y - X) = Double_Uns (Y) - Double_Uns (X); + + procedure Lemma_Word_Commutation (X : Single_Uns) + with + Ghost, + Post => Big_2xxSingle * Big (Double_Uns (X)) + = Big (2**Single_Size * Double_Uns (X)); + + ----------------------------- + -- Local lemma null bodies -- + ----------------------------- + + procedure Inline_Le3 (X1, X2, X3, Y1, Y2, Y3 : Single_Uns) is null; + procedure Lemma_Abs_Commutation (X : Double_Int) is null; + procedure Lemma_Abs_Mult_Commutation (X, Y : Big_Integer) is null; + procedure Lemma_Add_Commutation (X : Double_Uns; Y : Single_Uns) is null; + procedure Lemma_Add_One (X : Double_Uns) is null; + procedure Lemma_Bounded_Powers_Of_2_Increasing (M, N : Natural) is null; + procedure Lemma_Deep_Mult_Commutation + (Factor : Big_Integer; + X, Y : Single_Uns) + is null; + procedure Lemma_Div_Commutation (X, Y : Double_Uns) is null; + procedure Lemma_Div_Definition + (A : Double_Uns; + B : Single_Uns; + Q : Double_Uns; + R : Double_Uns) + is null; + procedure Lemma_Div_Ge (X, Y, Z : Big_Integer) is null; + procedure Lemma_Div_Lt (X, Y, Z : Big_Natural) is null; + procedure Lemma_Div_Eq (A, B, S, R : Big_Integer) is null; + procedure Lemma_Double_Shift (X : Double_Uns; S, S1 : Double_Uns) is null; + procedure Lemma_Double_Shift (X : Single_Uns; S, S1 : Natural) is null; + procedure Lemma_Double_Shift_Right (X : Double_Uns; S, S1 : Double_Uns) + is null; + procedure Lemma_Ge_Commutation (A, B : Double_Uns) is null; + procedure Lemma_Ge_Mult (A, B, C, D : Big_Integer) is null; + procedure Lemma_Gt_Commutation (A, B : Double_Uns) is null; + procedure Lemma_Gt_Mult (A, B, C, D : Big_Integer) is null; + procedure Lemma_Lo_Is_Ident (X : Double_Uns) is null; + procedure Lemma_Lt_Commutation (A, B : Double_Uns) is null; + procedure Lemma_Lt_Mult (A, B, C, D : Big_Integer) is null; + procedure Lemma_Mult_Commutation (X, Y : Single_Uns) is null; + procedure Lemma_Mult_Commutation (X, Y : Double_Int) is null; + procedure Lemma_Mult_Commutation (X, Y, Z : Double_Uns) is null; + procedure Lemma_Mult_Distribution (X, Y, Z : Big_Integer) is null; + procedure Lemma_Mult_Non_Negative (X, Y : Big_Integer) is null; + procedure Lemma_Mult_Non_Positive (X, Y : Big_Integer) is null; + procedure Lemma_Neg_Rem (X, Y : Big_Integer) is null; + procedure Lemma_Not_In_Range_Big2xx64 is null; + procedure Lemma_Rem_Commutation (X, Y : Double_Uns) is null; + procedure Lemma_Rem_Is_Ident (X, Y : Big_Integer) is null; + procedure Lemma_Rem_Sign (X, Y : Big_Integer) is null; + procedure Lemma_Rev_Div_Definition (A, B, Q, R : Big_Natural) is null; + procedure Lemma_Simplify (X, Y : Big_Integer) is null; + procedure Lemma_Substitution (A, B, C, C1, D : Big_Integer) is null; + procedure Lemma_Subtract_Commutation (X, Y : Double_Uns) is null; + procedure Lemma_Subtract_Double_Uns (X, Y : Double_Int) is null; + procedure Lemma_Word_Commutation (X : Single_Uns) is null; + -------------------------- -- Add_With_Ovflo_Check -- -------------------------- @@ -111,18 +602,124 @@ package body System.Arith_Double is function Add_With_Ovflo_Check (X, Y : Double_Int) return Double_Int is R : constant Double_Int := To_Int (To_Uns (X) + To_Uns (Y)); + -- Local lemmas + + procedure Prove_Negative_X + with + Ghost, + Pre => X < 0 and then (Y > 0 or else R < 0), + Post => R = X + Y; + + procedure Prove_Non_Negative_X + with + Ghost, + Pre => X >= 0 and then (Y < 0 or else R >= 0), + Post => R = X + Y; + + procedure Prove_Overflow_Case + with + Ghost, + Pre => + (if X >= 0 then Y >= 0 and then R < 0 + else Y <= 0 and then R >= 0), + Post => not In_Double_Int_Range (Big (X) + Big (Y)); + + ---------------------- + -- Prove_Negative_X -- + ---------------------- + + procedure Prove_Negative_X is + begin + if X = Double_Int'First then + if Y > 0 then + null; + else + pragma Assert + (To_Uns (X) + To_Uns (Y) = + 2 ** (Double_Size - 1) - Double_Uns (-Y)); + pragma Assert -- as R < 0 + (To_Uns (X) + To_Uns (Y) >= 2 ** (Double_Size - 1)); + pragma Assert (Y = 0); + end if; + + elsif Y = Double_Int'First then + pragma Assert + (To_Uns (X) + To_Uns (Y) = + 2 ** (Double_Size - 1) - Double_Uns (-X)); + pragma Assert (False); + + elsif Y <= 0 then + pragma Assert + (To_Uns (X) + To_Uns (Y) = -Double_Uns (-X) - Double_Uns (-Y)); + + else -- Y > 0, 0 > X > Double_Int'First + declare + Ru : constant Double_Uns := To_Uns (X) + To_Uns (Y); + begin + pragma Assert (Ru = -Double_Uns (-X) + Double_Uns (Y)); + if Ru < 2 ** (Double_Size - 1) then -- R >= 0 + Lemma_Subtract_Double_Uns (-X, Y); + pragma Assert (Ru = Double_Uns (X + Y)); + + elsif Ru = 2 ** (Double_Size - 1) then + pragma Assert (Double_Uns (Y) < 2 ** (Double_Size - 1)); + pragma Assert (Double_Uns (-X) < 2 ** (Double_Size - 1)); + pragma Assert (False); + + else + pragma Assert + (R = -Double_Int (-(-Double_Uns (-X) + Double_Uns (Y)))); + pragma Assert + (R = -Double_Int (-Double_Uns (Y) + Double_Uns (-X))); + end if; + end; + end if; + end Prove_Negative_X; + + -------------------------- + -- Prove_Non_Negative_X -- + -------------------------- + + procedure Prove_Non_Negative_X is + begin + if Y >= 0 or else Y = Double_Int'First then + null; + else + pragma Assert + (To_Uns (X) + To_Uns (Y) = Double_Uns (X) - Double_Uns (-Y)); + end if; + end Prove_Non_Negative_X; + + ------------------------- + -- Prove_Overflow_Case -- + ------------------------- + + procedure Prove_Overflow_Case is + begin + if X < 0 and then X /= Double_Int'First and then Y /= Double_Int'First + then + pragma Assert + (To_Uns (X) + To_Uns (Y) = -Double_Uns (-X) - Double_Uns (-Y)); + end if; + end Prove_Overflow_Case; + + -- Start of processing for Add_With_Ovflo_Check + begin if X >= 0 then if Y < 0 or else R >= 0 then + Prove_Non_Negative_X; return R; end if; else -- X < 0 if Y > 0 or else R < 0 then + Prove_Negative_X; return R; end if; end if; + Prove_Overflow_Case; Raise_Error; end Add_With_Ovflo_Check; @@ -147,24 +744,169 @@ package body System.Arith_Double is T1, T2 : Double_Uns; Du, Qu, Ru : Double_Uns; - Den_Pos : Boolean; + Den_Pos : constant Boolean := (Y < 0) = (Z < 0); + + -- Local ghost variables + + Mult : constant Big_Integer := abs (Big (Y) * Big (Z)) with Ghost; + Quot : Big_Integer with Ghost; + Big_R : Big_Integer with Ghost; + Big_Q : Big_Integer with Ghost; + + -- Local lemmas + + procedure Prove_Overflow_Case + with + Ghost, + Pre => X = Double_Int'First and then Big (Y) * Big (Z) = -1, + Post => not In_Double_Int_Range (Big (X) / (Big (Y) * Big (Z))) + and then not In_Double_Int_Range + (Round_Quotient (Big (X), Big (Y) * Big (Z), + Big (X) / (Big (Y) * Big (Z)), + Big (X) rem (Big (Y) * Big (Z)))); + -- Proves the special case where -2**(Double_Size - 1) is divided by -1, + -- generating an overflow. + + procedure Prove_Quotient_Zero + with + Ghost, + Pre => Mult >= Big_2xxDouble + and then + not (Mult = Big_2xxDouble + and then X = Double_Int'First + and then Round) + and then Q = 0 + and then R = X, + Post => Big (R) = Big (X) rem (Big (Y) * Big (Z)) + and then + (if Round then + Big (Q) = Round_Quotient (Big (X), Big (Y) * Big (Z), + Big (X) / (Big (Y) * Big (Z)), + Big (R)) + else Big (Q) = Big (X) / (Big (Y) * Big (Z))); + -- Proves the general case where divisor doesn't fit in Double_Uns and + -- quotient is 0. + + procedure Prove_Round_To_One + with + Ghost, + Pre => Mult = Big_2xxDouble + and then X = Double_Int'First + and then Q = (if Den_Pos then -1 else 1) + and then R = X + and then Round, + Post => Big (R) = Big (X) rem (Big (Y) * Big (Z)) + and then Big (Q) = Round_Quotient (Big (X), Big (Y) * Big (Z), + Big (X) / (Big (Y) * Big (Z)), + Big (R)); + -- Proves the special case where the divisor doesn't fit in Double_Uns + -- but quotient is still 1 or -1 due to rounding + -- (abs (Y*Z) = 2**Double_Size and X = -2**(Double_Size - 1) and Round). + + procedure Prove_Rounding_Case + with + Ghost, + Pre => Mult /= 0 + and then Quot = Big (X) / (Big (Y) * Big (Z)) + and then Big_R = Big (X) rem (Big (Y) * Big (Z)) + and then Big_Q = + Round_Quotient (Big (X), Big (Y) * Big (Z), Quot, Big_R) + and then Big (Ru) = abs Big_R + and then Big (Du) = Mult + and then Big (Qu) = + (if Ru > (Du - Double_Uns'(1)) / Double_Uns'(2) + then abs Quot + 1 + else abs Quot), + Post => abs Big_Q = Big (Qu); + -- Proves correctness of the rounding of the unsigned quotient + + procedure Prove_Signs + with + Ghost, + Pre => Mult /= 0 + and then Quot = Big (X) / (Big (Y) * Big (Z)) + and then Big_R = Big (X) rem (Big (Y) * Big (Z)) + and then Big_Q = + (if Round then + Round_Quotient (Big (X), Big (Y) * Big (Z), Quot, Big_R) + else Quot) + and then Big (Ru) = abs Big_R + and then Big (Qu) = abs Big_Q + and then R = (if X >= 0 then To_Int (Ru) else To_Int (-Ru)) + and then + Q = (if (X >= 0) = Den_Pos then To_Int (Qu) else To_Int (-Qu)) + and then not (X = Double_Int'First and then Big (Y) * Big (Z) = -1), + Post => Big (R) = Big_R and then Big (Q) = Big_Q; + -- Proves final signs match the intended result after the unsigned + -- division is done. + + ----------------------------- + -- Local lemma null bodies -- + ----------------------------- + + procedure Prove_Overflow_Case is null; + procedure Prove_Quotient_Zero is null; + procedure Prove_Round_To_One is null; + + ------------------------- + -- Prove_Rounding_Case -- + ------------------------- + + procedure Prove_Rounding_Case is + begin + if Same_Sign (Big (X), Big (Y) * Big (Z)) then + null; + end if; + end Prove_Rounding_Case; + + ----------------- + -- Prove_Signs -- + ----------------- + + procedure Prove_Signs is + begin + if (X >= 0) = Den_Pos then + pragma Assert (Quot >= 0); + pragma Assert (Big_Q >= 0); + pragma Assert (Q >= 0); + pragma Assert (Big (Q) = Big_Q); + else + pragma Assert ((X >= 0) /= (Big (Y) * Big (Z) >= 0)); + pragma Assert (Quot <= 0); + pragma Assert (Big_Q <= 0); + pragma Assert (if X >= 0 then R >= 0); + pragma Assert (if X < 0 then R <= 0); + pragma Assert (Big (R) = Big_R); + end if; + end Prove_Signs; + + -- Start of processing for Double_Divide begin if Yu = 0 or else Zu = 0 then Raise_Error; end if; - -- Set final signs (RM 4.5.5(27-30)) - - Den_Pos := (Y < 0) = (Z < 0); + pragma Assert (Mult /= 0); + pragma Assert (Den_Pos = (Big (Y) * Big (Z) > 0)); + Quot := Big (X) / (Big (Y) * Big (Z)); + Big_R := Big (X) rem (Big (Y) * Big (Z)); + if Round then + Big_Q := Round_Quotient (Big (X), Big (Y) * Big (Z), Quot, Big_R); + else + Big_Q := Quot; + end if; + Lemma_Abs_Mult_Commutation (Big (Y), Big (Z)); + Lemma_Mult_Decomposition (Mult, Yu, Zu, Yhi, Ylo, Zhi, Zlo); -- Compute Y * Z. Note that if the result overflows Double_Uns, then -- the rounded result is zero, except for the very special case where - -- X = -2 ** (Double_Size - 1) and abs(Y*Z) = 2 ** Double_Size, when + -- X = -2 ** (Double_Size - 1) and abs (Y * Z) = 2 ** Double_Size, when -- Round is True. if Yhi /= 0 then if Zhi /= 0 then + R := X; -- Handle the special case when Round is True @@ -176,11 +918,23 @@ package body System.Arith_Double is and then Round then Q := (if Den_Pos then -1 else 1); + + Prove_Round_To_One; + else Q := 0; + + pragma Assert (Big (Double_Uns'(Yhi * Zhi)) >= 1); + if Yhi > 1 or else Zhi > 1 then + pragma Assert (Big (Double_Uns'(Yhi * Zhi)) > 1); + elsif Zlo > 0 then + pragma Assert (Big (Double_Uns'(Yhi * Zlo)) > 0); + elsif Ylo > 0 then + pragma Assert (Big (Double_Uns'(Ylo * Zhi)) > 0); + end if; + Prove_Quotient_Zero; end if; - R := X; return; else T2 := Yhi * Zlo; @@ -191,9 +945,38 @@ package body System.Arith_Double is end if; T1 := Ylo * Zlo; + + pragma Assert (Big (T2) = Big (Double_Uns'(Yhi * Zlo)) + + Big (Double_Uns'(Ylo * Zhi))); + Lemma_Mult_Distribution (Big_2xxSingle, + Big (Double_Uns'(Yhi * Zlo)), + Big (Double_Uns'(Ylo * Zhi))); + pragma Assert (Mult = Big_2xxSingle * Big (T2) + Big (T1)); + Lemma_Hi_Lo (T1, Hi (T1), Lo (T1)); + pragma Assert + (Mult = Big_2xxSingle * Big (T2) + + Big_2xxSingle * Big (Double_Uns (Hi (T1))) + + Big (Double_Uns (Lo (T1)))); + Lemma_Mult_Distribution (Big_2xxSingle, + Big (T2), + Big (Double_Uns (Hi (T1)))); + Lemma_Add_Commutation (T2, Hi (T1)); + T2 := T2 + Hi (T1); + pragma Assert + (Mult = Big_2xxSingle * Big (T2) + Big (Double_Uns (Lo (T1)))); + Lemma_Hi_Lo (T2, Hi (T2), Lo (T2)); + Lemma_Mult_Distribution (Big_2xxSingle, + Big (Double_Uns (Hi (T2))), + Big (Double_Uns (Lo (T2)))); + pragma Assert + (Mult = Big_2xxDouble * Big (Double_Uns (Hi (T2))) + + Big_2xxSingle * Big (Double_Uns (Lo (T2))) + + Big (Double_Uns (Lo (T1)))); + if Hi (T2) /= 0 then + R := X; -- Handle the special case when Round is True @@ -204,19 +987,49 @@ package body System.Arith_Double is and then Round then Q := (if Den_Pos then -1 else 1); + + Prove_Round_To_One; + else Q := 0; + + pragma Assert (Big (Double_Uns (Hi (T2))) >= 1); + pragma Assert (Big (Double_Uns (Lo (T2))) >= 0); + pragma Assert (Big (Double_Uns (Lo (T1))) >= 0); + pragma Assert (Mult >= Big_2xxDouble); + if Hi (T2) > 1 then + pragma Assert (Big (Double_Uns (Hi (T2))) > 1); + elsif Lo (T2) > 0 then + pragma Assert (Big (Double_Uns (Lo (T2))) > 0); + elsif Lo (T1) > 0 then + pragma Assert (Double_Uns (Lo (T1)) > 0); + Lemma_Gt_Commutation (Double_Uns (Lo (T1)), 0); + pragma Assert (Big (Double_Uns (Lo (T1))) > 0); + end if; + Prove_Quotient_Zero; end if; - R := X; return; end if; Du := Lo (T2) & Lo (T1); + Lemma_Hi_Lo (Du, Lo (T2), Lo (T1)); + pragma Assert (Mult = Big (Du)); + pragma Assert (Du /= 0); + -- Multiplication of 2-limb arguments Yu and Zu leads to 4-limb result + -- (where each limb is a single value). Cases where 4 limbs are needed + -- require Yhi /= 0 and Zhi /= 0 and lead to early exit. Remaining cases + -- where 3 limbs are needed correspond to Hi(T2) /= 0 and lead to early + -- exit. Thus, at this point, the result fits in 2 limbs which are + -- exactly Lo (T2) and Lo (T1), which corresponds to the value of Du. + -- As the case where one of Yu or Zu is null also led to early exit, + -- we have Du /= 0 here. + -- Check overflow case of largest negative number divided by -1 if X = Double_Int'First and then Du = 1 and then not Den_Pos then + Prove_Overflow_Case; Raise_Error; end if; @@ -231,31 +1044,52 @@ package body System.Arith_Double is -- exactly Lo(T2) and Lo(T1), which corresponds to the value of Du. -- As the case where one of Yu or Zu is null also led to early exit, -- we have Du/=0 here. + Qu := Xu / Du; Ru := Xu rem Du; + Lemma_Div_Commutation (Xu, Du); + Lemma_Abs_Div_Commutation (Big (X), Big (Y) * Big (Z)); + Lemma_Abs_Commutation (X); + pragma Assert (abs Quot = Big (Qu)); + Lemma_Rem_Commutation (Xu, Du); + Lemma_Abs_Rem_Commutation (Big (X), Big (Y) * Big (Z)); + pragma Assert (abs Big_R = Big (Ru)); + -- Deal with rounding case - if Round and then Ru > (Du - Double_Uns'(1)) / Double_Uns'(2) then - Qu := Qu + Double_Uns'(1); + if Round then + if Ru > (Du - Double_Uns'(1)) / Double_Uns'(2) then + Lemma_Add_Commutation (Qu, 1); + + Qu := Qu + Double_Uns'(1); + end if; + + Prove_Rounding_Case; end if; + pragma Assert (abs Big_Q = Big (Qu)); + + -- Set final signs (RM 4.5.5(27-30)) + -- Case of dividend (X) sign positive if X >= 0 then R := To_Int (Ru); - Q := (if Den_Pos then To_Int (Qu) else -To_Int (Qu)); - - -- Case of dividend (X) sign negative + Q := (if Den_Pos then To_Int (Qu) else To_Int (-Qu)); -- We perform the unary minus operation on the unsigned value -- before conversion to signed, to avoid a possible overflow -- for value -2 ** (Double_Size - 1), both for computing R and Q. + -- Case of dividend (X) sign negative + else R := To_Int (-Ru); Q := (if Den_Pos then To_Int (-Qu) else To_Int (Qu)); end if; + + Prove_Signs; end Double_Divide; --------- @@ -278,6 +1112,261 @@ package body System.Arith_Double is end Le3; ------------------------------- + -- Lemma_Abs_Div_Commutation -- + ------------------------------- + + procedure Lemma_Abs_Div_Commutation (X, Y : Big_Integer) is + begin + if Y < 0 then + if X < 0 then + pragma Assert (abs (X / Y) = abs (X / (-Y))); + else + Lemma_Neg_Div (X, Y); + pragma Assert (abs (X / Y) = abs ((-X) / (-Y))); + end if; + end if; + end Lemma_Abs_Div_Commutation; + + ------------------------------- + -- Lemma_Abs_Rem_Commutation -- + ------------------------------- + + procedure Lemma_Abs_Rem_Commutation (X, Y : Big_Integer) is + begin + if Y < 0 then + Lemma_Neg_Rem (X, Y); + if X < 0 then + pragma Assert (X rem Y = -((-X) rem (-Y))); + pragma Assert (abs (X rem Y) = (abs X) rem (abs Y)); + else + pragma Assert (abs (X rem Y) = (abs X) rem (abs Y)); + end if; + end if; + end Lemma_Abs_Rem_Commutation; + + ------------------------ + -- Lemma_Double_Shift -- + ------------------------ + + procedure Lemma_Double_Shift (X : Double_Uns; S, S1 : Natural) is + begin + Lemma_Double_Shift (X, Double_Uns (S), Double_Uns (S1)); + pragma Assert (Shift_Left (Shift_Left (X, S), S1) + = Shift_Left (Shift_Left (X, S), Natural (Double_Uns (S1)))); + pragma Assert (Shift_Left (X, S + S1) + = Shift_Left (X, Natural (Double_Uns (S + S1)))); + end Lemma_Double_Shift; + + ------------------------------ + -- Lemma_Double_Shift_Right -- + ------------------------------ + + procedure Lemma_Double_Shift_Right (X : Double_Uns; S, S1 : Natural) is + begin + Lemma_Double_Shift_Right (X, Double_Uns (S), Double_Uns (S1)); + pragma Assert (Shift_Right (Shift_Right (X, S), S1) + = Shift_Right (Shift_Right (X, S), Natural (Double_Uns (S1)))); + pragma Assert (Shift_Right (X, S + S1) + = Shift_Right (X, Natural (Double_Uns (S + S1)))); + end Lemma_Double_Shift_Right; + + ----------------- + -- Lemma_Hi_Lo -- + ----------------- + + procedure Lemma_Hi_Lo (Xu : Double_Uns; Xhi, Xlo : Single_Uns) is + begin + pragma Assert (Double_Uns (Xhi) = Xu / Double_Uns'(2 ** Single_Size)); + pragma Assert (Double_Uns (Xlo) = Xu mod 2 ** Single_Size); + end Lemma_Hi_Lo; + + ------------------- + -- Lemma_Hi_Lo_3 -- + ------------------- + + procedure Lemma_Hi_Lo_3 (Xu : Double_Uns; Xhi, Xlo : Single_Uns) is + begin + Lemma_Hi_Lo (Xu, Xhi, Xlo); + end Lemma_Hi_Lo_3; + + ------------------------------ + -- Lemma_Mult_Decomposition -- + ------------------------------ + + procedure Lemma_Mult_Decomposition + (Mult : Big_Integer; + Xu, Yu : Double_Uns; + Xhi, Xlo, Yhi, Ylo : Single_Uns) + is + begin + Lemma_Hi_Lo (Xu, Xhi, Xlo); + Lemma_Hi_Lo (Yu, Yhi, Ylo); + + pragma Assert + (Mult = + (Big_2xxSingle * Big (Double_Uns (Xhi)) + Big (Double_Uns (Xlo))) * + (Big_2xxSingle * Big (Double_Uns (Yhi)) + Big (Double_Uns (Ylo)))); + pragma Assert (Mult = + Big_2xxSingle + * Big_2xxSingle * Big (Double_Uns (Xhi)) * Big (Double_Uns (Yhi)) + + Big_2xxSingle * Big (Double_Uns (Xhi)) * Big (Double_Uns (Ylo)) + + Big_2xxSingle * Big (Double_Uns (Xlo)) * Big (Double_Uns (Yhi)) + + Big (Double_Uns (Xlo)) * Big (Double_Uns (Ylo))); + Lemma_Deep_Mult_Commutation (Big_2xxSingle * Big_2xxSingle, Xhi, Yhi); + Lemma_Deep_Mult_Commutation (Big_2xxSingle, Xhi, Ylo); + Lemma_Deep_Mult_Commutation (Big_2xxSingle, Xlo, Yhi); + Lemma_Mult_Commutation (Xlo, Ylo); + pragma Assert (Mult = + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns'(Xhi * Yhi)) + + Big_2xxSingle * Big (Double_Uns'(Xhi * Ylo)) + + Big_2xxSingle * Big (Double_Uns'(Xlo * Yhi)) + + Big (Double_Uns'(Xlo * Ylo))); + end Lemma_Mult_Decomposition; + + ------------------- + -- Lemma_Neg_Div -- + ------------------- + + procedure Lemma_Neg_Div (X, Y : Big_Integer) is + begin + pragma Assert ((-X) / (-Y) = -(X / (-Y))); + pragma Assert (X / (-Y) = -(X / Y)); + end Lemma_Neg_Div; + + ----------------------- + -- Lemma_Powers_Of_2 -- + ----------------------- + + procedure Lemma_Powers_Of_2 (M, N : Natural) is + begin + if M + N < Double_Size then + pragma Assert (Double_Uns'(2**M) * Double_Uns'(2**N) + = Double_Uns'(2**(M + N))); + end if; + + Lemma_Powers_Of_2_Commutation (M); + Lemma_Powers_Of_2_Commutation (N); + Lemma_Powers_Of_2_Commutation (M + N); + + if M + N < Double_Size then + pragma Assert (Big (Double_Uns'(2))**M * Big (Double_Uns'(2))**N + = Big (Double_Uns'(2))**(M + N)); + Lemma_Powers_Of_2_Increasing (M + N, Double_Size); + Lemma_Mult_Commutation (2 ** M, 2 ** N, 2 ** (M + N)); + else + pragma Assert (Big (Double_Uns'(2))**M * Big (Double_Uns'(2))**N + = Big (Double_Uns'(2))**(M + N)); + end if; + end Lemma_Powers_Of_2; + + ----------------------------------- + -- Lemma_Powers_Of_2_Commutation -- + ----------------------------------- + + procedure Lemma_Powers_Of_2_Commutation (M : Natural) is + begin + if M > 0 then + Lemma_Powers_Of_2_Commutation (M - 1); + pragma Assert (Big (Double_Uns'(2))**(M - 1) = Big_2xx (M - 1)); + pragma Assert (Big (Double_Uns'(2))**M = Big_2xx (M - 1) * 2); + if M < Double_Size then + Lemma_Powers_Of_2_Increasing (M - 1, Double_Size - 1); + Lemma_Bounded_Powers_Of_2_Increasing (M - 1, Double_Size - 1); + pragma Assert (Double_Uns'(2 ** (M - 1)) * 2 = Double_Uns'(2**M)); + Lemma_Mult_Commutation + (Double_Uns'(2 ** (M - 1)), 2, Double_Uns'(2**M)); + pragma Assert (Big (Double_Uns'(2))**M = Big_2xx (M)); + end if; + end if; + end Lemma_Powers_Of_2_Commutation; + + ---------------------------------- + -- Lemma_Powers_Of_2_Increasing -- + ---------------------------------- + + procedure Lemma_Powers_Of_2_Increasing (M, N : Natural) is + begin + if M + 1 < N then + Lemma_Powers_Of_2_Increasing (M + 1, N); + end if; + end Lemma_Powers_Of_2_Increasing; + + ------------------- + -- Lemma_Rem_Abs -- + ------------------- + + procedure Lemma_Rem_Abs (X, Y : Big_Integer) is + begin + Lemma_Neg_Rem (X, Y); + end Lemma_Rem_Abs; + + ----------------------- + -- Lemma_Shift_Right -- + ----------------------- + + procedure Lemma_Shift_Right (X : Double_Uns; Shift : Natural) is + XX : Double_Uns := X; + begin + for J in 1 .. Shift loop + XX := Shift_Right (XX, 1); + Lemma_Double_Shift_Right (X, J - 1, 1); + pragma Loop_Invariant (XX = Shift_Right (X, J)); + pragma Loop_Invariant (XX = X / Double_Uns'(2) ** J); + end loop; + end Lemma_Shift_Right; + + ------------------------------ + -- Lemma_Shift_Without_Drop -- + ------------------------------ + + procedure Lemma_Shift_Without_Drop + (X, Y : Double_Uns; + Mask : Single_Uns; + Shift : Natural) + is + pragma Unreferenced (Mask); + + procedure Lemma_Bound + with + Pre => Shift <= Single_Size + and then X <= 2**Single_Size + * Double_Uns'(2**(Single_Size - Shift) - 1) + + Single_Uns'(2**Single_Size - 1), + Post => X <= 2**(Double_Size - Shift) - 1; + + procedure Lemma_Exp_Pos (N : Integer) + with + Pre => N in 0 .. Double_Size - 1, + Post => Double_Uns'(2**N) > 0; + + ----------------------------- + -- Local lemma null bodies -- + ----------------------------- + + procedure Lemma_Bound is null; + procedure Lemma_Exp_Pos (N : Integer) is null; + + -- Start of processing for Lemma_Shift_Without_Drop + + begin + if Shift = 0 then + pragma Assert (Big (Y) = Big_2xx (Shift) * Big (X)); + return; + end if; + + Lemma_Bound; + Lemma_Exp_Pos (Double_Size - Shift); + pragma Assert (X < 2**(Double_Size - Shift)); + pragma Assert (Big (X) < Big_2xx (Double_Size - Shift)); + pragma Assert (Y = 2**Shift * X); + pragma Assert (Big_2xx (Shift) * Big (X) + < Big_2xx (Shift) * Big_2xx (Double_Size - Shift)); + Lemma_Powers_Of_2 (Shift, Double_Size - Shift); + Lemma_Mult_Commutation (2**Shift, X, Y); + pragma Assert (Big (Y) = Big_2xx (Shift) * Big (X)); + end Lemma_Shift_Without_Drop; + + ------------------------------- -- Multiply_With_Ovflo_Check -- ------------------------------- @@ -292,9 +1381,149 @@ package body System.Arith_Double is T1, T2 : Double_Uns; + -- Local ghost variables + + Mult : constant Big_Integer := abs (Big (X) * Big (Y)) with Ghost; + + -- Local lemmas + + procedure Prove_Both_Too_Large + with + Ghost, + Pre => Xhi /= 0 + and then Yhi /= 0 + and then Mult = + Big_2xxSingle * Big_2xxSingle * (Big (Double_Uns'(Xhi * Yhi))) + + Big_2xxSingle * (Big (Double_Uns'(Xhi * Ylo))) + + Big_2xxSingle * (Big (Double_Uns'(Xlo * Yhi))) + + (Big (Double_Uns'(Xlo * Ylo))), + Post => not In_Double_Int_Range (Big (X) * Big (Y)); + + procedure Prove_Final_Decomposition + with + Ghost, + Pre => In_Double_Int_Range (Big (X) * Big (Y)) + and then Mult = Big_2xxSingle * Big (T2) + Big (Double_Uns (Lo (T1))) + and then Hi (T2) = 0, + Post => Mult = Big (Lo (T2) & Lo (T1)); + + procedure Prove_Neg_Int + with + Ghost, + Pre => In_Double_Int_Range (Big (X) * Big (Y)) + and then Mult = Big (T2) + and then ((X >= 0 and then Y < 0) or else (X < 0 and then Y >= 0)), + Post => To_Neg_Int (T2) = X * Y; + + procedure Prove_Pos_Int + with + Ghost, + Pre => In_Double_Int_Range (Big (X) * Big (Y)) + and then Mult = Big (T2) + and then ((X >= 0 and then Y >= 0) or else (X < 0 and then Y < 0)), + Post => In_Double_Int_Range (Big (T2)) + and then To_Pos_Int (T2) = X * Y; + + procedure Prove_Result_Too_Large + with + Ghost, + Pre => Mult = Big_2xxSingle * Big (T2) + Big (Double_Uns (Lo (T1))) + and then Hi (T2) /= 0, + Post => not In_Double_Int_Range (Big (X) * Big (Y)); + + procedure Prove_Too_Large + with + Ghost, + Pre => abs (Big (X) * Big (Y)) >= Big_2xxDouble, + Post => not In_Double_Int_Range (Big (X) * Big (Y)); + + -------------------------- + -- Prove_Both_Too_Large -- + -------------------------- + + procedure Prove_Both_Too_Large is + begin + pragma Assert (Mult >= + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns'(Xhi * Yhi))); + pragma Assert (Double_Uns (Xhi) * Double_Uns (Yhi) >= 1); + pragma Assert (Mult >= Big_2xxSingle * Big_2xxSingle); + Prove_Too_Large; + end Prove_Both_Too_Large; + + ------------------------------- + -- Prove_Final_Decomposition -- + ------------------------------- + + procedure Prove_Final_Decomposition is + begin + Lemma_Hi_Lo (T2, Hi (T2), Lo (T2)); + pragma Assert (Mult = Big_2xxSingle * Big (Double_Uns (Lo (T2))) + + Big (Double_Uns (Lo (T1)))); + pragma Assert (Mult <= Big_2xxDouble_Minus_1); + Lemma_Mult_Commutation (X, Y); + pragma Assert (Mult = abs (Big (X * Y))); + Lemma_Word_Commutation (Lo (T2)); + pragma Assert (Mult = Big (Double_Uns'(2 ** Single_Size) + * Double_Uns (Lo (T2))) + + Big (Double_Uns (Lo (T1)))); + Lemma_Add_Commutation (Double_Uns'(2 ** Single_Size) + * Double_Uns (Lo (T2)), + Lo (T1)); + pragma Assert (Mult = Big (Double_Uns'(2 ** Single_Size) + * Double_Uns (Lo (T2)) + Lo (T1))); + pragma Assert (Lo (T2) & Lo (T1) = Double_Uns'(2 ** Single_Size) + * Double_Uns (Lo (T2)) + Lo (T1)); + end Prove_Final_Decomposition; + + ------------------- + -- Prove_Neg_Int -- + ------------------- + + procedure Prove_Neg_Int is + begin + pragma Assert (X * Y <= 0); + pragma Assert (Mult = -Big (X * Y)); + end Prove_Neg_Int; + + ------------------- + -- Prove_Pos_Int -- + ------------------- + + procedure Prove_Pos_Int is + begin + pragma Assert (X * Y >= 0); + pragma Assert (Mult = Big (X * Y)); + end Prove_Pos_Int; + + ---------------------------- + -- Prove_Result_Too_Large -- + ---------------------------- + + procedure Prove_Result_Too_Large is + begin + pragma Assert (Mult >= Big_2xxSingle * Big (T2)); + Lemma_Hi_Lo (T2, Hi (T2), Lo (T2)); + pragma Assert (Mult >= + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (Hi (T2)))); + pragma Assert (Double_Uns (Hi (T2)) >= 1); + pragma Assert (Mult >= Big_2xxSingle * Big_2xxSingle); + Prove_Too_Large; + end Prove_Result_Too_Large; + + --------------------- + -- Prove_Too_Large -- + --------------------- + + procedure Prove_Too_Large is null; + + -- Start of processing for Multiply_With_Ovflo_Check + begin + Lemma_Mult_Decomposition (Mult, Xu, Yu, Xhi, Xlo, Yhi, Ylo); + if Xhi /= 0 then if Yhi /= 0 then + Prove_Both_Too_Large; Raise_Error; else T2 := Xhi * Ylo; @@ -311,28 +1540,51 @@ package body System.Arith_Double is -- result from the upper halves of the input values. T1 := Xlo * Ylo; + + pragma Assert (Big (T2) = Big (Double_Uns'(Xhi * Ylo)) + + Big (Double_Uns'(Xlo * Yhi))); + Lemma_Mult_Distribution (Big_2xxSingle, Big (Double_Uns'(Xhi * Ylo)), + Big (Double_Uns'(Xlo * Yhi))); + pragma Assert (Mult = Big_2xxSingle * Big (T2) + Big (T1)); + Lemma_Add_Commutation (T2, Hi (T1)); + pragma Assert + (Big (T2 + Hi (T1)) = Big (T2) + Big (Double_Uns (Hi (T1)))); + T2 := T2 + Hi (T1); + Lemma_Hi_Lo (T1, Hi (T1), Lo (T1)); + pragma Assert + (Mult = Big_2xxSingle * Big (T2) + Big (Double_Uns (Lo (T1)))); + if Hi (T2) /= 0 then + Prove_Result_Too_Large; Raise_Error; end if; + Prove_Final_Decomposition; + T2 := Lo (T2) & Lo (T1); + pragma Assert (Mult = Big (T2)); + if X >= 0 then if Y >= 0 then + Prove_Pos_Int; return To_Pos_Int (T2); pragma Annotate (CodePeer, Intentional, "precondition", "Intentional Unsigned->Signed conversion"); else + Prove_Neg_Int; return To_Neg_Int (T2); end if; else -- X < 0 if Y < 0 then + Prove_Pos_Int; return To_Pos_Int (T2); pragma Annotate (CodePeer, Intentional, "precondition", "Intentional Unsigned->Signed conversion"); else + Prove_Neg_Int; return To_Neg_Int (T2); end if; end if; @@ -346,6 +1598,9 @@ package body System.Arith_Double is procedure Raise_Error is begin raise Constraint_Error with "Double arithmetic overflow"; + pragma Annotate + (GNATprove, Intentional, "exception might be raised", + "Procedure Raise_Error is called to signal input errors"); end Raise_Error; ------------------- @@ -369,10 +1624,10 @@ package body System.Arith_Double is Zhi : Single_Uns := Hi (Zu); Zlo : Single_Uns := Lo (Zu); - D : array (1 .. 4) of Single_Uns; + D : array (1 .. 4) of Single_Uns with Relaxed_Initialization; -- The dividend, four digits (D(1) is high order) - Qd : array (1 .. 2) of Single_Uns; + Qd : array (1 .. 2) of Single_Uns with Relaxed_Initialization; -- The quotient digits, two digits (Qd(1) is high order) S1, S2, S3 : Single_Uns; @@ -397,55 +1652,616 @@ package body System.Arith_Double is T1, T2, T3 : Double_Uns; -- Temporary values + -- Local ghost variables + + Mult : constant Big_Integer := abs (Big (X) * Big (Y)) with Ghost; + Quot : Big_Integer with Ghost; + Big_R : Big_Integer with Ghost; + Big_Q : Big_Integer with Ghost; + Inter : Natural with Ghost; + + -- Local lemmas + + procedure Prove_Dividend_Scaling + with + Ghost, + Pre => D'Initialized + and then Scale <= Single_Size + and then Mult = + Big_2xxSingle + * Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (1))) + + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (2))) + + Big_2xxSingle * Big (Double_Uns (D (3))) + + Big (Double_Uns (D (4))) + and then Big (D (1) & D (2)) * Big_2xx (Scale) < Big_2xxDouble + and then T1 = Shift_Left (D (1) & D (2), Scale) + and then T2 = Shift_Left (Double_Uns (D (3)), Scale) + and then T3 = Shift_Left (Double_Uns (D (4)), Scale), + Post => Mult * Big_2xx (Scale) = + Big_2xxSingle + * Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (Hi (T1))) + + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (Lo (T1) or + Hi (T2))) + + Big_2xxSingle * Big (Double_Uns (Lo (T2) or + Hi (T3))) + + Big (Double_Uns (Lo (T3))); + -- Proves the scaling of the 4-digit dividend actually multiplies it by + -- 2**Scale. + + procedure Prove_Multiplication (Q : Single_Uns) + with + Ghost, + Pre => T1 = Q * Lo (Zu) + and then T2 = Q * Hi (Zu) + and then S3 = Lo (T1) + and then T3 = Hi (T1) + Lo (T2) + and then S2 = Lo (T3) + and then S1 = Hi (T3) + Hi (T2), + Post => Big3 (S1, S2, S3) = Big (Double_Uns (Q)) * Big (Zu); + -- Proves correctness of the multiplication of divisor by quotient to + -- compute amount to subtract. + + procedure Prove_Negative_Dividend + with + Ghost, + Pre => Z /= 0 + and then Big (Qu) = abs Big_Q + and then In_Double_Int_Range (Big_Q) + and then Big (Ru) = abs Big_R + and then ((X >= 0 and Y < 0) or (X < 0 and Y >= 0)) + and then Big_Q = + (if Round then Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), + Big (X) * Big (Y) rem Big (Z)) + else Big (X) * Big (Y) / Big (Z)) + and then Big_R = Big (X) * Big (Y) rem Big (Z), + Post => + (if Z > 0 then Big_Q <= Big_0 + and then In_Double_Int_Range (-Big (Qu)) + else Big_Q >= Big_0 + and then In_Double_Int_Range (Big (Qu))) + and then In_Double_Int_Range (-Big (Ru)); + -- Proves the sign of rounded quotient when dividend is non-positive + + procedure Prove_Overflow + with + Ghost, + Pre => Z /= 0 + and then Mult >= Big_2xxDouble * Big (Double_Uns'(abs Z)), + Post => not In_Double_Int_Range (Big (X) * Big (Y) / Big (Z)) + and then not In_Double_Int_Range + (Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), + Big (X) * Big (Y) rem Big (Z))); + -- Proves overflow case when the quotient has at least 3 digits + + procedure Prove_Positive_Dividend + with + Ghost, + Pre => Z /= 0 + and then Big (Qu) = abs Big_Q + and then In_Double_Int_Range (Big_Q) + and then Big (Ru) = abs Big_R + and then ((X >= 0 and Y >= 0) or (X < 0 and Y < 0)) + and then Big_Q = + (if Round then Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), + Big (X) * Big (Y) rem Big (Z)) + else Big (X) * Big (Y) / Big (Z)) + and then Big_R = Big (X) * Big (Y) rem Big (Z), + Post => + (if Z > 0 then Big_Q >= Big_0 + and then In_Double_Int_Range (Big (Qu)) + else Big_Q <= Big_0 + and then In_Double_Int_Range (-Big (Qu))) + and then In_Double_Int_Range (Big (Ru)); + -- Proves the sign of rounded quotient when dividend is non-negative + + procedure Prove_Qd_Calculation_Part_1 (J : Integer) + with + Ghost, + Pre => J in 1 .. 2 + and then D'Initialized + and then D (J) < Zhi + and then Hi (Zu) = Zhi + and then Qd (J)'Initialized + and then Qd (J) = Lo ((D (J) & D (J + 1)) / Zhi), + Post => Big (Double_Uns (Qd (J))) >= + Big3 (D (J), D (J + 1), D (J + 2)) / Big (Zu); + -- When dividing 3 digits by 2 digits, proves the initial calculation + -- of the quotient given by dividing the first 2 digits of the dividend + -- by the first digit of the divisor is not an underestimate (so + -- readjusting down works). + + procedure Prove_Q_Too_Big + with + Ghost, + Pre => In_Double_Int_Range (Big_Q) + and then abs Big_Q = Big_2xxDouble, + Post => False; + -- Proves the inconsistency when Q is equal to Big_2xx64 + + procedure Prove_Rescaling + with + Ghost, + Pre => Scale <= Single_Size + and then Z /= 0 + and then Mult * Big_2xx (Scale) = Big (Zu) * Big (Qu) + Big (Ru) + and then Big (Ru) < Big (Zu) + and then Big (Zu) = Big (Double_Uns'(abs Z)) * Big_2xx (Scale) + and then Quot = Big (X) * Big (Y) / Big (Z) + and then Big_R = Big (X) * Big (Y) rem Big (Z), + Post => abs Quot = Big (Qu) + and then abs Big_R = Big (Shift_Right (Ru, Scale)); + -- Proves scaling back only the remainder is the right thing to do after + -- computing the scaled division. + + procedure Prove_Rounding_Case + with + Ghost, + Pre => Z /= 0 + and then Quot = Big (X) * Big (Y) / Big (Z) + and then Big_R = Big (X) * Big (Y) rem Big (Z) + and then Big_Q = + Round_Quotient (Big (X) * Big (Y), Big (Z), Quot, Big_R) + and then Big (Ru) = abs Big_R + and then Big (Zu) = Big (Double_Uns'(abs Z)), + Post => abs Big_Q = + (if Ru > (Zu - Double_Uns'(1)) / Double_Uns'(2) + then abs Quot + 1 + else abs Quot); + -- Proves correctness of the rounding of the unsigned quotient + + procedure Prove_Sign_R + with + Ghost, + Pre => Z /= 0 and then Big_R = Big (X) * Big (Y) rem Big (Z), + Post => In_Double_Int_Range (Big_R); + + procedure Prove_Signs + with + Ghost, + Pre => Z /= 0 + and then Quot = Big (X) * Big (Y) / Big (Z) + and then Big_R = Big (X) * Big (Y) rem Big (Z) + and then Big_Q = + (if Round then + Round_Quotient (Big (X) * Big (Y), Big (Z), Quot, Big_R) + else Quot) + and then Big (Ru) = abs Big_R + and then Big (Qu) = abs Big_Q + and then In_Double_Int_Range (Big_Q) + and then In_Double_Int_Range (Big_R) + and then R = + (if (X >= 0) = (Y >= 0) then To_Pos_Int (Ru) else To_Neg_Int (Ru)) + and then Q = + (if ((X >= 0) = (Y >= 0)) = (Z >= 0) then To_Pos_Int (Qu) + else To_Neg_Int (Qu)), -- need to ensure To_Pos_Int precondition + Post => Big (R) = Big_R and then Big (Q) = Big_Q; + -- Proves final signs match the intended result after the unsigned + -- division is done. + + procedure Prove_Z_Low + with + Ghost, + Pre => Z /= 0 + and then D'Initialized + and then Hi (abs Z) = 0 + and then Lo (abs Z) = Zlo + and then Mult = + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (2))) + + Big_2xxSingle * Big (Double_Uns (D (3))) + + Big (Double_Uns (D (4))) + and then D (2) < Zlo + and then Quot = (Big (X) * Big (Y)) / Big (Z) + and then Big_R = (Big (X) * Big (Y)) rem Big (Z) + and then T1 = D (2) & D (3) + and then T2 = Lo (T1 rem Zlo) & D (4) + and then Qu = Lo (T1 / Zlo) & Lo (T2 / Zlo) + and then Ru = T2 rem Zlo, + Post => Big (Qu) = abs Quot + and then Big (Ru) = abs Big_R; + -- Proves the case where the divisor is only one digit + + ---------------------------- + -- Prove_Dividend_Scaling -- + ---------------------------- + + procedure Prove_Dividend_Scaling is + begin + Lemma_Hi_Lo (D (1) & D (2), D (1), D (2)); + pragma Assert (Mult * Big_2xx (Scale) = + Big_2xxSingle + * Big_2xxSingle * Big_2xx (Scale) * Big (D (1) & D (2)) + + Big_2xxSingle * Big_2xx (Scale) * Big (Double_Uns (D (3))) + + Big_2xx (Scale) * Big (Double_Uns (D (4)))); + pragma Assert (Big_2xx (Scale) > 0); + Lemma_Lt_Mult (Big (Double_Uns (D (3))), Big_2xxSingle, + Big_2xx (Scale), Big_2xxDouble); + Lemma_Lt_Mult (Big (Double_Uns (D (4))), Big_2xxSingle, + Big_2xx (Scale), Big_2xxDouble); + Lemma_Mult_Commutation (2 ** Scale, D (1) & D (2), T1); + declare + Big_D12 : constant Big_Integer := + Big_2xx (Scale) * Big (D (1) & D (2)); + Big_T1 : constant Big_Integer := Big (T1); + begin + pragma Assert (Big_D12 = Big_T1); + pragma Assert (Big_2xxSingle * Big_2xxSingle * Big_D12 + = Big_2xxSingle * Big_2xxSingle * Big_T1); + end; + Lemma_Mult_Commutation (2 ** Scale, Double_Uns (D (3)), T2); + declare + Big_D3 : constant Big_Integer := + Big_2xx (Scale) * Big (Double_Uns (D (3))); + Big_T2 : constant Big_Integer := Big (T2); + begin + pragma Assert (Big_D3 = Big_T2); + pragma Assert (Big_2xxSingle * Big_D3 = Big_2xxSingle * Big_T2); + end; + Lemma_Mult_Commutation (2 ** Scale, Double_Uns (D (4)), T3); + declare + Big_D4 : constant Big_Integer := + Big_2xx (Scale) * Big (Double_Uns (D (4))); + Big_T3 : constant Big_Integer := Big (T3); + begin + pragma Assert (Big_D4 = Big_T3); + end; + pragma Assert (Mult * Big_2xx (Scale) = + Big_2xxSingle * Big_2xxSingle * Big (T1) + + Big_2xxSingle * Big (T2) + + Big (T3)); + Lemma_Hi_Lo (T1, Hi (T1), Lo (T1)); + Lemma_Hi_Lo (T2, Hi (T2), Lo (T2)); + Lemma_Hi_Lo (T3, Hi (T3), Lo (T3)); + pragma Assert (Double_Uns (Lo (T1) or Hi (T2)) = + Double_Uns (Lo (T1)) + Double_Uns (Hi (T2))); + pragma Assert (Double_Uns (Lo (T2) or Hi (T3)) = + Double_Uns (Lo (T2)) + Double_Uns (Hi (T3))); + end Prove_Dividend_Scaling; + + -------------------------- + -- Prove_Multiplication -- + -------------------------- + + procedure Prove_Multiplication (Q : Single_Uns) is + begin + Lemma_Hi_Lo (Zu, Hi (Zu), Lo (Zu)); + Lemma_Hi_Lo (T1, Hi (T1), S3); + Lemma_Hi_Lo (T2, Hi (T2), Lo (T2)); + Lemma_Hi_Lo (T3, Hi (T3), S2); + Lemma_Mult_Commutation (Double_Uns (Q), Double_Uns (Lo (Zu)), T1); + Lemma_Mult_Commutation (Double_Uns (Q), Double_Uns (Hi (Zu)), T2); + pragma Assert (Big (Double_Uns (Q)) * Big (Zu) = + Big_2xxSingle * Big (T2) + Big (T1)); + pragma Assert (Big (Double_Uns (Q)) * Big (Zu) = + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (Hi (T2))) + + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (Hi (T3))) + + Big_2xxSingle * Big (Double_Uns (S2)) + + Big (Double_Uns (S3))); + pragma Assert (Double_Uns (Hi (T3)) + Hi (T2) = Double_Uns (S1)); + Lemma_Add_Commutation (Double_Uns (Hi (T3)), Hi (T2)); + pragma Assert + (Big (Double_Uns (Hi (T3))) + Big (Double_Uns (Hi (T2))) = + Big (Double_Uns (S1))); + end Prove_Multiplication; + + ----------------------------- + -- Prove_Negative_Dividend -- + ----------------------------- + + procedure Prove_Negative_Dividend is + begin + Lemma_Mult_Non_Positive (Big (X), Big (Y)); + end Prove_Negative_Dividend; + + -------------------- + -- Prove_Overflow -- + -------------------- + + procedure Prove_Overflow is + begin + Lemma_Div_Ge (Mult, Big_2xxDouble, Big (Double_Uns'(abs Z))); + Lemma_Abs_Commutation (Z); + Lemma_Abs_Div_Commutation (Big (X) * Big (Y), Big (Z)); + end Prove_Overflow; + + ----------------------------- + -- Prove_Positive_Dividend -- + ----------------------------- + + procedure Prove_Positive_Dividend is + begin + Lemma_Mult_Non_Negative (Big (X), Big (Y)); + end Prove_Positive_Dividend; + + --------------------------------- + -- Prove_Qd_Calculation_Part_1 -- + --------------------------------- + + procedure Prove_Qd_Calculation_Part_1 (J : Integer) is + begin + Lemma_Hi_Lo (D (J) & D (J + 1), D (J), D (J + 1)); + Lemma_Lt_Commutation (Double_Uns (D (J)), Double_Uns (Zhi)); + Lemma_Gt_Mult (Big (Double_Uns (Zhi)), + Big (Double_Uns (D (J))) + 1, + Big_2xxSingle, Big (D (J) & D (J + 1))); + Lemma_Div_Lt + (Big (D (J) & D (J + 1)), Big_2xxSingle, Big (Double_Uns (Zhi))); + Lemma_Div_Commutation (D (J) & D (J + 1), Double_Uns (Zhi)); + Lemma_Lo_Is_Ident ((D (J) & D (J + 1)) / Zhi); + Lemma_Div_Definition (D (J) & D (J + 1), Zhi, Double_Uns (Qd (J)), + (D (J) & D (J + 1)) rem Zhi); + Lemma_Lt_Commutation + ((D (J) & D (J + 1)) rem Zhi, Double_Uns (Zhi)); + Lemma_Gt_Mult + ((Big (Double_Uns (Qd (J))) + 1) * Big (Double_Uns (Zhi)), + Big (D (J) & D (J + 1)) + 1, Big_2xxSingle, + Big3 (D (J), D (J + 1), D (J + 2))); + Lemma_Hi_Lo (Zu, Zhi, Lo (Zu)); + Lemma_Gt_Mult (Big (Zu), Big_2xxSingle * Big (Double_Uns (Zhi)), + Big (Double_Uns (Qd (J))) + 1, + Big3 (D (J), D (J + 1), D (J + 2))); + Lemma_Div_Lt (Big3 (D (J), D (J + 1), D (J + 2)), + Big (Double_Uns (Qd (J))) + 1, Big (Zu)); + end Prove_Qd_Calculation_Part_1; + + --------------------- + -- Prove_Q_Too_Big -- + --------------------- + + procedure Prove_Q_Too_Big is + begin + pragma Assert (Big_Q = Big_2xxDouble or Big_Q = -Big_2xxDouble); + Lemma_Not_In_Range_Big2xx64; + end Prove_Q_Too_Big; + + --------------------- + -- Prove_Rescaling -- + --------------------- + + procedure Prove_Rescaling is + begin + Lemma_Div_Lt (Big (Ru), Big (Double_Uns'(abs Z)), Big_2xx (Scale)); + Lemma_Div_Eq (Mult, Big (Double_Uns'(abs Z)) * Big (Qu), + Big_2xx (Scale), Big (Ru)); + Lemma_Rev_Div_Definition (Mult, Big (Double_Uns'(abs Z)), + Big (Qu), Big (Ru) / Big_2xx (Scale)); + Lemma_Abs_Div_Commutation (Big (X) * Big (Y), Big (Z)); + Lemma_Abs_Rem_Commutation (Big (X) * Big (Y), Big (Z)); + Lemma_Abs_Commutation (Z); + Lemma_Shift_Right (Ru, Scale); + end Prove_Rescaling; + + ------------------------- + -- Prove_Rounding_Case -- + ------------------------- + + procedure Prove_Rounding_Case is + begin + if Same_Sign (Big (X) * Big (Y), Big (Z)) then + null; + end if; + end Prove_Rounding_Case; + + ------------------ + -- Prove_Sign_R -- + ------------------ + + procedure Prove_Sign_R is + begin + pragma Assert (In_Double_Int_Range (Big (Z))); + end Prove_Sign_R; + + ----------------- + -- Prove_Signs -- + ----------------- + + procedure Prove_Signs is null; + + ----------------- + -- Prove_Z_Low -- + ----------------- + + procedure Prove_Z_Low is + begin + Lemma_Hi_Lo (T1, D (2), D (3)); + Lemma_Add_Commutation (Double_Uns (D (2)), 1); + pragma Assert + (Big (Double_Uns (D (2))) + 1 <= Big (Double_Uns (Zlo))); + Lemma_Div_Definition (T1, Zlo, T1 / Zlo, T1 rem Zlo); + pragma Assert (Double_Uns (Lo (T1 rem Zlo)) = T1 rem Zlo); + Lemma_Hi_Lo (T2, Lo (T1 rem Zlo), D (4)); + pragma Assert (T1 rem Zlo + Double_Uns'(1) <= Double_Uns (Zlo)); + Lemma_Add_Commutation (T1 rem Zlo, 1); + pragma Assert (Big (T1 rem Zlo) + 1 <= Big (Double_Uns (Zlo))); + Lemma_Div_Definition (T2, Zlo, T2 / Zlo, Ru); + pragma Assert + (Mult = Big (Double_Uns (Zlo)) * + (Big_2xxSingle * Big (T1 / Zlo) + Big (T2 / Zlo)) + Big (Ru)); + Lemma_Div_Lt (Big (T1), Big_2xxSingle, Big (Double_Uns (Zlo))); + Lemma_Div_Commutation (T1, Double_Uns (Zlo)); + Lemma_Lo_Is_Ident (T1 / Zlo); + Lemma_Div_Lt (Big (T2), Big_2xxSingle, Big (Double_Uns (Zlo))); + Lemma_Div_Commutation (T2, Double_Uns (Zlo)); + Lemma_Lo_Is_Ident (T2 / Zlo); + Lemma_Hi_Lo (Qu, Lo (T1 / Zlo), Lo (T2 / Zlo)); + Lemma_Substitution (Mult, Big (Double_Uns (Zlo)), + Big_2xxSingle * Big (T1 / Zlo) + Big (T2 / Zlo), + Big (Qu), Big (Ru)); + Lemma_Lt_Commutation (Ru, Double_Uns (Zlo)); + Lemma_Rev_Div_Definition + (Mult, Big (Double_Uns (Zlo)), Big (Qu), Big (Ru)); + pragma Assert (Double_Uns (Zlo) = abs Z); + Lemma_Abs_Commutation (Z); + Lemma_Abs_Div_Commutation (Big (X) * Big (Y), Big (Z)); + Lemma_Abs_Rem_Commutation (Big (X) * Big (Y), Big (Z)); + end Prove_Z_Low; + + -- Start of processing for Scaled_Divide + begin + if Z = 0 then + Raise_Error; + end if; + + Quot := Big (X) * Big (Y) / Big (Z); + Big_R := Big (X) * Big (Y) rem Big (Z); + if Round then + Big_Q := Round_Quotient (Big (X) * Big (Y), Big (Z), Quot, Big_R); + else + Big_Q := Quot; + end if; + -- First do the multiplication, giving the four digit dividend + Lemma_Abs_Mult_Commutation (Big (X), Big (Y)); + Lemma_Abs_Commutation (X); + Lemma_Abs_Commutation (Y); + Lemma_Mult_Decomposition (Mult, Xu, Yu, Xhi, Xlo, Yhi, Ylo); + T1 := Xlo * Ylo; D (4) := Lo (T1); D (3) := Hi (T1); + Lemma_Hi_Lo (T1, D (3), D (4)); + if Yhi /= 0 then T1 := Xlo * Yhi; + + Lemma_Hi_Lo (T1, Hi (T1), Lo (T1)); + T2 := D (3) + Lo (T1); + + Lemma_Mult_Distribution (Big_2xxSingle, + Big (Double_Uns (D (3))), + Big (Double_Uns (Lo (T1)))); + Lemma_Hi_Lo (T2, Hi (T2), Lo (T2)); + D (3) := Lo (T2); D (2) := Hi (T1) + Hi (T2); + pragma Assert (Double_Uns (Hi (T1)) + Hi (T2) = Double_Uns (D (2))); + Lemma_Add_Commutation (Double_Uns (Hi (T1)), Hi (T2)); + pragma Assert + (Big (Double_Uns (Hi (T1))) + Big (Double_Uns (Hi (T2))) = + Big (Double_Uns (D (2)))); + if Xhi /= 0 then T1 := Xhi * Ylo; + + Lemma_Hi_Lo (T1, Hi (T1), Lo (T1)); + T2 := D (3) + Lo (T1); + + Lemma_Hi_Lo (T2, Hi (T2), Lo (T2)); + D (3) := Lo (T2); T3 := D (2) + Hi (T1); + + Lemma_Add_Commutation (T3, Hi (T2)); + T3 := T3 + Hi (T2); - D (2) := Lo (T3); - D (1) := Hi (T3); + T2 := Double_Uns'(Xhi * Yhi); - T1 := (D (1) & D (2)) + Double_Uns'(Xhi * Yhi); - D (1) := Hi (T1); + Lemma_Hi_Lo (T2, Hi (T2), Lo (T2)); + Lemma_Add_Commutation (T3, Lo (T2)); + + T1 := T3 + Lo (T2); D (2) := Lo (T1); + Lemma_Hi_Lo (T1, Hi (T1), D (2)); + + D (1) := Hi (T2) + Hi (T1); + + pragma Assert + (Double_Uns (Hi (T2)) + Hi (T1) = Double_Uns (D (1))); + Lemma_Add_Commutation (Double_Uns (Hi (T2)), Hi (T1)); + pragma Assert + (Big (Double_Uns (Hi (T2))) + Big (Double_Uns (Hi (T1))) = + Big (Double_Uns (D (1)))); + + pragma Assert (Mult = + Big_2xxSingle + * Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (1))) + + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (2))) + + Big_2xxSingle * Big (Double_Uns (D (3))) + + Big (Double_Uns (D (4)))); + else D (1) := 0; end if; + pragma Assert (Mult = + Big_2xxSingle + * Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (1))) + + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (2))) + + Big_2xxSingle * Big (Double_Uns (D (3))) + + Big (Double_Uns (D (4)))); + else if Xhi /= 0 then T1 := Xhi * Ylo; + + Lemma_Hi_Lo (T1, Hi (T1), Lo (T1)); + T2 := D (3) + Lo (T1); + + Lemma_Mult_Distribution (Big_2xxSingle, + Big (Double_Uns (D (3))), + Big (Double_Uns (Lo (T1)))); + Lemma_Hi_Lo (T2, Hi (T2), Lo (T2)); + D (3) := Lo (T2); D (2) := Hi (T1) + Hi (T2); + pragma Assert + (Double_Uns (Hi (T1)) + Hi (T2) = Double_Uns (D (2))); + Lemma_Add_Commutation (Double_Uns (Hi (T1)), Hi (T2)); + pragma Assert + (Big (Double_Uns (Hi (T1))) + Big (Double_Uns (Hi (T2))) = + Big (Double_Uns (D (2)))); + pragma Assert (Mult = + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (2))) + + Big_2xxSingle * Big (Double_Uns (D (3))) + + Big (Double_Uns (D (4)))); else D (2) := 0; + + pragma Assert (Mult = + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (2))) + + Big_2xxSingle * Big (Double_Uns (D (3))) + + Big (Double_Uns (D (4)))); end if; D (1) := 0; end if; + pragma Assert (Mult = + Big_2xxSingle + * Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (1))) + + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (2))) + + Big_2xxSingle * Big (Double_Uns (D (3))) + + Big (Double_Uns (D (4)))); + -- Now it is time for the dreaded multiple precision division. First an -- easy case, check for the simple case of a one digit divisor. if Zhi = 0 then if D (1) /= 0 or else D (2) >= Zlo then + if D (1) > 0 then + pragma Assert + (Mult >= Big_2xxSingle * Big_2xxSingle * Big_2xxSingle + * Big (Double_Uns (D (1)))); + pragma Assert (Mult >= Big_2xxDouble * Big_2xxSingle); + Lemma_Ge_Commutation (2 ** Single_Size, Zu); + pragma Assert (Mult >= Big_2xxDouble * Big (Zu)); + else + Lemma_Ge_Commutation (Double_Uns (D (2)), Zu); + pragma Assert (Mult >= Big_2xxDouble * Big (Zu)); + end if; + + Prove_Overflow; Raise_Error; -- Here we are dividing at most three digits by one digit @@ -456,11 +2272,16 @@ package body System.Arith_Double is Qu := Lo (T1 / Zlo) & Lo (T2 / Zlo); Ru := T2 rem Zlo; + + Prove_Z_Low; end if; -- If divisor is double digit and dividend is too large, raise error elsif (D (1) & D (2)) >= Zu then + Lemma_Hi_Lo (D (1) & D (2), D (1), D (2)); + Lemma_Ge_Commutation (D (1) & D (2), Zu); + Prove_Overflow; Raise_Error; -- This is the complex case where we definitely have a double digit @@ -473,88 +2294,354 @@ package body System.Arith_Double is -- First normalize the divisor so that it has the leading bit on. -- We do this by finding the appropriate left shift amount. - Shift := Single_Size / 2; - Mask := Shift_Left (2 ** (Single_Size / 2) - 1, Shift); + Shift := Single_Size; + Mask := Single_Uns'Last; Scale := 0; - while Shift /= 0 loop - if (Hi (Zu) and Mask) = 0 then - Scale := Scale + Shift; - Zu := Shift_Left (Zu, Shift); - end if; - - Shift := Shift / 2; - Mask := Shift_Left (Mask, Shift); + Inter := 0; + pragma Assert (Big_2xx (Scale) = 1); + + while Shift > 1 loop + pragma Loop_Invariant (Scale <= Single_Size - Shift); + pragma Loop_Invariant ((Hi (Zu) and Mask) /= 0); + pragma Loop_Invariant + (Mask = Shift_Left (Single_Uns'Last, Single_Size - Shift)); + pragma Loop_Invariant (Zu = Shift_Left (abs Z, Scale)); + pragma Loop_Invariant (Big (Zu) = + Big (Double_Uns'(abs Z)) * Big_2xx (Scale)); + pragma Loop_Invariant (Inter in 0 .. Log_Single_Size - 1); + pragma Loop_Invariant (Shift = 2 ** (Log_Single_Size - Inter)); + pragma Loop_Invariant (Shift mod 2 = 0); + + declare + -- Local ghost variables + + Shift_Prev : constant Natural := Shift with Ghost; + Mask_Prev : constant Single_Uns := Mask with Ghost; + Zu_Prev : constant Double_Uns := Zu with Ghost; + + -- Local lemmas + + procedure Prove_Power + with + Ghost, + Pre => Inter in 0 .. Log_Single_Size - 1 + and then Shift = 2 ** (Log_Single_Size - Inter), + Post => Shift / 2 = 2 ** (Log_Single_Size - (Inter + 1)) + and then (Shift = 2 or (Shift / 2) mod 2 = 0); + + procedure Prove_Shift_Progress + with + Ghost, + Pre => Shift <= Single_Size / 2 + and then Shift_Prev = 2 * Shift + and then Mask_Prev = + Shift_Left (Single_Uns'Last, Single_Size - Shift_Prev) + and then Mask = + Shift_Left (Single_Uns'Last, + Single_Size - Shift_Prev + Shift), + Post => Mask_Prev = + Shift_Left (Single_Uns'Last, Single_Size - 2 * Shift) + and then Mask = + Shift_Left (Single_Uns'Last, Single_Size - Shift); + + procedure Prove_Shifting + with + Ghost, + Pre => Shift <= Single_Size / 2 + and then Zu = Shift_Left (Zu_Prev, Shift) + and then Mask_Prev = + Shift_Left (Single_Uns'Last, Single_Size - 2 * Shift) + and then Mask = + Shift_Left (Single_Uns'Last, Single_Size - Shift) + and then (Hi (Zu_Prev) and Mask_Prev and not Mask) /= 0, + Post => (Hi (Zu) and Mask) /= 0; + + ----------------------------- + -- Local lemma null bodies -- + ----------------------------- + + procedure Prove_Power is null; + procedure Prove_Shifting is null; + procedure Prove_Shift_Progress is null; + + begin + Prove_Power; + + Shift := Shift / 2; + + Inter := Inter + 1; + pragma Assert (Shift_Prev = 2 * Shift); + + Mask := Shift_Left (Mask, Shift); + + Lemma_Double_Shift + (Single_Uns'Last, Single_Size - Shift_Prev, Shift); + Prove_Shift_Progress; + + if (Hi (Zu) and Mask) = 0 then + Zu := Shift_Left (Zu, Shift); + + Prove_Shifting; + pragma Assert (Big (Zu_Prev) = + Big (Double_Uns'(abs Z)) * Big_2xx (Scale)); + Lemma_Shift_Without_Drop (Zu_Prev, Zu, Mask, Shift); + Lemma_Substitution + (Big (Zu), Big_2xx (Shift), + Big (Zu_Prev), Big (Double_Uns'(abs Z)) * Big_2xx (Scale), + 0); + Lemma_Powers_Of_2 (Shift, Scale); + Lemma_Substitution + (Big (Zu), Big (Double_Uns'(abs Z)), + Big_2xx (Shift) * Big_2xx (Scale), + Big_2xx (Shift + Scale), 0); + Lemma_Double_Shift (abs Z, Scale, Shift); + + Scale := Scale + Shift; + + pragma Assert (Zu = Shift_Left (abs Z, Scale)); + pragma Assert + (Big (Zu) = Big (Double_Uns'(abs Z)) * Big_2xx (Scale)); + end if; + + pragma Assert + (Big (Zu) = Big (Double_Uns'(abs Z)) * Big_2xx (Scale)); + end; end loop; Zhi := Hi (Zu); Zlo := Lo (Zu); - pragma Assert (Zhi /= 0); - -- We have Hi(Zu)/=0 before normalization. The sequence of Shift_Left - -- operations results in the leading bit of Zu being 1 by moving the - -- leftmost 1-bit in Zu to leading position, thus Zhi=Hi(Zu)/=0 here. + pragma Assert (Shift = 1); + pragma Assert (Mask = Shift_Left (Single_Uns'Last, Single_Size - 1)); + pragma Assert ((Zhi and Mask) /= 0); + pragma Assert (Zhi >= 2 ** (Single_Size - 1)); + pragma Assert (Big (Zu) = Big (Double_Uns'(abs Z)) * Big_2xx (Scale)); + -- We have Hi (Zu) /= 0 before normalization. The sequence of + -- Shift_Left operations results in the leading bit of Zu being 1 by + -- moving the leftmost 1-bit in Zu to leading position, thus + -- Zhi = Hi (Zu) >= 2 ** (Single_Size - 1) here. -- Note that when we scale up the dividend, it still fits in four -- digits, since we already tested for overflow, and scaling does -- not change the invariant that (D (1) & D (2)) < Zu. + Lemma_Lt_Commutation (D (1) & D (2), abs Z); + Lemma_Lt_Mult (Big (D (1) & D (2)), + Big (Double_Uns'(abs Z)), Big_2xx (Scale), + Big_2xxDouble); + T1 := Shift_Left (D (1) & D (2), Scale); + T2 := Shift_Left (Double_Uns (D (3)), Scale); + T3 := Shift_Left (Double_Uns (D (4)), Scale); + + Prove_Dividend_Scaling; + D (1) := Hi (T1); - T2 := Shift_Left (0 & D (3), Scale); D (2) := Lo (T1) or Hi (T2); - T3 := Shift_Left (0 & D (4), Scale); D (3) := Lo (T2) or Hi (T3); D (4) := Lo (T3); - -- Loop to compute quotient digits, runs twice for Qd(1) and Qd(2) - - for J in 0 .. 1 loop - - -- Compute next quotient digit. We have to divide three digits by - -- two digits. We estimate the quotient by dividing the leading - -- two digits by the leading digit. Given the scaling we did above - -- which ensured the first bit of the divisor is set, this gives - -- an estimate of the quotient that is at most two too high. - - Qd (J + 1) := (if D (J + 1) = Zhi - then 2 ** Single_Size - 1 - else Lo ((D (J + 1) & D (J + 2)) / Zhi)); - - -- Compute amount to subtract - - T1 := Qd (J + 1) * Zlo; - T2 := Qd (J + 1) * Zhi; - S3 := Lo (T1); - T1 := Hi (T1) + Lo (T2); - S2 := Lo (T1); - S1 := Hi (T1) + Hi (T2); - - -- Adjust quotient digit if it was too high - - -- We use the version of the algorithm in the 2nd Edition of - -- "The Art of Computer Programming". This had a bug not - -- discovered till 1995, see Vol 2 errata: - -- http://www-cs-faculty.stanford.edu/~uno/err2-2e.ps.gz. - -- Under rare circumstances the expression in the test could - -- overflow. This version was further corrected in 2005, see - -- Vol 2 errata: - -- http://www-cs-faculty.stanford.edu/~uno/all2-pre.ps.gz. - -- This implementation is not impacted by these bugs, due to the - -- use of a word-size comparison done in function Le3 instead of - -- a comparison on two-word integer quantities in the original - -- algorithm. - - loop - exit when Le3 (S1, S2, S3, D (J + 1), D (J + 2), D (J + 3)); - Qd (J + 1) := Qd (J + 1) - 1; - Sub3 (S1, S2, S3, 0, Zhi, Zlo); + pragma Assert (Mult * Big_2xx (Scale) = + Big_2xxSingle + * Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (1))) + + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (2))) + + Big_2xxSingle * Big (Double_Uns (D (3))) + + Big (Double_Uns (D (4)))); + Lemma_Substitution (Big_2xxDouble * Big (Zu), Big_2xxDouble, Big (Zu), + Big (Double_Uns'(abs Z)) * Big_2xx (Scale), 0); + Lemma_Lt_Mult (Mult, Big_2xxDouble * Big (Double_Uns'(abs Z)), + Big_2xx (Scale), Big_2xxDouble * Big (Zu)); + Lemma_Div_Lt (Mult * Big_2xx (Scale), Big (Zu), Big_2xxDouble); + Lemma_Substitution + (Mult * Big_2xx (Scale), Big_2xxSingle, + Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (1))) + + Big_2xxSingle * Big (Double_Uns (D (2))) + + Big (Double_Uns (D (3))), + Big3 (D (1), D (2), D (3)), + Big (Double_Uns (D (4)))); + + -- Loop to compute quotient digits, runs twice for Qd (1) and Qd (2) + + declare + -- Local lemmas + + procedure Prove_First_Iteration (X1, X2, X3, X4 : Single_Uns) + with + Ghost, + Pre => X1 = 0, + Post => + Big_2xxSingle * Big3 (X1, X2, X3) + Big (Double_Uns (X4)) + = Big3 (X2, X3, X4); + + --------------------------- + -- Prove_First_Iteration -- + --------------------------- + + procedure Prove_First_Iteration (X1, X2, X3, X4 : Single_Uns) is + null; + + -- Local ghost variables + + Qd1 : Single_Uns := 0 with Ghost; + D123 : constant Big_Integer := Big3 (D (1), D (2), D (3)) + with Ghost; + + begin + for J in 1 .. 2 loop + Lemma_Hi_Lo (D (J) & D (J + 1), D (J), D (J + 1)); + pragma Assert (Big (D (J) & D (J + 1)) < Big (Zu)); + + -- Compute next quotient digit. We have to divide three digits + -- by two digits. We estimate the quotient by dividing the + -- leading two digits by the leading digit. Given the scaling + -- we did above which ensured the first bit of the divisor is + -- set, this gives an estimate of the quotient that is at most + -- two too high. + + if D (J) > Zhi then + Lemma_Lt_Commutation (Zu, D (J) & D (J + 1)); + pragma Assert (False); + + elsif D (J) = Zhi then + Qd (J) := Single_Uns'Last; + + Lemma_Gt_Mult (Big (Zu), Big (D (J) & D (J + 1)) + 1, + Big_2xxSingle, + Big3 (D (J), D (J + 1), D (J + 2))); + Lemma_Div_Lt + (Big3 (D (J), D (J + 1), D (J + 2)), + Big_2xxSingle, Big (Zu)); + + else + Qd (J) := Lo ((D (J) & D (J + 1)) / Zhi); + + Prove_Qd_Calculation_Part_1 (J); + end if; + + Lemma_Gt_Mult + (Big (Double_Uns (Qd (J))), + Big3 (D (J), D (J + 1), D (J + 2)) / Big (Zu), + Big (Zu), Big3 (D (J), D (J + 1), D (J + 2)) - Big (Zu)); + + -- Compute amount to subtract + + T1 := Qd (J) * Zlo; + T2 := Qd (J) * Zhi; + S3 := Lo (T1); + T3 := Hi (T1) + Lo (T2); + S2 := Lo (T3); + S1 := Hi (T3) + Hi (T2); + + Prove_Multiplication (Qd (J)); + + -- Adjust quotient digit if it was too high + + -- We use the version of the algorithm in the 2nd Edition + -- of "The Art of Computer Programming". This had a bug not + -- discovered till 1995, see Vol 2 errata: + -- http://www-cs-faculty.stanford.edu/~uno/err2-2e.ps.gz. + -- Under rare circumstances the expression in the test could + -- overflow. This version was further corrected in 2005, see + -- Vol 2 errata: + -- http://www-cs-faculty.stanford.edu/~uno/all2-pre.ps.gz. + -- This implementation is not impacted by these bugs, due + -- to the use of a word-size comparison done in function Le3 + -- instead of a comparison on two-word integer quantities in + -- the original algorithm. + + Lemma_Hi_Lo_3 (Zu, Zhi, Zlo); + + while not Le3 (S1, S2, S3, D (J), D (J + 1), D (J + 2)) loop + pragma Loop_Invariant (Qd (J)'Initialized); + pragma Loop_Invariant + (Big3 (S1, S2, S3) = Big (Double_Uns (Qd (J))) * Big (Zu)); + pragma Assert (Big3 (S1, S2, S3) > 0); + if Qd (J) = 0 then + pragma Assert (Big3 (S1, S2, S3) = 0); + pragma Assert (False); + end if; + Lemma_Ge_Commutation (Double_Uns (Qd (J)), 1); + Lemma_Ge_Mult + (Big (Double_Uns (Qd (J))), 1, Big (Zu), Big (Zu)); + + Sub3 (S1, S2, S3, 0, Zhi, Zlo); + + pragma Assert + (Big3 (S1, S2, S3) > + Big3 (D (J), D (J + 1), D (J + 2)) - Big (Zu)); + Lemma_Subtract_Commutation (Double_Uns (Qd (J)), 1); + Lemma_Substitution (Big3 (S1, S2, S3), Big (Zu), + Big (Double_Uns (Qd (J))) - 1, + Big (Double_Uns (Qd (J) - 1)), 0); + + Qd (J) := Qd (J) - 1; + + pragma Assert + (Big3 (S1, S2, S3) = Big (Double_Uns (Qd (J))) * Big (Zu)); + end loop; + + -- Now subtract S1&S2&S3 from D1&D2&D3 ready for next step + + pragma Assert + (Big3 (S1, S2, S3) = Big (Double_Uns (Qd (J))) * Big (Zu)); + pragma Assert (Big3 (S1, S2, S3) > + Big3 (D (J), D (J + 1), D (J + 2)) - Big (Zu)); + Inline_Le3 (S1, S2, S3, D (J), D (J + 1), D (J + 2)); + + Sub3 (D (J), D (J + 1), D (J + 2), S1, S2, S3); + + pragma Assert (Big3 (D (J), D (J + 1), D (J + 2)) < Big (Zu)); + if D (J) > 0 then + pragma Assert + (Big_2xxSingle * Big_2xxSingle = Big_2xxDouble); + pragma Assert (Big3 (D (J), D (J + 1), D (J + 2)) = + Big_2xxSingle + * Big_2xxSingle * Big (Double_Uns (D (J))) + + Big_2xxSingle * Big (Double_Uns (D (J + 1))) + + Big (Double_Uns (D (J + 2)))); + pragma Assert (Big3 (D (J), D (J + 1), D (J + 2)) = + Big_2xxDouble * Big (Double_Uns (D (J))) + + Big_2xxSingle * Big (Double_Uns (D (J + 1))) + + Big (Double_Uns (D (J + 2)))); + pragma Assert (Big3 (D (J), D (J + 1), D (J + 2)) >= + Big_2xxDouble * Big (Double_Uns (D (J)))); + Lemma_Ge_Commutation (Double_Uns (D (J)), Double_Uns'(1)); + pragma Assert + (Big3 (D (J), D (J + 1), D (J + 2)) >= Big_2xxDouble); + pragma Assert (False); + end if; + + if J = 1 then + Qd1 := Qd (1); + Lemma_Substitution + (Mult * Big_2xx (Scale), Big_2xxSingle, D123, + Big3 (D (1), D (2), D (3)) + Big3 (S1, S2, S3), + Big (Double_Uns (D (4)))); + Prove_First_Iteration (D (1), D (2), D (3), D (4)); + Lemma_Substitution (Mult * Big_2xx (Scale), Big_2xxSingle, + Big3 (S1, S2, S3), + Big (Double_Uns (Qd1)) * Big (Zu), + Big3 (D (2), D (3), D (4))); + else + pragma Assert (Qd1 = Qd (1)); + pragma Assert + (Big_2xxSingle * Big_2xxSingle * Big (Double_Uns (D (2))) + = 0); + pragma Assert + (Mult * Big_2xx (Scale) = + Big_2xxSingle * Big (Double_Uns (Qd (1))) * Big (Zu) + + Big3 (S1, S2, S3) + + Big3 (D (2), D (3), D (4))); + pragma Assert + (Mult * Big_2xx (Scale) = + Big_2xxSingle * Big (Double_Uns (Qd (1))) * Big (Zu) + + Big (Double_Uns (Qd (2))) * Big (Zu) + + Big_2xxSingle * Big (Double_Uns (D (3))) + + Big (Double_Uns (D (4)))); + end if; end loop; - - -- Now subtract S1&S2&S3 from D1&D2&D3 ready for next step - - Sub3 (D (J + 1), D (J + 2), D (J + 3), S1, S2, S3); - end loop; + end; -- The two quotient digits are now set, and the remainder of the -- scaled division is in D3&D4. To get the remainder for the @@ -564,38 +2651,81 @@ package body System.Arith_Double is -- for rounding below. Qu := Qd (1) & Qd (2); - Ru := Shift_Right (D (3) & D (4), Scale); + Ru := D (3) & D (4); + + pragma Assert + (Mult * Big_2xx (Scale) = + Big_2xxSingle * Big (Double_Uns (Qd (1))) * Big (Zu) + + Big (Double_Uns (Qd (2))) * Big (Zu) + + Big_2xxSingle * Big (Double_Uns (D (3))) + + Big (Double_Uns (D (4)))); + Lemma_Hi_Lo (Qu, Qd (1), Qd (2)); + Lemma_Hi_Lo (Ru, D (3), D (4)); + Lemma_Substitution + (Mult * Big_2xx (Scale), Big (Zu), + Big_2xxSingle * Big (Double_Uns (Qd (1))) + + Big (Double_Uns (Qd (2))), + Big (Qu), Big (Ru)); + Prove_Rescaling; + + Ru := Shift_Right (Ru, Scale); + + Lemma_Shift_Right (Zu, Scale); + Zu := Shift_Right (Zu, Scale); + + Lemma_Simplify (Big (Double_Uns'(abs Z)), Big_2xx (Scale)); end if; + pragma Assert (Big (Ru) = abs Big_R); + pragma Assert (Big (Qu) = abs Quot); + pragma Assert (Big (Zu) = Big (Double_Uns'(abs Z))); + -- Deal with rounding case - if Round and then Ru > (Zu - Double_Uns'(1)) / Double_Uns'(2) then + if Round then + Prove_Rounding_Case; - -- Protect against wrapping around when rounding, by signaling - -- an overflow when the quotient is too large. + if Ru > (Zu - Double_Uns'(1)) / Double_Uns'(2) then + pragma Assert (abs Big_Q = Big (Qu) + 1); - if Qu = Double_Uns'Last then - Raise_Error; - end if; + -- Protect against wrapping around when rounding, by signaling + -- an overflow when the quotient is too large. + + if Qu = Double_Uns'Last then + Prove_Q_Too_Big; + Raise_Error; + end if; + + Lemma_Add_One (Qu); - Qu := Qu + Double_Uns'(1); + Qu := Qu + Double_Uns'(1); + end if; end if; + pragma Assert (Big (Qu) = abs Big_Q); + -- Set final signs (RM 4.5.5(27-30)) -- Case of dividend (X * Y) sign positive if (X >= 0 and then Y >= 0) or else (X < 0 and then Y < 0) then + Prove_Positive_Dividend; + R := To_Pos_Int (Ru); Q := (if Z > 0 then To_Pos_Int (Qu) else To_Neg_Int (Qu)); -- Case of dividend (X * Y) sign negative else + Prove_Negative_Dividend; + R := To_Neg_Int (Ru); Q := (if Z > 0 then To_Neg_Int (Qu) else To_Pos_Int (Qu)); end if; + + Prove_Sign_R; + Prove_Signs; end Scaled_Divide; ---------- @@ -603,23 +2733,178 @@ package body System.Arith_Double is ---------- procedure Sub3 (X1, X2, X3 : in out Single_Uns; Y1, Y2, Y3 : Single_Uns) is + + -- Local ghost variables + + XX1 : constant Single_Uns := X1 with Ghost; + XX2 : constant Single_Uns := X2 with Ghost; + XX3 : constant Single_Uns := X3 with Ghost; + + -- Local lemmas + + procedure Lemma_Add3_No_Carry (X1, X2, X3, Y1, Y2, Y3 : Single_Uns) + with + Ghost, + Pre => X1 <= Single_Uns'Last - Y1 + and then X2 <= Single_Uns'Last - Y2 + and then X3 <= Single_Uns'Last - Y3, + Post => Big3 (X1 + Y1, X2 + Y2, X3 + Y3) + = Big3 (X1, X2, X3) + Big3 (Y1, Y2, Y3); + + procedure Lemma_Ge_Expand (X1, X2, X3, Y1, Y2, Y3 : Single_Uns) + with + Ghost, + Pre => Big3 (X1, X2, X3) >= Big3 (Y1, Y2, Y3), + Post => X1 > Y1 + or else (X1 = Y1 and then X2 > Y2) + or else (X1 = Y1 and then X2 = Y2 and then X3 >= Y3); + + procedure Lemma_Sub3_No_Carry (X1, X2, X3, Y1, Y2, Y3 : Single_Uns) + with + Ghost, + Pre => X1 >= Y1 and then X2 >= Y2 and then X3 >= Y3, + Post => Big3 (X1 - Y1, X2 - Y2, X3 - Y3) + = Big3 (X1, X2, X3) - Big3 (Y1, Y2, Y3); + + procedure Lemma_Sub3_With_Carry2 (X1, X2, X3, Y2 : Single_Uns) + with + Ghost, + Pre => X2 < Y2, + Post => Big3 (X1, X2 - Y2, X3) + = Big3 (X1, X2, X3) + Big3 (1, 0, 0) - Big3 (0, Y2, 0); + + procedure Lemma_Sub3_With_Carry3 (X1, X2, X3, Y3 : Single_Uns) + with + Ghost, + Pre => X3 < Y3, + Post => Big3 (X1, X2, X3 - Y3) + = Big3 (X1, X2, X3) + Big3 (0, 1, 0) - Big3 (0, 0, Y3); + + ------------------------- + -- Lemma_Add3_No_Carry -- + ------------------------- + + procedure Lemma_Add3_No_Carry (X1, X2, X3, Y1, Y2, Y3 : Single_Uns) is + begin + Lemma_Add_Commutation (Double_Uns (X1), Y1); + Lemma_Add_Commutation (Double_Uns (X2), Y2); + Lemma_Add_Commutation (Double_Uns (X3), Y3); + pragma Assert (Double_Uns (Single_Uns'(X1 + Y1)) + = Double_Uns (X1) + Double_Uns (Y1)); + pragma Assert (Double_Uns (Single_Uns'(X2 + Y2)) + = Double_Uns (X2) + Double_Uns (Y2)); + pragma Assert (Double_Uns (Single_Uns'(X3 + Y3)) + = Double_Uns (X3) + Double_Uns (Y3)); + end Lemma_Add3_No_Carry; + + --------------------- + -- Lemma_Ge_Expand -- + --------------------- + + procedure Lemma_Ge_Expand (X1, X2, X3, Y1, Y2, Y3 : Single_Uns) is null; + + ------------------------- + -- Lemma_Sub3_No_Carry -- + ------------------------- + + procedure Lemma_Sub3_No_Carry (X1, X2, X3, Y1, Y2, Y3 : Single_Uns) is + begin + Lemma_Subtract_Commutation (Double_Uns (X1), Double_Uns (Y1)); + Lemma_Subtract_Commutation (Double_Uns (X2), Double_Uns (Y2)); + Lemma_Subtract_Commutation (Double_Uns (X3), Double_Uns (Y3)); + end Lemma_Sub3_No_Carry; + + ---------------------------- + -- Lemma_Sub3_With_Carry2 -- + ---------------------------- + + procedure Lemma_Sub3_With_Carry2 (X1, X2, X3, Y2 : Single_Uns) is + pragma Unreferenced (X1, X3); + begin + Lemma_Add_Commutation + (Double_Uns'(2 ** Single_Size) - Double_Uns (Y2), X2); + Lemma_Subtract_Commutation + (Double_Uns'(2 ** Single_Size), Double_Uns (Y2)); + end Lemma_Sub3_With_Carry2; + + ---------------------------- + -- Lemma_Sub3_With_Carry3 -- + ---------------------------- + + procedure Lemma_Sub3_With_Carry3 (X1, X2, X3, Y3 : Single_Uns) is + pragma Unreferenced (X1, X2); + begin + Lemma_Add_Commutation + (Double_Uns'(2 ** Single_Size) - Double_Uns (Y3), X3); + Lemma_Subtract_Commutation + (Double_Uns'(2 ** Single_Size), Double_Uns (Y3)); + end Lemma_Sub3_With_Carry3; + + -- Start of processing for Sub3 + begin + Lemma_Ge_Expand (X1, X2, X3, Y1, Y2, Y3); + if Y3 > X3 then if X2 = 0 then + pragma Assert (X1 >= 1); + Lemma_Sub3_No_Carry (X1, X2, X3, 1, 0, 0); + X1 := X1 - 1; + + pragma Assert + (Big3 (X1, X2, X3) = Big3 (XX1, XX2, XX3) - Big3 (1, 0, 0)); + pragma Assert + (Big3 (X1, X2, X3) = Big3 (XX1, XX2, XX3) + - Big3 (0, Single_Uns'Last, 0) - Big3 (0, 1, 0)); + Lemma_Add3_No_Carry (X1, X2, X3, 0, Single_Uns'Last, 0); + else + Lemma_Sub3_No_Carry (X1, X2, X3, 0, 1, 0); end if; X2 := X2 - 1; + + pragma Assert + (Big3 (X1, X2, X3) = Big3 (XX1, XX2, XX3) - Big3 (0, 1, 0)); + Lemma_Sub3_With_Carry3 (X1, X2, X3, Y3); + else + Lemma_Sub3_No_Carry (X1, X2, X3, 0, 0, Y3); end if; X3 := X3 - Y3; + pragma Assert + (Big3 (X1, X2, X3) = Big3 (XX1, XX2, XX3) - Big3 (0, 0, Y3)); + if Y2 > X2 then + pragma Assert (X1 >= 1); + Lemma_Sub3_No_Carry (X1, X2, X3, 1, 0, 0); + X1 := X1 - 1; + + pragma Assert + (Big3 (X1, X2, X3) = Big3 (XX1, XX2, XX3) + - Big3 (0, 0, Y3) - Big3 (1, 0, 0)); + Lemma_Sub3_With_Carry2 (X1, X2, X3, Y2); + else + Lemma_Sub3_No_Carry (X1, X2, X3, 0, Y2, 0); end if; X2 := X2 - Y2; + + pragma Assert + (Big3 (X1, X2, X3) = Big3 (XX1, XX2, XX3) - Big3 (0, Y2, Y3)); + pragma Assert (X1 >= Y1); + Lemma_Sub3_No_Carry (X1, Y2, X3, Y1, 0, 0); + X1 := X1 - Y1; + + pragma Assert + (Big3 (X1, X2, X3) = Big3 (XX1, XX2, XX3) + - Big3 (0, Y2, Y3) - Big3 (Y1, 0, 0)); + Lemma_Add3_No_Carry (0, Y2, Y3, Y1, 0, 0); + pragma Assert + (Big3 (X1, X2, X3) = Big3 (XX1, XX2, XX3) - Big3 (Y1, Y2, Y3)); end Sub3; ------------------------------- @@ -629,18 +2914,126 @@ package body System.Arith_Double is function Subtract_With_Ovflo_Check (X, Y : Double_Int) return Double_Int is R : constant Double_Int := To_Int (To_Uns (X) - To_Uns (Y)); + -- Local lemmas + + procedure Prove_Negative_X + with + Ghost, + Pre => X < 0 and then (Y <= 0 or else R < 0), + Post => R = X - Y; + + procedure Prove_Non_Negative_X + with + Ghost, + Pre => X >= 0 and then (Y > 0 or else R >= 0), + Post => R = X - Y; + + procedure Prove_Overflow_Case + with + Ghost, + Pre => + (if X >= 0 then Y <= 0 and then R < 0 + else Y > 0 and then R >= 0), + Post => not In_Double_Int_Range (Big (X) - Big (Y)); + + ---------------------- + -- Prove_Negative_X -- + ---------------------- + + procedure Prove_Negative_X is + begin + if X = Double_Int'First then + if Y = Double_Int'First or else Y > 0 then + null; + else + pragma Assert + (To_Uns (X) - To_Uns (Y) = + 2 ** (Double_Size - 1) + Double_Uns (-Y)); + end if; + + elsif Y >= 0 or else Y = Double_Int'First then + null; + + else + pragma Assert + (To_Uns (X) - To_Uns (Y) = -Double_Uns (-X) + Double_Uns (-Y)); + end if; + end Prove_Negative_X; + + -------------------------- + -- Prove_Non_Negative_X -- + -------------------------- + + procedure Prove_Non_Negative_X is + begin + if Y > 0 then + declare + Ru : constant Double_Uns := To_Uns (X) - To_Uns (Y); + begin + pragma Assert (Ru = Double_Uns (X) - Double_Uns (Y)); + if Ru < 2 ** (Double_Size - 1) then -- R >= 0 + Lemma_Subtract_Double_Uns (X => Y, Y => X); + pragma Assert (Ru = Double_Uns (X - Y)); + + elsif Ru = 2 ** (Double_Size - 1) then + pragma Assert (Double_Uns (Y) < 2 ** (Double_Size - 1)); + pragma Assert (False); + + else + pragma Assert + (R = -Double_Int (-(Double_Uns (X) - Double_Uns (Y)))); + pragma Assert + (R = -Double_Int (-Double_Uns (X) + Double_Uns (Y))); + pragma Assert + (R = -Double_Int (Double_Uns (Y) - Double_Uns (X))); + end if; + end; + + elsif Y = Double_Int'First then + pragma Assert + (To_Uns (X) - To_Uns (Y) = + Double_Uns (X) - 2 ** (Double_Size - 1)); + pragma Assert (False); + + else + pragma Assert + (To_Uns (X) - To_Uns (Y) = Double_Uns (X) + Double_Uns (-Y)); + end if; + end Prove_Non_Negative_X; + + ------------------------- + -- Prove_Overflow_Case -- + ------------------------- + + procedure Prove_Overflow_Case is + begin + if X >= 0 and then Y /= Double_Int'First then + pragma Assert + (To_Uns (X) - To_Uns (Y) = Double_Uns (X) + Double_Uns (-Y)); + + elsif X < 0 and then X /= Double_Int'First then + pragma Assert + (To_Uns (X) - To_Uns (Y) = -Double_Uns (-X) - Double_Uns (Y)); + end if; + end Prove_Overflow_Case; + + -- Start of processing for Subtract_With_Ovflo_Check + begin if X >= 0 then if Y > 0 or else R >= 0 then + Prove_Non_Negative_X; return R; end if; else -- X < 0 if Y <= 0 or else R < 0 then + Prove_Negative_X; return R; end if; end if; + Prove_Overflow_Case; Raise_Error; end Subtract_With_Ovflo_Check; diff --git a/gcc/ada/libgnat/s-aridou.ads b/gcc/ada/libgnat/s-aridou.ads index 0df27ca..815865f 100644 --- a/gcc/ada/libgnat/s-aridou.ads +++ b/gcc/ada/libgnat/s-aridou.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -33,6 +33,9 @@ -- signed integer values in cases where either overflow checking is required, -- or intermediate results are longer than the result type. +with Ada.Numerics.Big_Numbers.Big_Integers_Ghost; +use Ada.Numerics.Big_Numbers.Big_Integers_Ghost; + generic type Double_Int is range <>; @@ -50,27 +53,93 @@ generic with function Shift_Left (A : Single_Uns; B : Natural) return Single_Uns is <>; -package System.Arith_Double is - pragma Pure; +package System.Arith_Double + with Pure, SPARK_Mode +is + -- Preconditions in this unit are meant for analysis only, not for run-time + -- checking, so that the expected exceptions are raised. This is enforced + -- by setting the corresponding assertion policy to Ignore. Postconditions + -- and contract cases should not be executed at runtime as well, in order + -- not to slow down the execution of these functions. + + pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + + package Signed_Conversion is new Signed_Conversions (Int => Double_Int); + + function Big (Arg : Double_Int) return Big_Integer is + (Signed_Conversion.To_Big_Integer (Arg)) + with Ghost; + + package Unsigned_Conversion is new Unsigned_Conversions (Int => Double_Uns); - function Add_With_Ovflo_Check (X, Y : Double_Int) return Double_Int; + function Big (Arg : Double_Uns) return Big_Integer is + (Unsigned_Conversion.To_Big_Integer (Arg)) + with Ghost; + + function In_Double_Int_Range (Arg : Big_Integer) return Boolean is + (In_Range (Arg, Big (Double_Int'First), Big (Double_Int'Last))) + with Ghost; + + function Add_With_Ovflo_Check (X, Y : Double_Int) return Double_Int + with + Pre => In_Double_Int_Range (Big (X) + Big (Y)), + Post => Add_With_Ovflo_Check'Result = X + Y; -- Raises Constraint_Error if sum of operands overflows Double_Int, -- otherwise returns the signed integer sum. - function Subtract_With_Ovflo_Check (X, Y : Double_Int) return Double_Int; + function Subtract_With_Ovflo_Check (X, Y : Double_Int) return Double_Int + with + Pre => In_Double_Int_Range (Big (X) - Big (Y)), + Post => Subtract_With_Ovflo_Check'Result = X - Y; -- Raises Constraint_Error if difference of operands overflows Double_Int, -- otherwise returns the signed integer difference. - function Multiply_With_Ovflo_Check (X, Y : Double_Int) return Double_Int; + function Multiply_With_Ovflo_Check (X, Y : Double_Int) return Double_Int + with + Pre => In_Double_Int_Range (Big (X) * Big (Y)), + Post => Multiply_With_Ovflo_Check'Result = X * Y; pragma Convention (C, Multiply_With_Ovflo_Check); -- Raises Constraint_Error if product of operands overflows Double_Int, -- otherwise returns the signed integer product. Gigi may also call this -- routine directly. + function Same_Sign (X, Y : Big_Integer) return Boolean is + (X = Big (Double_Int'(0)) + or else Y = Big (Double_Int'(0)) + or else (X < Big (Double_Int'(0))) = (Y < Big (Double_Int'(0)))) + with Ghost; + + function Round_Quotient (X, Y, Q, R : Big_Integer) return Big_Integer is + (if abs R > (abs Y - Big (Double_Int'(1))) / Big (Double_Int'(2)) then + (if Same_Sign (X, Y) then Q + Big (Double_Int'(1)) + else Q - Big (Double_Int'(1))) + else + Q) + with + Ghost, + Pre => Y /= 0 and then Q = X / Y and then R = X rem Y; + procedure Scaled_Divide (X, Y, Z : Double_Int; Q, R : out Double_Int; - Round : Boolean); + Round : Boolean) + with + Pre => Z /= 0 + and then In_Double_Int_Range + (if Round then Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), + Big (X) * Big (Y) rem Big (Z)) + else Big (X) * Big (Y) / Big (Z)), + Post => Big (R) = Big (X) * Big (Y) rem Big (Z) + and then + (if Round then + Big (Q) = Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), Big (R)) + else + Big (Q) = Big (X) * Big (Y) / Big (Z)); -- Performs the division of (X * Y) / Z, storing the quotient in Q -- and the remainder in R. Constraint_Error is raised if Z is zero, -- or if the quotient does not fit in Double_Int. Round indicates if @@ -82,7 +151,22 @@ package System.Arith_Double is procedure Double_Divide (X, Y, Z : Double_Int; Q, R : out Double_Int; - Round : Boolean); + Round : Boolean) + with + Pre => Y /= 0 + and then Z /= 0 + and then In_Double_Int_Range + (if Round then Round_Quotient (Big (X), Big (Y) * Big (Z), + Big (X) / (Big (Y) * Big (Z)), + Big (X) rem (Big (Y) * Big (Z))) + else Big (X) / (Big (Y) * Big (Z))), + Post => Big (R) = Big (X) rem (Big (Y) * Big (Z)) + and then + (if Round then + Big (Q) = Round_Quotient (Big (X), Big (Y) * Big (Z), + Big (X) / (Big (Y) * Big (Z)), Big (R)) + else + Big (Q) = Big (X) / (Big (Y) * Big (Z))); -- Performs the division X / (Y * Z), storing the quotient in Q and -- the remainder in R. Constraint_Error is raised if Y or Z is zero, -- or if the quotient does not fit in Double_Int. Round indicates if the diff --git a/gcc/ada/libgnat/s-arit128.adb b/gcc/ada/libgnat/s-arit128.adb index 951e357..3bd4bb4 100644 --- a/gcc/ada/libgnat/s-arit128.adb +++ b/gcc/ada/libgnat/s-arit128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,7 +31,9 @@ with System.Arith_Double; -package body System.Arith_128 is +package body System.Arith_128 + with SPARK_Mode +is subtype Uns128 is Interfaces.Unsigned_128; subtype Uns64 is Interfaces.Unsigned_64; diff --git a/gcc/ada/libgnat/s-arit128.ads b/gcc/ada/libgnat/s-arit128.ads index fa6fedc..fe043a9 100644 --- a/gcc/ada/libgnat/s-arit128.ads +++ b/gcc/ada/libgnat/s-arit128.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -36,31 +36,102 @@ pragma Restrictions (No_Elaboration_Code); -- Allow direct call from gigi generated code +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced +-- by setting the corresponding assertion policy to Ignore. Postconditions +-- and contract cases should not be executed at runtime as well, in order +-- not to slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + +with Ada.Numerics.Big_Numbers.Big_Integers_Ghost; with Interfaces; -package System.Arith_128 is - pragma Pure; +package System.Arith_128 + with Pure, SPARK_Mode +is + use type Ada.Numerics.Big_Numbers.Big_Integers_Ghost.Big_Integer; + use type Interfaces.Integer_128; subtype Int128 is Interfaces.Integer_128; - function Add_With_Ovflo_Check128 (X, Y : Int128) return Int128; + subtype Big_Integer is + Ada.Numerics.Big_Numbers.Big_Integers_Ghost.Big_Integer + with Ghost; + + package Signed_Conversion is new + Ada.Numerics.Big_Numbers.Big_Integers_Ghost.Signed_Conversions + (Int => Int128); + + function Big (Arg : Int128) return Big_Integer is + (Signed_Conversion.To_Big_Integer (Arg)) + with Ghost; + + function In_Int128_Range (Arg : Big_Integer) return Boolean is + (Ada.Numerics.Big_Numbers.Big_Integers_Ghost.In_Range + (Arg, Big (Int128'First), Big (Int128'Last))) + with Ghost; + + function Add_With_Ovflo_Check128 (X, Y : Int128) return Int128 + with + Pre => In_Int128_Range (Big (X) + Big (Y)), + Post => Add_With_Ovflo_Check128'Result = X + Y; -- Raises Constraint_Error if sum of operands overflows 128 bits, -- otherwise returns the 128-bit signed integer sum. - function Subtract_With_Ovflo_Check128 (X, Y : Int128) return Int128; + function Subtract_With_Ovflo_Check128 (X, Y : Int128) return Int128 + with + Pre => In_Int128_Range (Big (X) - Big (Y)), + Post => Subtract_With_Ovflo_Check128'Result = X - Y; -- Raises Constraint_Error if difference of operands overflows 128 -- bits, otherwise returns the 128-bit signed integer difference. - function Multiply_With_Ovflo_Check128 (X, Y : Int128) return Int128; + function Multiply_With_Ovflo_Check128 (X, Y : Int128) return Int128 + with + Pre => In_Int128_Range (Big (X) * Big (Y)), + Post => Multiply_With_Ovflo_Check128'Result = X * Y; pragma Export (C, Multiply_With_Ovflo_Check128, "__gnat_mulv128"); -- Raises Constraint_Error if product of operands overflows 128 -- bits, otherwise returns the 128-bit signed integer product. -- Gigi may also call this routine directly. + function Same_Sign (X, Y : Big_Integer) return Boolean is + (X = Big (Int128'(0)) + or else Y = Big (Int128'(0)) + or else (X < Big (Int128'(0))) = (Y < Big (Int128'(0)))) + with Ghost; + + function Round_Quotient (X, Y, Q, R : Big_Integer) return Big_Integer is + (if abs R > (abs Y - Big (Int128'(1))) / Big (Int128'(2)) then + (if Same_Sign (X, Y) then Q + Big (Int128'(1)) + else Q - Big (Int128'(1))) + else + Q) + with + Ghost, + Pre => Y /= 0 and then Q = X / Y and then R = X rem Y; + procedure Scaled_Divide128 (X, Y, Z : Int128; Q, R : out Int128; - Round : Boolean); + Round : Boolean) + with + Pre => Z /= 0 + and then In_Int128_Range + (if Round then Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), + Big (X) * Big (Y) rem Big (Z)) + else Big (X) * Big (Y) / Big (Z)), + Post => Big (R) = Big (X) * Big (Y) rem Big (Z) + and then + (if Round then + Big (Q) = Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), Big (R)) + else + Big (Q) = Big (X) * Big (Y) / Big (Z)); -- Performs the division of (X * Y) / Z, storing the quotient in Q -- and the remainder in R. Constraint_Error is raised if Z is zero, -- or if the quotient does not fit in 128 bits. Round indicates if @@ -72,7 +143,22 @@ package System.Arith_128 is procedure Double_Divide128 (X, Y, Z : Int128; Q, R : out Int128; - Round : Boolean); + Round : Boolean) + with + Pre => Y /= 0 + and then Z /= 0 + and then In_Int128_Range + (if Round then Round_Quotient (Big (X), Big (Y) * Big (Z), + Big (X) / (Big (Y) * Big (Z)), + Big (X) rem (Big (Y) * Big (Z))) + else Big (X) / (Big (Y) * Big (Z))), + Post => Big (R) = Big (X) rem (Big (Y) * Big (Z)) + and then + (if Round then + Big (Q) = Round_Quotient (Big (X), Big (Y) * Big (Z), + Big (X) / (Big (Y) * Big (Z)), Big (R)) + else + Big (Q) = Big (X) / (Big (Y) * Big (Z))); -- Performs the division X / (Y * Z), storing the quotient in Q and -- the remainder in R. Constraint_Error is raised if Y or Z is zero, -- or if the quotient does not fit in 128 bits. Round indicates if the @@ -81,11 +167,4 @@ package System.Arith_128 is -- then Q is the rounded quotient. The remainder R is not affected by the -- setting of the Round flag. -private - -- Make it callable from strub contexts. - -- There is a matching setting in trans.c, - -- for calls issued by Gigi. - pragma Machine_Attribute (Multiply_With_Ovflo_Check128, - "strub", "callable"); - end System.Arith_128; diff --git a/gcc/ada/libgnat/s-arit32.adb b/gcc/ada/libgnat/s-arit32.adb index f9cd7fe..baec78a 100644 --- a/gcc/ada/libgnat/s-arit32.adb +++ b/gcc/ada/libgnat/s-arit32.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,9 +29,24 @@ -- -- ------------------------------------------------------------------------------ +-- Preconditions, postconditions, ghost code, loop invariants and assertions +-- in this unit are meant for analysis only, not for run-time checking, as it +-- would be too costly otherwise. This is enforced by setting the assertion +-- policy to Ignore. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + +with Ada.Numerics.Big_Numbers.Big_Integers_Ghost; +use Ada.Numerics.Big_Numbers.Big_Integers_Ghost; with Ada.Unchecked_Conversion; -package body System.Arith_32 is +package body System.Arith_32 + with SPARK_Mode +is pragma Suppress (Overflow_Check); pragma Suppress (Range_Check); @@ -43,27 +58,65 @@ package body System.Arith_32 is function To_Int is new Ada.Unchecked_Conversion (Uns32, Int32); + package Unsigned_Conversion is new Unsigned_Conversions (Int => Uns32); + + function Big (Arg : Uns32) return Big_Integer is + (Unsigned_Conversion.To_Big_Integer (Arg)) + with Ghost; + + package Unsigned_Conversion_64 is new Unsigned_Conversions (Int => Uns64); + + function Big (Arg : Uns64) return Big_Integer is + (Unsigned_Conversion_64.To_Big_Integer (Arg)) + with Ghost; + + pragma Warnings + (Off, "non-preelaborable call not allowed in preelaborated unit", + Reason => "Ghost code is not compiled"); + Big_0 : constant Big_Integer := + Big (Uns32'(0)) + with Ghost; + Big_2xx32 : constant Big_Integer := + Big (Uns32'(2 ** 32 - 1)) + 1 + with Ghost; + Big_2xx64 : constant Big_Integer := + Big (Uns64'(2 ** 64 - 1)) + 1 + with Ghost; + pragma Warnings + (On, "non-preelaborable call not allowed in preelaborated unit"); + ----------------------- -- Local Subprograms -- ----------------------- function "abs" (X : Int32) return Uns32 is (if X = Int32'First - then 2**31 + then Uns32'(2**31) else Uns32 (Int32'(abs X))); -- Convert absolute value of X to unsigned. Note that we can't just use -- the expression of the Else since it overflows for X = Int32'First. + function Lo (A : Uns64) return Uns32 is (Uns32 (A and (2 ** 32 - 1))); + -- Low order half of 64-bit value + function Hi (A : Uns64) return Uns32 is (Uns32 (Shift_Right (A, 32))); -- High order half of 64-bit value - function To_Neg_Int (A : Uns32) return Int32; + function To_Neg_Int (A : Uns32) return Int32 + with + Annotate => (GNATprove, Terminating), + Pre => In_Int32_Range (-Big (A)), + Post => Big (To_Neg_Int'Result) = -Big (A); -- Convert to negative integer equivalent. If the input is in the range -- 0 .. 2**31, then the corresponding nonpositive signed integer (obtained -- by negating the given value) is returned, otherwise constraint error is -- raised. - function To_Pos_Int (A : Uns32) return Int32; + function To_Pos_Int (A : Uns32) return Int32 + with + Annotate => (GNATprove, Terminating), + Pre => In_Int32_Range (Big (A)), + Post => Big (To_Pos_Int'Result) = Big (A); -- Convert to positive integer equivalent. If the input is in the range -- 0 .. 2**31 - 1, then the corresponding nonnegative signed integer is -- returned, otherwise constraint error is raised. @@ -72,6 +125,168 @@ package body System.Arith_32 is pragma No_Return (Raise_Error); -- Raise constraint error with appropriate message + ------------------ + -- Local Lemmas -- + ------------------ + + procedure Lemma_Abs_Commutation (X : Int32) + with + Ghost, + Post => abs (Big (X)) = Big (Uns32'(abs X)); + + procedure Lemma_Abs_Div_Commutation (X, Y : Big_Integer) + with + Ghost, + Pre => Y /= 0, + Post => abs (X / Y) = abs X / abs Y; + + procedure Lemma_Abs_Mult_Commutation (X, Y : Big_Integer) + with + Ghost, + Post => abs (X * Y) = abs X * abs Y; + + procedure Lemma_Abs_Rem_Commutation (X, Y : Big_Integer) + with + Ghost, + Pre => Y /= 0, + Post => abs (X rem Y) = (abs X) rem (abs Y); + + procedure Lemma_Div_Commutation (X, Y : Uns64) + with + Ghost, + Pre => Y /= 0, + Post => Big (X) / Big (Y) = Big (X / Y); + + procedure Lemma_Div_Ge (X, Y, Z : Big_Integer) + with + Ghost, + Pre => Z > 0 and then X >= Y * Z, + Post => X / Z >= Y; + + procedure Lemma_Ge_Commutation (A, B : Uns32) + with + Ghost, + Pre => A >= B, + Post => Big (A) >= Big (B); + + procedure Lemma_Hi_Lo (Xu : Uns64; Xhi, Xlo : Uns32) + with + Ghost, + Pre => Xhi = Hi (Xu) and Xlo = Lo (Xu), + Post => Big (Xu) = Big_2xx32 * Big (Xhi) + Big (Xlo); + + procedure Lemma_Mult_Commutation (X, Y, Z : Uns64) + with + Ghost, + Pre => Big (X) * Big (Y) < Big_2xx64 and then Z = X * Y, + Post => Big (X) * Big (Y) = Big (Z); + + procedure Lemma_Mult_Non_Negative (X, Y : Big_Integer) + with + Ghost, + Pre => (X >= Big_0 and then Y >= Big_0) + or else (X <= Big_0 and then Y <= Big_0), + Post => X * Y >= Big_0; + + procedure Lemma_Mult_Non_Positive (X, Y : Big_Integer) + with + Ghost, + Pre => (X <= Big_0 and then Y >= Big_0) + or else (X >= Big_0 and then Y <= Big_0), + Post => X * Y <= Big_0; + + procedure Lemma_Neg_Div (X, Y : Big_Integer) + with + Ghost, + Pre => Y /= 0, + Post => X / Y = (-X) / (-Y); + + procedure Lemma_Neg_Rem (X, Y : Big_Integer) + with + Ghost, + Pre => Y /= 0, + Post => X rem Y = X rem (-Y); + + procedure Lemma_Not_In_Range_Big2xx32 + with + Post => not In_Int32_Range (Big_2xx32) + and then not In_Int32_Range (-Big_2xx32); + + procedure Lemma_Rem_Commutation (X, Y : Uns64) + with + Ghost, + Pre => Y /= 0, + Post => Big (X) rem Big (Y) = Big (X rem Y); + + ----------------------------- + -- Local lemma null bodies -- + ----------------------------- + + procedure Lemma_Abs_Commutation (X : Int32) is null; + procedure Lemma_Abs_Mult_Commutation (X, Y : Big_Integer) is null; + procedure Lemma_Div_Commutation (X, Y : Uns64) is null; + procedure Lemma_Div_Ge (X, Y, Z : Big_Integer) is null; + procedure Lemma_Ge_Commutation (A, B : Uns32) is null; + procedure Lemma_Mult_Commutation (X, Y, Z : Uns64) is null; + procedure Lemma_Mult_Non_Negative (X, Y : Big_Integer) is null; + procedure Lemma_Mult_Non_Positive (X, Y : Big_Integer) is null; + procedure Lemma_Neg_Rem (X, Y : Big_Integer) is null; + procedure Lemma_Not_In_Range_Big2xx32 is null; + procedure Lemma_Rem_Commutation (X, Y : Uns64) is null; + + ------------------------------- + -- Lemma_Abs_Div_Commutation -- + ------------------------------- + + procedure Lemma_Abs_Div_Commutation (X, Y : Big_Integer) is + begin + if Y < 0 then + if X < 0 then + pragma Assert (abs (X / Y) = abs (X / (-Y))); + else + Lemma_Neg_Div (X, Y); + pragma Assert (abs (X / Y) = abs ((-X) / (-Y))); + end if; + end if; + end Lemma_Abs_Div_Commutation; + + ------------------------------- + -- Lemma_Abs_Rem_Commutation -- + ------------------------------- + + procedure Lemma_Abs_Rem_Commutation (X, Y : Big_Integer) is + begin + if Y < 0 then + Lemma_Neg_Rem (X, Y); + if X < 0 then + pragma Assert (X rem Y = -((-X) rem (-Y))); + pragma Assert (abs (X rem Y) = (abs X) rem (abs Y)); + else + pragma Assert (abs (X rem Y) = (abs X) rem (abs Y)); + end if; + end if; + end Lemma_Abs_Rem_Commutation; + + ----------------- + -- Lemma_Hi_Lo -- + ----------------- + + procedure Lemma_Hi_Lo (Xu : Uns64; Xhi, Xlo : Uns32) is + begin + pragma Assert (Uns64 (Xhi) = Xu / Uns64'(2 ** 32)); + pragma Assert (Uns64 (Xlo) = Xu mod 2 ** 32); + end Lemma_Hi_Lo; + + ------------------- + -- Lemma_Neg_Div -- + ------------------- + + procedure Lemma_Neg_Div (X, Y : Big_Integer) is + begin + pragma Assert ((-X) / (-Y) = -(X / (-Y))); + pragma Assert (X / (-Y) = -(X / Y)); + end Lemma_Neg_Div; + ----------------- -- Raise_Error -- ----------------- @@ -79,6 +294,9 @@ package body System.Arith_32 is procedure Raise_Error is begin raise Constraint_Error with "32-bit arithmetic overflow"; + pragma Annotate + (GNATprove, Intentional, "exception might be raised", + "Procedure Raise_Error is called to signal input errors"); end Raise_Error; ------------------- @@ -101,51 +319,252 @@ package body System.Arith_32 is Ru : Uns32; -- Unsigned quotient and remainder + -- Local ghost variables + + Mult : constant Big_Integer := abs (Big (X) * Big (Y)) with Ghost; + Quot : Big_Integer with Ghost; + Big_R : Big_Integer with Ghost; + Big_Q : Big_Integer with Ghost; + + -- Local lemmas + + procedure Prove_Negative_Dividend + with + Ghost, + Pre => Z /= 0 + and then ((X >= 0 and Y < 0) or (X < 0 and Y >= 0)) + and then Big_Q = + (if Round then Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), + Big (X) * Big (Y) rem Big (Z)) + else Big (X) * Big (Y) / Big (Z)), + Post => + (if Z > 0 then Big_Q <= Big_0 else Big_Q >= Big_0); + -- Proves the sign of rounded quotient when dividend is non-positive + + procedure Prove_Overflow + with + Ghost, + Pre => Z /= 0 and then Mult >= Big_2xx32 * Big (Uns32'(abs Z)), + Post => not In_Int32_Range (Big (X) * Big (Y) / Big (Z)) + and then not In_Int32_Range + (Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), + Big (X) * Big (Y) rem Big (Z))); + -- Proves overflow case + + procedure Prove_Positive_Dividend + with + Ghost, + Pre => Z /= 0 + and then ((X >= 0 and Y >= 0) or (X < 0 and Y < 0)) + and then Big_Q = + (if Round then Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), + Big (X) * Big (Y) rem Big (Z)) + else Big (X) * Big (Y) / Big (Z)), + Post => + (if Z > 0 then Big_Q >= Big_0 else Big_Q <= Big_0); + -- Proves the sign of rounded quotient when dividend is non-negative + + procedure Prove_Rounding_Case + with + Ghost, + Pre => Z /= 0 + and then Quot = Big (X) * Big (Y) / Big (Z) + and then Big_R = Big (X) * Big (Y) rem Big (Z) + and then Big_Q = + Round_Quotient (Big (X) * Big (Y), Big (Z), Quot, Big_R) + and then Big (Ru) = abs Big_R + and then Big (Zu) = Big (Uns32'(abs Z)), + Post => abs Big_Q = + (if Ru > (Zu - Uns32'(1)) / Uns32'(2) + then abs Quot + 1 + else abs Quot); + -- Proves correctness of the rounding of the unsigned quotient + + procedure Prove_Sign_R + with + Ghost, + Pre => Z /= 0 and then Big_R = Big (X) * Big (Y) rem Big (Z), + Post => In_Int32_Range (Big_R); + + procedure Prove_Signs + with + Ghost, + Pre => Z /= 0 + and then Quot = Big (X) * Big (Y) / Big (Z) + and then Big_R = Big (X) * Big (Y) rem Big (Z) + and then Big_Q = + (if Round then + Round_Quotient (Big (X) * Big (Y), Big (Z), Quot, Big_R) + else Quot) + and then Big (Ru) = abs Big_R + and then Big (Qu) = abs Big_Q + and then In_Int32_Range (Big_Q) + and then In_Int32_Range (Big_R) + and then R = + (if (X >= 0) = (Y >= 0) then To_Pos_Int (Ru) else To_Neg_Int (Ru)) + and then Q = + (if ((X >= 0) = (Y >= 0)) = (Z >= 0) then To_Pos_Int (Qu) + else To_Neg_Int (Qu)), -- need to ensure To_Pos_Int precondition + Post => Big (R) = Big_R and then Big (Q) = Big_Q; + -- Proves final signs match the intended result after the unsigned + -- division is done. + + ----------------------------- + -- Prove_Negative_Dividend -- + ----------------------------- + + procedure Prove_Negative_Dividend is + begin + Lemma_Mult_Non_Positive (Big (X), Big (Y)); + end Prove_Negative_Dividend; + + -------------------- + -- Prove_Overflow -- + -------------------- + + procedure Prove_Overflow is + begin + Lemma_Div_Ge (Mult, Big_2xx32, Big (Uns32'(abs Z))); + Lemma_Abs_Commutation (Z); + Lemma_Abs_Div_Commutation (Big (X) * Big (Y), Big (Z)); + end Prove_Overflow; + + ----------------------------- + -- Prove_Positive_Dividend -- + ----------------------------- + + procedure Prove_Positive_Dividend is + begin + Lemma_Mult_Non_Negative (Big (X), Big (Y)); + end Prove_Positive_Dividend; + + ------------------------- + -- Prove_Rounding_Case -- + ------------------------- + + procedure Prove_Rounding_Case is + begin + if Same_Sign (Big (X) * Big (Y), Big (Z)) then + null; + end if; + end Prove_Rounding_Case; + + ------------------ + -- Prove_Sign_R -- + ------------------ + + procedure Prove_Sign_R is + begin + pragma Assert (In_Int32_Range (Big (Z))); + end Prove_Sign_R; + + ----------------- + -- Prove_Signs -- + ----------------- + + procedure Prove_Signs is null; + + -- Start of processing for Scaled_Divide32 + begin -- First do the 64-bit multiplication D := Uns64 (Xu) * Uns64 (Yu); + pragma Assert (Mult = Big (D)); + Lemma_Hi_Lo (D, Hi (D), Lo (D)); + pragma Assert (Mult = Big_2xx32 * Big (Hi (D)) + Big (Lo (D))); + + -- If divisor is zero, raise error + + if Z = 0 then + Raise_Error; + end if; + + Quot := Big (X) * Big (Y) / Big (Z); + Big_R := Big (X) * Big (Y) rem Big (Z); + if Round then + Big_Q := Round_Quotient (Big (X) * Big (Y), Big (Z), Quot, Big_R); + else + Big_Q := Quot; + end if; + -- If dividend is too large, raise error if Hi (D) >= Zu then + Lemma_Ge_Commutation (Hi (D), Zu); + pragma Assert (Mult >= Big_2xx32 * Big (Zu)); + Prove_Overflow; Raise_Error; + end if; -- Then do the 64-bit division - else - Qu := Uns32 (D / Uns64 (Zu)); - Ru := Uns32 (D rem Uns64 (Zu)); - end if; + Qu := Uns32 (D / Uns64 (Zu)); + Ru := Uns32 (D rem Uns64 (Zu)); + + Lemma_Abs_Div_Commutation (Big (X) * Big (Y), Big (Z)); + Lemma_Abs_Rem_Commutation (Big (X) * Big (Y), Big (Z)); + Lemma_Abs_Mult_Commutation (Big (X), Big (Y)); + Lemma_Abs_Commutation (X); + Lemma_Abs_Commutation (Y); + Lemma_Abs_Commutation (Z); + Lemma_Mult_Commutation (Uns64 (Xu), Uns64 (Yu), D); + Lemma_Div_Commutation (D, Uns64 (Zu)); + Lemma_Rem_Commutation (D, Uns64 (Zu)); + + pragma Assert (Big (Ru) = abs Big_R); + pragma Assert (Big (Qu) = abs Quot); + pragma Assert (Big (Zu) = Big (Uns32'(abs Z))); -- Deal with rounding case - if Round and then Ru > (Zu - Uns32'(1)) / Uns32'(2) then + if Round then + Prove_Rounding_Case; - -- Protect against wrapping around when rounding, by signaling - -- an overflow when the quotient is too large. + if Ru > (Zu - Uns32'(1)) / Uns32'(2) then + pragma Assert (abs Big_Q = Big (Qu) + 1); - if Qu = Uns32'Last then - Raise_Error; - end if; + -- Protect against wrapping around when rounding, by signaling + -- an overflow when the quotient is too large. - Qu := Qu + Uns32'(1); + if Qu = Uns32'Last then + pragma Assert (abs Big_Q = Big_2xx32); + Lemma_Not_In_Range_Big2xx32; + Raise_Error; + end if; + + Qu := Qu + Uns32'(1); + end if; end if; + pragma Assert (Big (Qu) = abs Big_Q); + pragma Assert (Big (Ru) = abs Big_R); + -- Set final signs (RM 4.5.5(27-30)) -- Case of dividend (X * Y) sign positive if (X >= 0 and then Y >= 0) or else (X < 0 and then Y < 0) then + Prove_Positive_Dividend; + R := To_Pos_Int (Ru); Q := (if Z > 0 then To_Pos_Int (Qu) else To_Neg_Int (Qu)); -- Case of dividend (X * Y) sign negative else + Prove_Negative_Dividend; + R := To_Neg_Int (Ru); Q := (if Z > 0 then To_Neg_Int (Qu) else To_Pos_Int (Qu)); end if; + + Prove_Sign_R; + Prove_Signs; end Scaled_Divide32; ---------------- diff --git a/gcc/ada/libgnat/s-arit32.ads b/gcc/ada/libgnat/s-arit32.ads index 5dc197d..0eb6491 100644 --- a/gcc/ada/libgnat/s-arit32.ads +++ b/gcc/ada/libgnat/s-arit32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -33,17 +33,79 @@ -- signed integer values in cases where either overflow checking is -- required, or intermediate results are longer than 32 bits. +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced +-- by setting the corresponding assertion policy to Ignore. Postconditions +-- and contract cases should not be executed at runtime as well, in order +-- not to slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + with Interfaces; +with Ada.Numerics.Big_Numbers.Big_Integers_Ghost; -package System.Arith_32 is - pragma Pure; +package System.Arith_32 + with Pure, SPARK_Mode +is + use type Ada.Numerics.Big_Numbers.Big_Integers_Ghost.Big_Integer; + use type Interfaces.Integer_32; subtype Int32 is Interfaces.Integer_32; + subtype Big_Integer is + Ada.Numerics.Big_Numbers.Big_Integers_Ghost.Big_Integer + with Ghost; + + package Signed_Conversion is new + Ada.Numerics.Big_Numbers.Big_Integers_Ghost.Signed_Conversions + (Int => Int32); + + function Big (Arg : Int32) return Big_Integer is + (Signed_Conversion.To_Big_Integer (Arg)) + with Ghost; + + function In_Int32_Range (Arg : Big_Integer) return Boolean is + (Ada.Numerics.Big_Numbers.Big_Integers_Ghost.In_Range + (Arg, Big (Int32'First), Big (Int32'Last))) + with Ghost; + + function Same_Sign (X, Y : Big_Integer) return Boolean is + (X = Big (Int32'(0)) + or else Y = Big (Int32'(0)) + or else (X < Big (Int32'(0))) = (Y < Big (Int32'(0)))) + with Ghost; + + function Round_Quotient (X, Y, Q, R : Big_Integer) return Big_Integer is + (if abs R > (abs Y - Big (Int32'(1))) / Big (Int32'(2)) then + (if Same_Sign (X, Y) then Q + Big (Int32'(1)) + else Q - Big (Int32'(1))) + else + Q) + with + Ghost, + Pre => Y /= 0 and then Q = X / Y and then R = X rem Y; + procedure Scaled_Divide32 (X, Y, Z : Int32; Q, R : out Int32; - Round : Boolean); + Round : Boolean) + with + Pre => Z /= 0 + and then In_Int32_Range + (if Round then Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), + Big (X) * Big (Y) rem Big (Z)) + else Big (X) * Big (Y) / Big (Z)), + Post => Big (R) = Big (X) * Big (Y) rem Big (Z) + and then + (if Round then + Big (Q) = Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), Big (R)) + else + Big (Q) = Big (X) * Big (Y) / Big (Z)); -- Performs the division of (X * Y) / Z, storing the quotient in Q -- and the remainder in R. Constraint_Error is raised if Z is zero, -- or if the quotient does not fit in 32 bits. Round indicates if diff --git a/gcc/ada/libgnat/s-arit64.adb b/gcc/ada/libgnat/s-arit64.adb index 2f24a70..c718ebf 100644 --- a/gcc/ada/libgnat/s-arit64.adb +++ b/gcc/ada/libgnat/s-arit64.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,7 +31,9 @@ with System.Arith_Double; -package body System.Arith_64 is +package body System.Arith_64 + with SPARK_Mode +is subtype Uns64 is Interfaces.Unsigned_64; subtype Uns32 is Interfaces.Unsigned_32; diff --git a/gcc/ada/libgnat/s-arit64.ads b/gcc/ada/libgnat/s-arit64.ads index 68d2149..c4bebeb 100644 --- a/gcc/ada/libgnat/s-arit64.ads +++ b/gcc/ada/libgnat/s-arit64.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -36,31 +36,102 @@ pragma Restrictions (No_Elaboration_Code); -- Allow direct call from gigi generated code +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced +-- by setting the corresponding assertion policy to Ignore. Postconditions +-- and contract cases should not be executed at runtime as well, in order +-- not to slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + +with Ada.Numerics.Big_Numbers.Big_Integers_Ghost; with Interfaces; -package System.Arith_64 is - pragma Pure; +package System.Arith_64 + with Pure, SPARK_Mode +is + use type Ada.Numerics.Big_Numbers.Big_Integers_Ghost.Big_Integer; + use type Interfaces.Integer_64; subtype Int64 is Interfaces.Integer_64; - function Add_With_Ovflo_Check64 (X, Y : Int64) return Int64; + subtype Big_Integer is + Ada.Numerics.Big_Numbers.Big_Integers_Ghost.Big_Integer + with Ghost; + + package Signed_Conversion is new + Ada.Numerics.Big_Numbers.Big_Integers_Ghost.Signed_Conversions + (Int => Int64); + + function Big (Arg : Int64) return Big_Integer is + (Signed_Conversion.To_Big_Integer (Arg)) + with Ghost; + + function In_Int64_Range (Arg : Big_Integer) return Boolean is + (Ada.Numerics.Big_Numbers.Big_Integers_Ghost.In_Range + (Arg, Big (Int64'First), Big (Int64'Last))) + with Ghost; + + function Add_With_Ovflo_Check64 (X, Y : Int64) return Int64 + with + Pre => In_Int64_Range (Big (X) + Big (Y)), + Post => Add_With_Ovflo_Check64'Result = X + Y; -- Raises Constraint_Error if sum of operands overflows 64 bits, -- otherwise returns the 64-bit signed integer sum. - function Subtract_With_Ovflo_Check64 (X, Y : Int64) return Int64; + function Subtract_With_Ovflo_Check64 (X, Y : Int64) return Int64 + with + Pre => In_Int64_Range (Big (X) - Big (Y)), + Post => Subtract_With_Ovflo_Check64'Result = X - Y; -- Raises Constraint_Error if difference of operands overflows 64 -- bits, otherwise returns the 64-bit signed integer difference. - function Multiply_With_Ovflo_Check64 (X, Y : Int64) return Int64; + function Multiply_With_Ovflo_Check64 (X, Y : Int64) return Int64 + with + Pre => In_Int64_Range (Big (X) * Big (Y)), + Post => Multiply_With_Ovflo_Check64'Result = X * Y; pragma Export (C, Multiply_With_Ovflo_Check64, "__gnat_mulv64"); -- Raises Constraint_Error if product of operands overflows 64 -- bits, otherwise returns the 64-bit signed integer product. -- Gigi may also call this routine directly. + function Same_Sign (X, Y : Big_Integer) return Boolean is + (X = Big (Int64'(0)) + or else Y = Big (Int64'(0)) + or else (X < Big (Int64'(0))) = (Y < Big (Int64'(0)))) + with Ghost; + + function Round_Quotient (X, Y, Q, R : Big_Integer) return Big_Integer is + (if abs R > (abs Y - Big (Int64'(1))) / Big (Int64'(2)) then + (if Same_Sign (X, Y) then Q + Big (Int64'(1)) + else Q - Big (Int64'(1))) + else + Q) + with + Ghost, + Pre => Y /= 0 and then Q = X / Y and then R = X rem Y; + procedure Scaled_Divide64 (X, Y, Z : Int64; Q, R : out Int64; - Round : Boolean); + Round : Boolean) + with + Pre => Z /= 0 + and then In_Int64_Range + (if Round then Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), + Big (X) * Big (Y) rem Big (Z)) + else Big (X) * Big (Y) / Big (Z)), + Post => Big (R) = Big (X) * Big (Y) rem Big (Z) + and then + (if Round then + Big (Q) = Round_Quotient (Big (X) * Big (Y), Big (Z), + Big (X) * Big (Y) / Big (Z), Big (R)) + else + Big (Q) = Big (X) * Big (Y) / Big (Z)); -- Performs the division of (X * Y) / Z, storing the quotient in Q -- and the remainder in R. Constraint_Error is raised if Z is zero, -- or if the quotient does not fit in 64 bits. Round indicates if @@ -78,7 +149,22 @@ package System.Arith_64 is procedure Double_Divide64 (X, Y, Z : Int64; Q, R : out Int64; - Round : Boolean); + Round : Boolean) + with + Pre => Y /= 0 + and then Z /= 0 + and then In_Int64_Range + (if Round then Round_Quotient (Big (X), Big (Y) * Big (Z), + Big (X) / (Big (Y) * Big (Z)), + Big (X) rem (Big (Y) * Big (Z))) + else Big (X) / (Big (Y) * Big (Z))), + Post => Big (R) = Big (X) rem (Big (Y) * Big (Z)) + and then + (if Round then + Big (Q) = Round_Quotient (Big (X), Big (Y) * Big (Z), + Big (X) / (Big (Y) * Big (Z)), Big (R)) + else + Big (Q) = Big (X) / (Big (Y) * Big (Z))); -- Performs the division X / (Y * Z), storing the quotient in Q and -- the remainder in R. Constraint_Error is raised if Y or Z is zero, -- or if the quotient does not fit in 64 bits. Round indicates if the @@ -93,11 +179,4 @@ package System.Arith_64 is Round : Boolean) renames Double_Divide64; -- Renamed procedure to preserve compatibility with earlier versions -private - -- Make it callable from strub contexts. - -- There is a matching setting in trans.c, - -- for calls issued by Gigi. - pragma Machine_Attribute (Multiply_With_Ovflo_Check64, - "strub", "callable"); - end System.Arith_64; diff --git a/gcc/ada/libgnat/s-assert.adb b/gcc/ada/libgnat/s-assert.adb index 4adcc33..0e463a1 100644 --- a/gcc/ada/libgnat/s-assert.adb +++ b/gcc/ada/libgnat/s-assert.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with Ada.Exceptions; with System.Exceptions_Debug; diff --git a/gcc/ada/libgnat/s-assert.ads b/gcc/ada/libgnat/s-assert.ads index aa82549..e1ecf20 100644 --- a/gcc/ada/libgnat/s-assert.ads +++ b/gcc/ada/libgnat/s-assert.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -36,8 +36,6 @@ -- This unit may be used directly from an application program by providing -- an appropriate WITH, and the interface can be expected to remain stable. -pragma Compiler_Unit_Warning; - with Ada.Assertions; package System.Assertions is diff --git a/gcc/ada/libgnat/s-atacco.adb b/gcc/ada/libgnat/s-atacco.adb index c13291e..1ba39f4 100644 --- a/gcc/ada/libgnat/s-atacco.adb +++ b/gcc/ada/libgnat/s-atacco.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-atacco.ads b/gcc/ada/libgnat/s-atacco.ads index 16d86fb..736210d 100644 --- a/gcc/ada/libgnat/s-atacco.ads +++ b/gcc/ada/libgnat/s-atacco.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/s-atocou.adb b/gcc/ada/libgnat/s-atocou.adb index b7ce56d..d2cf55e 100644 --- a/gcc/ada/libgnat/s-atocou.adb +++ b/gcc/ada/libgnat/s-atocou.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-atocou.ads b/gcc/ada/libgnat/s-atocou.ads index 9488b6d..9fee73c 100644 --- a/gcc/ada/libgnat/s-atocou.ads +++ b/gcc/ada/libgnat/s-atocou.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,6 +31,8 @@ -- This package provides atomic counter on platforms where it is supported: -- - all Alpha platforms +-- - all AARCH64 platforms +-- - all ARM platforms -- - all ia64 platforms -- - all PowerPC platforms -- - all SPARC V9 platforms diff --git a/gcc/ada/libgnat/s-atocou__builtin.adb b/gcc/ada/libgnat/s-atocou__builtin.adb index d87f9ad..3c7af61 100644 --- a/gcc/ada/libgnat/s-atocou__builtin.adb +++ b/gcc/ada/libgnat/s-atocou__builtin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,21 +29,27 @@ -- -- ------------------------------------------------------------------------------ --- This package implements Atomic_Counter and Atomic_Unsigned operations --- for platforms where GCC supports __sync_add_and_fetch_4 and --- __sync_sub_and_fetch_4 builtins. +-- This package implements Atomic_Counter and Atomic_Unsigned operations for +-- platforms where GCC supports __atomic_add_fetch and __atomic_sub_fetch +-- builtins. + +with System.Atomic_Primitives; use System.Atomic_Primitives; package body System.Atomic_Counters is - procedure Sync_Add_And_Fetch - (Ptr : access Atomic_Unsigned; - Value : Atomic_Unsigned); - pragma Import (Intrinsic, Sync_Add_And_Fetch, "__sync_add_and_fetch_4"); + function Atomic_Add_Fetch + (Ptr : System.Address; + Val : Atomic_Unsigned; + Model : Mem_Model := Seq_Cst) + return Atomic_Unsigned; + pragma Import (Intrinsic, Atomic_Add_Fetch, "__atomic_add_fetch"); - function Sync_Sub_And_Fetch - (Ptr : access Atomic_Unsigned; - Value : Atomic_Unsigned) return Atomic_Unsigned; - pragma Import (Intrinsic, Sync_Sub_And_Fetch, "__sync_sub_and_fetch_4"); + function Atomic_Sub_Fetch + (Ptr : System.Address; + Val : Atomic_Unsigned; + Model : Mem_Model := Seq_Cst) + return Atomic_Unsigned; + pragma Import (Intrinsic, Atomic_Sub_Fetch, "__atomic_sub_fetch"); --------------- -- Decrement -- @@ -51,19 +57,19 @@ package body System.Atomic_Counters is procedure Decrement (Item : aliased in out Atomic_Unsigned) is begin - if Sync_Sub_And_Fetch (Item'Unchecked_Access, 1) = 0 then + if Atomic_Sub_Fetch (Item'Address, 1) = 0 then null; end if; end Decrement; function Decrement (Item : aliased in out Atomic_Unsigned) return Boolean is begin - return Sync_Sub_And_Fetch (Item'Unchecked_Access, 1) = 0; + return Atomic_Sub_Fetch (Item'Address, 1) = 0; end Decrement; function Decrement (Item : in out Atomic_Counter) return Boolean is begin - return Sync_Sub_And_Fetch (Item.Value'Unchecked_Access, 1) = 0; + return Atomic_Sub_Fetch (Item.Value'Address, 1) = 0; end Decrement; --------------- @@ -72,12 +78,16 @@ package body System.Atomic_Counters is procedure Increment (Item : aliased in out Atomic_Unsigned) is begin - Sync_Add_And_Fetch (Item'Unchecked_Access, 1); + if Atomic_Add_Fetch (Item'Address, 1) = 0 then + null; + end if; end Increment; procedure Increment (Item : in out Atomic_Counter) is begin - Sync_Add_And_Fetch (Item.Value'Unchecked_Access, 1); + if Atomic_Add_Fetch (Item.Value'Address, 1) = 0 then + null; + end if; end Increment; ---------------- diff --git a/gcc/ada/libgnat/s-atocou__x86.adb b/gcc/ada/libgnat/s-atocou__x86.adb deleted file mode 100644 index 8704d9df3e..0000000 --- a/gcc/ada/libgnat/s-atocou__x86.adb +++ /dev/null @@ -1,112 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M . A T O M I C _ C O U N T E R S -- --- -- --- B o d y -- --- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This implementation of the package for x86 processor. GCC can't generate --- code for atomic builtins for 386 CPU. Only increment/decrement instructions --- are supported, thus this implementaton uses machine code insertions to --- access the necessary instructions. - -with System.Machine_Code; - -package body System.Atomic_Counters is - - -- Add comments showing in normal asm language what we generate??? - - --------------- - -- Decrement -- - --------------- - - function Decrement (Item : aliased in out Atomic_Unsigned) return Boolean is - Aux : Boolean; - - begin - System.Machine_Code.Asm - (Template => - "lock%; decl" & ASCII.HT & "%0" & ASCII.LF & ASCII.HT - & "sete %1", - Outputs => - (Atomic_Unsigned'Asm_Output ("=m", Item), - Boolean'Asm_Output ("=qm", Aux)), - Inputs => Atomic_Unsigned'Asm_Input ("m", Item), - Volatile => True); - - return Aux; - end Decrement; - - procedure Decrement (Item : aliased in out Atomic_Unsigned) is - begin - if Decrement (Item) then - null; - end if; - end Decrement; - - function Decrement (Item : in out Atomic_Counter) return Boolean is - begin - return Decrement (Item.Value); - end Decrement; - - --------------- - -- Increment -- - --------------- - - procedure Increment (Item : aliased in out Atomic_Unsigned) is - begin - System.Machine_Code.Asm - (Template => "lock%; incl" & ASCII.HT & "%0", - Outputs => Atomic_Unsigned'Asm_Output ("=m", Item), - Inputs => Atomic_Unsigned'Asm_Input ("m", Item), - Volatile => True); - end Increment; - - procedure Increment (Item : in out Atomic_Counter) is - begin - Increment (Item.Value); - end Increment; - - ---------------- - -- Initialize -- - ---------------- - - procedure Initialize (Item : out Atomic_Counter) is - begin - Item.Value := 1; - end Initialize; - - ------------ - -- Is_One -- - ------------ - - function Is_One (Item : Atomic_Counter) return Boolean is - begin - return Item.Value = 1; - end Is_One; - -end System.Atomic_Counters; diff --git a/gcc/ada/libgnat/s-atoope.ads b/gcc/ada/libgnat/s-atoope.ads index c831e8e..3f21b2d 100644 --- a/gcc/ada/libgnat/s-atoope.ads +++ b/gcc/ada/libgnat/s-atoope.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/s-atopex.adb b/gcc/ada/libgnat/s-atopex.adb index 65e9433..3ac993e 100644 --- a/gcc/ada/libgnat/s-atopex.adb +++ b/gcc/ada/libgnat/s-atopex.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-atopex.ads b/gcc/ada/libgnat/s-atopex.ads index f7558aa..10ddaba 100644 --- a/gcc/ada/libgnat/s-atopex.ads +++ b/gcc/ada/libgnat/s-atopex.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/s-atopri.adb b/gcc/ada/libgnat/s-atopri.adb index 20aa666..a6c991a 100644 --- a/gcc/ada/libgnat/s-atopri.adb +++ b/gcc/ada/libgnat/s-atopri.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2012-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -55,23 +55,16 @@ package body System.Atomic_Primitives is Expected : in out Atomic_Type; Desired : Atomic_Type) return Boolean is - function My_Sync_Compare_And_Swap is - new Sync_Compare_And_Swap (Atomic_Type); - - Actual : Atomic_Type; + function My_Atomic_Compare_Exchange is + new Atomic_Compare_Exchange (Atomic_Type); begin if Expected /= Desired then if Atomic_Type'Atomic_Always_Lock_Free then - Actual := My_Sync_Compare_And_Swap (Ptr, Expected, Desired); + return My_Atomic_Compare_Exchange (Ptr, Expected'Address, Desired); else raise Program_Error; end if; - - if Actual /= Expected then - Expected := Actual; - return False; - end if; end if; return True; diff --git a/gcc/ada/libgnat/s-atopri.ads b/gcc/ada/libgnat/s-atopri.ads index ea03f1a..0bf8459 100644 --- a/gcc/ada/libgnat/s-atopri.ads +++ b/gcc/ada/libgnat/s-atopri.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2012-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -80,17 +80,20 @@ package System.Atomic_Primitives is generic type Atomic_Type is mod <>; - function Sync_Compare_And_Swap - (Ptr : Address; - Expected : Atomic_Type; - Desired : Atomic_Type) return Atomic_Type; + function Atomic_Compare_Exchange + (Ptr : Address; + Expected : Address; + Desired : Atomic_Type; + Weak : Boolean := False; + Success_Model : Mem_Model := Seq_Cst; + Failure_Model : Mem_Model := Seq_Cst) return Boolean; pragma Import - (Intrinsic, Sync_Compare_And_Swap, "__sync_val_compare_and_swap"); + (Intrinsic, Atomic_Compare_Exchange, "__atomic_compare_exchange_n"); - function Sync_Compare_And_Swap_8 is new Sync_Compare_And_Swap (uint8); - function Sync_Compare_And_Swap_16 is new Sync_Compare_And_Swap (uint16); - function Sync_Compare_And_Swap_32 is new Sync_Compare_And_Swap (uint32); - function Sync_Compare_And_Swap_64 is new Sync_Compare_And_Swap (uint64); + function Atomic_Compare_Exchange_8 is new Atomic_Compare_Exchange (uint8); + function Atomic_Compare_Exchange_16 is new Atomic_Compare_Exchange (uint16); + function Atomic_Compare_Exchange_32 is new Atomic_Compare_Exchange (uint32); + function Atomic_Compare_Exchange_64 is new Atomic_Compare_Exchange (uint64); function Atomic_Test_And_Set (Ptr : System.Address; diff --git a/gcc/ada/libgnat/s-auxdec.adb b/gcc/ada/libgnat/s-auxdec.adb index 0cb712a..b70b8d1 100644 --- a/gcc/ada/libgnat/s-auxdec.adb +++ b/gcc/ada/libgnat/s-auxdec.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/Or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-auxdec.ads b/gcc/ada/libgnat/s-auxdec.ads index 7ef1246..9a0ca07 100644 --- a/gcc/ada/libgnat/s-auxdec.ads +++ b/gcc/ada/libgnat/s-auxdec.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1996-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-bignum.adb b/gcc/ada/libgnat/s-bignum.adb index 41e7617..9377102 100644 --- a/gcc/ada/libgnat/s-bignum.adb +++ b/gcc/ada/libgnat/s-bignum.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2012-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-bignum.ads b/gcc/ada/libgnat/s-bignum.ads index ad5fedb..f0cfd17 100644 --- a/gcc/ada/libgnat/s-bignum.ads +++ b/gcc/ada/libgnat/s-bignum.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2012-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-bitfie.ads b/gcc/ada/libgnat/s-bitfie.ads index f081d55..629a53f 100644 --- a/gcc/ada/libgnat/s-bitfie.ads +++ b/gcc/ada/libgnat/s-bitfie.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-bitops.adb b/gcc/ada/libgnat/s-bitops.adb index 45290d3..0cf4adf 100644 --- a/gcc/ada/libgnat/s-bitops.adb +++ b/gcc/ada/libgnat/s-bitops.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1996-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,10 +29,7 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - -with System; use System; -with System.Unsigned_Types; use System.Unsigned_Types; +with System.Unsigned_Types; use System.Unsigned_Types; with Ada.Exceptions; use Ada.Exceptions; with Ada.Unchecked_Conversion; @@ -59,14 +56,14 @@ package body System.Bit_Ops is -- The following is an array of masks used to mask the final byte, either -- at the high end (big-endian case) or the low end (little-endian case). - Masks : constant array (1 .. 7) of Packed_Byte := ( + Masks : constant array (1 .. 7) of Packed_Byte := [ (1 - LE) * 2#1000_0000# + LE * 2#0000_0001#, (1 - LE) * 2#1100_0000# + LE * 2#0000_0011#, (1 - LE) * 2#1110_0000# + LE * 2#0000_0111#, (1 - LE) * 2#1111_0000# + LE * 2#0000_1111#, (1 - LE) * 2#1111_1000# + LE * 2#0001_1111#, (1 - LE) * 2#1111_1100# + LE * 2#0011_1111#, - (1 - LE) * 2#1111_1110# + LE * 2#0111_1111#); + (1 - LE) * 2#1111_1110# + LE * 2#0111_1111#]; ----------------------- -- Local Subprograms -- diff --git a/gcc/ada/libgnat/s-bitops.ads b/gcc/ada/libgnat/s-bitops.ads index 92fe0df..20108fe 100644 --- a/gcc/ada/libgnat/s-bitops.ads +++ b/gcc/ada/libgnat/s-bitops.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,10 +31,6 @@ -- Operations on packed bit strings -pragma Compiler_Unit_Warning; - -with System; - package System.Bit_Ops is -- Note: in all the following routines, the System.Address parameters diff --git a/gcc/ada/libgnat/s-bituti.adb b/gcc/ada/libgnat/s-bituti.adb index d571f54..df7cffb 100644 --- a/gcc/ada/libgnat/s-bituti.adb +++ b/gcc/ada/libgnat/s-bituti.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-bituti.ads b/gcc/ada/libgnat/s-bituti.ads index 8afee24..9325ddc 100644 --- a/gcc/ada/libgnat/s-bituti.ads +++ b/gcc/ada/libgnat/s-bituti.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2019-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-boarop.ads b/gcc/ada/libgnat/s-boarop.ads index 1efac49..7c1813e 100644 --- a/gcc/ada/libgnat/s-boarop.ads +++ b/gcc/ada/libgnat/s-boarop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-boustr.adb b/gcc/ada/libgnat/s-boustr.adb index 0790846..f30895b 100644 --- a/gcc/ada/libgnat/s-boustr.adb +++ b/gcc/ada/libgnat/s-boustr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2016-2021, AdaCore -- +-- Copyright (C) 2016-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-boustr.ads b/gcc/ada/libgnat/s-boustr.ads index 9f7526e..dfe7ba2 100644 --- a/gcc/ada/libgnat/s-boustr.ads +++ b/gcc/ada/libgnat/s-boustr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2016-2021, AdaCore -- +-- Copyright (C) 2016-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-bytswa.ads b/gcc/ada/libgnat/s-bytswa.ads index 7cc1523..1d995b6 100644 --- a/gcc/ada/libgnat/s-bytswa.ads +++ b/gcc/ada/libgnat/s-bytswa.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2006-2021, AdaCore -- +-- Copyright (C) 2006-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-carsi8.adb b/gcc/ada/libgnat/s-carsi8.adb index a44924a..c5eae5f 100644 --- a/gcc/ada/libgnat/s-carsi8.adb +++ b/gcc/ada/libgnat/s-carsi8.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-carsi8.ads b/gcc/ada/libgnat/s-carsi8.ads index a9ef1c06..b48a07b 100644 --- a/gcc/ada/libgnat/s-carsi8.ads +++ b/gcc/ada/libgnat/s-carsi8.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-carun8.adb b/gcc/ada/libgnat/s-carun8.adb index 2c192db..a7d7db9 100644 --- a/gcc/ada/libgnat/s-carun8.adb +++ b/gcc/ada/libgnat/s-carun8.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with System.Address_Operations; use System.Address_Operations; with Ada.Unchecked_Conversion; diff --git a/gcc/ada/libgnat/s-carun8.ads b/gcc/ada/libgnat/s-carun8.ads index eeadf61..0c19c30 100644 --- a/gcc/ada/libgnat/s-carun8.ads +++ b/gcc/ada/libgnat/s-carun8.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,8 +32,6 @@ -- This package contains functions for runtime comparisons on arrays whose -- elements are 8-bit discrete type values to be treated as unsigned. -pragma Compiler_Unit_Warning; - package System.Compare_Array_Unsigned_8 is -- Note: although the functions in this package are in a sense Pure, the diff --git a/gcc/ada/libgnat/s-casi128.adb b/gcc/ada/libgnat/s-casi128.adb index 09d002f..a8a3dd6 100644 --- a/gcc/ada/libgnat/s-casi128.adb +++ b/gcc/ada/libgnat/s-casi128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-casi128.ads b/gcc/ada/libgnat/s-casi128.ads index d3f1347..01df748 100644 --- a/gcc/ada/libgnat/s-casi128.ads +++ b/gcc/ada/libgnat/s-casi128.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-casi16.adb b/gcc/ada/libgnat/s-casi16.adb index 1889579..3f85086 100644 --- a/gcc/ada/libgnat/s-casi16.adb +++ b/gcc/ada/libgnat/s-casi16.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-casi16.ads b/gcc/ada/libgnat/s-casi16.ads index 21c7a0e..cb0cebe 100644 --- a/gcc/ada/libgnat/s-casi16.ads +++ b/gcc/ada/libgnat/s-casi16.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-casi32.adb b/gcc/ada/libgnat/s-casi32.adb index 0515a53..5fe62f1 100644 --- a/gcc/ada/libgnat/s-casi32.adb +++ b/gcc/ada/libgnat/s-casi32.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-casi32.ads b/gcc/ada/libgnat/s-casi32.ads index c591cff..263f8b4 100644 --- a/gcc/ada/libgnat/s-casi32.ads +++ b/gcc/ada/libgnat/s-casi32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-casi64.adb b/gcc/ada/libgnat/s-casi64.adb index 5b4a1e3..45d9f94 100644 --- a/gcc/ada/libgnat/s-casi64.adb +++ b/gcc/ada/libgnat/s-casi64.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-casi64.ads b/gcc/ada/libgnat/s-casi64.ads index 4563124..71632c1 100644 --- a/gcc/ada/libgnat/s-casi64.ads +++ b/gcc/ada/libgnat/s-casi64.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-casuti.adb b/gcc/ada/libgnat/s-casuti.adb index 265b7d3..01693e0 100644 --- a/gcc/ada/libgnat/s-casuti.adb +++ b/gcc/ada/libgnat/s-casuti.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,10 +29,17 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; +-- Ghost code, loop invariants and assertions in this unit are meant for +-- analysis only, not for run-time checking, as it would be too costly +-- otherwise. This is enforced by setting the assertion policy to Ignore. -package body System.Case_Util is +pragma Assertion_Policy (Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); +package body System.Case_Util + with SPARK_Mode +is -------------- -- To_Lower -- -------------- @@ -55,6 +62,9 @@ package body System.Case_Util is begin for J in A'Range loop A (J) := To_Lower (A (J)); + + pragma Loop_Invariant + (for all K in A'First .. J => A (K) = To_Lower (A'Loop_Entry (K))); end loop; end To_Lower; @@ -80,6 +90,15 @@ package body System.Case_Util is A (J) := To_Lower (A (J)); end if; + pragma Loop_Invariant + (for all K in A'First .. J => + (if K = A'First + or else A'Loop_Entry (K - 1) = '_' + then + A (K) = To_Upper (A'Loop_Entry (K)) + else + A (K) = To_Lower (A'Loop_Entry (K)))); + Ucase := A (J) = '_'; end loop; end To_Mixed; @@ -113,6 +132,9 @@ package body System.Case_Util is begin for J in A'Range loop A (J) := To_Upper (A (J)); + + pragma Loop_Invariant + (for all K in A'First .. J => A (K) = To_Upper (A'Loop_Entry (K))); end loop; end To_Upper; diff --git a/gcc/ada/libgnat/s-casuti.ads b/gcc/ada/libgnat/s-casuti.ads index 5b96edb..1ebc428 100644 --- a/gcc/ada/libgnat/s-casuti.ads +++ b/gcc/ada/libgnat/s-casuti.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -34,34 +34,98 @@ -- This package provides simple casing functions that do not require the -- overhead of the full casing tables found in Ada.Characters.Handling. --- Note that all the routines in this package are available to the user --- via GNAT.Case_Util, which imports all the entities from this package. +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. -pragma Compiler_Unit_Warning; - -package System.Case_Util is - pragma Pure; +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); +package System.Case_Util + with Pure, SPARK_Mode +is -- Note: all the following functions handle the full Latin-1 set - function To_Upper (A : Character) return Character; + function To_Upper (A : Character) return Character + with + Post => (declare + A_Val : constant Natural := Character'Pos (A); + begin + (if A in 'a' .. 'z' + or else A_Val in 16#E0# .. 16#F6# + or else A_Val in 16#F8# .. 16#FE# + then + To_Upper'Result = Character'Val (A_Val - 16#20#) + else + To_Upper'Result = A)); -- Converts A to upper case if it is a lower case letter, otherwise -- returns the input argument unchanged. - procedure To_Upper (A : in out String); - function To_Upper (A : String) return String; + procedure To_Upper (A : in out String) + with + Post => (for all J in A'Range => A (J) = To_Upper (A'Old (J))); + + function To_Upper (A : String) return String + with + Post => To_Upper'Result'First = A'First + and then To_Upper'Result'Last = A'Last + and then (for all J in A'Range => + To_Upper'Result (J) = To_Upper (A (J))); -- Folds all characters of string A to upper case - function To_Lower (A : Character) return Character; + function To_Lower (A : Character) return Character + with + Post => (declare + A_Val : constant Natural := Character'Pos (A); + begin + (if A in 'A' .. 'Z' + or else A_Val in 16#C0# .. 16#D6# + or else A_Val in 16#D8# .. 16#DE# + then + To_Lower'Result = Character'Val (A_Val + 16#20#) + else + To_Lower'Result = A)); -- Converts A to lower case if it is an upper case letter, otherwise -- returns the input argument unchanged. - procedure To_Lower (A : in out String); - function To_Lower (A : String) return String; + procedure To_Lower (A : in out String) + with + Post => (for all J in A'Range => A (J) = To_Lower (A'Old (J))); + + function To_Lower (A : String) return String + with + Post => To_Lower'Result'First = A'First + and then To_Lower'Result'Last = A'Last + and then (for all J in A'Range => + To_Lower'Result (J) = To_Lower (A (J))); -- Folds all characters of string A to lower case - procedure To_Mixed (A : in out String); - function To_Mixed (A : String) return String; + procedure To_Mixed (A : in out String) + with + Post => + (for all J in A'Range => + (if J = A'First + or else A'Old (J - 1) = '_' + then + A (J) = To_Upper (A'Old (J)) + else + A (J) = To_Lower (A'Old (J)))); + + function To_Mixed (A : String) return String + with + Post => To_Mixed'Result'First = A'First + and then To_Mixed'Result'Last = A'Last + and then (for all J in A'Range => + (if J = A'First + or else A (J - 1) = '_' + then + To_Mixed'Result (J) = To_Upper (A (J)) + else + To_Mixed'Result (J) = To_Lower (A (J)))); -- Converts A to mixed case (i.e. lower case, except for initial -- character and any character after an underscore, which are -- converted to upper case. diff --git a/gcc/ada/libgnat/s-caun128.adb b/gcc/ada/libgnat/s-caun128.adb index 3cd4e85..6533c70 100644 --- a/gcc/ada/libgnat/s-caun128.adb +++ b/gcc/ada/libgnat/s-caun128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-caun128.ads b/gcc/ada/libgnat/s-caun128.ads index 30d11ab..1b21a03 100644 --- a/gcc/ada/libgnat/s-caun128.ads +++ b/gcc/ada/libgnat/s-caun128.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-caun16.adb b/gcc/ada/libgnat/s-caun16.adb index 9168ef3..96e667e 100644 --- a/gcc/ada/libgnat/s-caun16.adb +++ b/gcc/ada/libgnat/s-caun16.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-caun16.ads b/gcc/ada/libgnat/s-caun16.ads index 6175daa..c322c15 100644 --- a/gcc/ada/libgnat/s-caun16.ads +++ b/gcc/ada/libgnat/s-caun16.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-caun32.adb b/gcc/ada/libgnat/s-caun32.adb index 7d7e7a8..fdaf706 100644 --- a/gcc/ada/libgnat/s-caun32.adb +++ b/gcc/ada/libgnat/s-caun32.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-caun32.ads b/gcc/ada/libgnat/s-caun32.ads index ab7b4f3..0550b6e 100644 --- a/gcc/ada/libgnat/s-caun32.ads +++ b/gcc/ada/libgnat/s-caun32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-caun64.adb b/gcc/ada/libgnat/s-caun64.adb index 8971a80..cec07fb 100644 --- a/gcc/ada/libgnat/s-caun64.adb +++ b/gcc/ada/libgnat/s-caun64.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-caun64.ads b/gcc/ada/libgnat/s-caun64.ads index d061d7d..de58f07 100644 --- a/gcc/ada/libgnat/s-caun64.ads +++ b/gcc/ada/libgnat/s-caun64.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-chepoo.ads b/gcc/ada/libgnat/s-chepoo.ads index 3936715..b081be9 100644 --- a/gcc/ada/libgnat/s-chepoo.ads +++ b/gcc/ada/libgnat/s-chepoo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-commun.adb b/gcc/ada/libgnat/s-commun.adb index 591b4a0..2406ba4 100644 --- a/gcc/ada/libgnat/s-commun.adb +++ b/gcc/ada/libgnat/s-commun.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-commun.ads b/gcc/ada/libgnat/s-commun.ads index 7c15d62..43dde0b 100644 --- a/gcc/ada/libgnat/s-commun.ads +++ b/gcc/ada/libgnat/s-commun.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, AdaCore -- +-- Copyright (C) 2001-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-conca2.adb b/gcc/ada/libgnat/s-conca2.adb index 81d6f61..49982f5 100644 --- a/gcc/ada/libgnat/s-conca2.adb +++ b/gcc/ada/libgnat/s-conca2.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package body System.Concat_2 is pragma Suppress (All_Checks); diff --git a/gcc/ada/libgnat/s-conca2.ads b/gcc/ada/libgnat/s-conca2.ads index dc588eb..f9c7393 100644 --- a/gcc/ada/libgnat/s-conca2.ads +++ b/gcc/ada/libgnat/s-conca2.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,8 +32,6 @@ -- This package contains a procedure for runtime concatenation of two string -- operands. It is used when we want to save space in the generated code. -pragma Compiler_Unit_Warning; - package System.Concat_2 is procedure Str_Concat_2 (R : out String; S1, S2 : String); diff --git a/gcc/ada/libgnat/s-conca3.adb b/gcc/ada/libgnat/s-conca3.adb index 37a8681..d607082 100644 --- a/gcc/ada/libgnat/s-conca3.adb +++ b/gcc/ada/libgnat/s-conca3.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with System.Concat_2; package body System.Concat_3 is diff --git a/gcc/ada/libgnat/s-conca3.ads b/gcc/ada/libgnat/s-conca3.ads index 155bebf..d7282ff 100644 --- a/gcc/ada/libgnat/s-conca3.ads +++ b/gcc/ada/libgnat/s-conca3.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,8 +32,6 @@ -- This package contains a procedure for runtime concatenation of three string -- operands. It is used when we want to save space in the generated code. -pragma Compiler_Unit_Warning; - package System.Concat_3 is procedure Str_Concat_3 (R : out String; S1, S2, S3 : String); diff --git a/gcc/ada/libgnat/s-conca4.adb b/gcc/ada/libgnat/s-conca4.adb index da50627..694033a 100644 --- a/gcc/ada/libgnat/s-conca4.adb +++ b/gcc/ada/libgnat/s-conca4.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with System.Concat_3; package body System.Concat_4 is diff --git a/gcc/ada/libgnat/s-conca4.ads b/gcc/ada/libgnat/s-conca4.ads index 1d8e15c..88b464d 100644 --- a/gcc/ada/libgnat/s-conca4.ads +++ b/gcc/ada/libgnat/s-conca4.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,8 +32,6 @@ -- This package contains a procedure for runtime concatenation of four string -- operands. It is used when we want to save space in the generated code. -pragma Compiler_Unit_Warning; - package System.Concat_4 is procedure Str_Concat_4 (R : out String; S1, S2, S3, S4 : String); diff --git a/gcc/ada/libgnat/s-conca5.adb b/gcc/ada/libgnat/s-conca5.adb index 0de4aa5..f611260 100644 --- a/gcc/ada/libgnat/s-conca5.adb +++ b/gcc/ada/libgnat/s-conca5.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with System.Concat_4; package body System.Concat_5 is diff --git a/gcc/ada/libgnat/s-conca5.ads b/gcc/ada/libgnat/s-conca5.ads index 6193adb..f6b8988 100644 --- a/gcc/ada/libgnat/s-conca5.ads +++ b/gcc/ada/libgnat/s-conca5.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,8 +32,6 @@ -- This package contains a procedure for runtime concatenation of five string -- operands. It is used when we want to save space in the generated code. -pragma Compiler_Unit_Warning; - package System.Concat_5 is procedure Str_Concat_5 (R : out String; S1, S2, S3, S4, S5 : String); diff --git a/gcc/ada/libgnat/s-conca6.adb b/gcc/ada/libgnat/s-conca6.adb index d51201f..66b767f 100644 --- a/gcc/ada/libgnat/s-conca6.adb +++ b/gcc/ada/libgnat/s-conca6.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with System.Concat_5; package body System.Concat_6 is diff --git a/gcc/ada/libgnat/s-conca6.ads b/gcc/ada/libgnat/s-conca6.ads index ee38e69..e753251 100644 --- a/gcc/ada/libgnat/s-conca6.ads +++ b/gcc/ada/libgnat/s-conca6.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,8 +32,6 @@ -- This package contains a procedure for runtime concatenation of six string -- operands. It is used when we want to save space in the generated code. -pragma Compiler_Unit_Warning; - package System.Concat_6 is procedure Str_Concat_6 (R : out String; S1, S2, S3, S4, S5, S6 : String); diff --git a/gcc/ada/libgnat/s-conca7.adb b/gcc/ada/libgnat/s-conca7.adb index 787b4f2..0250887 100644 --- a/gcc/ada/libgnat/s-conca7.adb +++ b/gcc/ada/libgnat/s-conca7.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with System.Concat_6; package body System.Concat_7 is diff --git a/gcc/ada/libgnat/s-conca7.ads b/gcc/ada/libgnat/s-conca7.ads index 74d05dc..c130ddf 100644 --- a/gcc/ada/libgnat/s-conca7.ads +++ b/gcc/ada/libgnat/s-conca7.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,8 +32,6 @@ -- This package contains a procedure for runtime concatenation of seven string -- operands. It is used when we want to save space in the generated code. -pragma Compiler_Unit_Warning; - package System.Concat_7 is procedure Str_Concat_7 diff --git a/gcc/ada/libgnat/s-conca8.adb b/gcc/ada/libgnat/s-conca8.adb index 8e64e46..d6ee36c 100644 --- a/gcc/ada/libgnat/s-conca8.adb +++ b/gcc/ada/libgnat/s-conca8.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with System.Concat_7; package body System.Concat_8 is diff --git a/gcc/ada/libgnat/s-conca8.ads b/gcc/ada/libgnat/s-conca8.ads index d739b30..dda35c1 100644 --- a/gcc/ada/libgnat/s-conca8.ads +++ b/gcc/ada/libgnat/s-conca8.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,8 +32,6 @@ -- This package contains a procedure for runtime concatenation of eight string -- operands. It is used when we want to save space in the generated code. -pragma Compiler_Unit_Warning; - package System.Concat_8 is procedure Str_Concat_8 diff --git a/gcc/ada/libgnat/s-conca9.adb b/gcc/ada/libgnat/s-conca9.adb index 83456e9..bfe228e 100644 --- a/gcc/ada/libgnat/s-conca9.adb +++ b/gcc/ada/libgnat/s-conca9.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with System.Concat_8; package body System.Concat_9 is diff --git a/gcc/ada/libgnat/s-conca9.ads b/gcc/ada/libgnat/s-conca9.ads index 61d6d6b..7737a1e 100644 --- a/gcc/ada/libgnat/s-conca9.ads +++ b/gcc/ada/libgnat/s-conca9.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,8 +32,6 @@ -- This package contains a procedure for runtime concatenation of eight string -- operands. It is used when we want to save space in the generated code. -pragma Compiler_Unit_Warning; - package System.Concat_9 is procedure Str_Concat_9 diff --git a/gcc/ada/libgnat/s-crc32.adb b/gcc/ada/libgnat/s-crc32.adb index 9f34ed5..473ab98 100644 --- a/gcc/ada/libgnat/s-crc32.adb +++ b/gcc/ada/libgnat/s-crc32.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package body System.CRC32 is Init : constant CRC32 := 16#FFFF_FFFF#; -- Initial value @@ -41,7 +39,7 @@ package body System.CRC32 is -- than processing the byte bit by bit. Table : constant array (CRC32 range 0 .. 255) of CRC32 := - (16#0000_0000#, 16#7707_3096#, 16#EE0E_612C#, 16#9909_51BA#, + [16#0000_0000#, 16#7707_3096#, 16#EE0E_612C#, 16#9909_51BA#, 16#076D_C419#, 16#706A_F48F#, 16#E963_A535#, 16#9E64_95A3#, 16#0EDB_8832#, 16#79DC_B8A4#, 16#E0D5_E91E#, 16#97D2_D988#, 16#09B6_4C2B#, 16#7EB1_7CBD#, 16#E7B8_2D07#, 16#90BF_1D91#, @@ -104,7 +102,7 @@ package body System.CRC32 is 16#BDBD_F21C#, 16#CABA_C28A#, 16#53B3_9330#, 16#24B4_A3A6#, 16#BAD0_3605#, 16#CDD7_0693#, 16#54DE_5729#, 16#23D9_67BF#, 16#B366_7A2E#, 16#C461_4AB8#, 16#5D68_1B02#, 16#2A6F_2B94#, - 16#B40B_BE37#, 16#C30C_8EA1#, 16#5A05_DF1B#, 16#2D02_EF8D#); + 16#B40B_BE37#, 16#C30C_8EA1#, 16#5A05_DF1B#, 16#2D02_EF8D#]; --------------- -- Get_Value -- diff --git a/gcc/ada/libgnat/s-crc32.ads b/gcc/ada/libgnat/s-crc32.ads index b595fc4..4460e70 100644 --- a/gcc/ada/libgnat/s-crc32.ads +++ b/gcc/ada/libgnat/s-crc32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -54,8 +54,6 @@ -- "Computation of Cyclic Redundancy Checks via Table Look-Up", Communications -- of the ACM, Vol. 31 No. 8, pp.1008-1013 Aug. 1988. Sarwate, D.V. -pragma Compiler_Unit_Warning; - with Interfaces; package System.CRC32 is diff --git a/gcc/ada/libgnat/s-crtl.ads b/gcc/ada/libgnat/s-crtl.ads index d26dbf3..0f4384b 100644 --- a/gcc/ada/libgnat/s-crtl.ads +++ b/gcc/ada/libgnat/s-crtl.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,8 +31,6 @@ -- This package provides the low level interface to the C runtime library -pragma Compiler_Unit_Warning; - with System.Parameters; package System.CRTL is diff --git a/gcc/ada/libgnat/s-dfmkio.ads b/gcc/ada/libgnat/s-dfmkio.ads index f9df157..9d56a2d 100644 --- a/gcc/ada/libgnat/s-dfmkio.ads +++ b/gcc/ada/libgnat/s-dfmkio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2018-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dfmopr.ads b/gcc/ada/libgnat/s-dfmopr.ads index daf5189..e172ee3 100644 --- a/gcc/ada/libgnat/s-dfmopr.ads +++ b/gcc/ada/libgnat/s-dfmopr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2018-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dgmgop.ads b/gcc/ada/libgnat/s-dgmgop.ads index 91b8f3e..daa3ae5 100644 --- a/gcc/ada/libgnat/s-dgmgop.ads +++ b/gcc/ada/libgnat/s-dgmgop.ads @@ -7,7 +7,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-diflio.adb b/gcc/ada/libgnat/s-diflio.adb index 1343e95..a6cbb44 100644 --- a/gcc/ada/libgnat/s-diflio.adb +++ b/gcc/ada/libgnat/s-diflio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-diflio.ads b/gcc/ada/libgnat/s-diflio.ads index 3abe428..b5546d4 100644 --- a/gcc/ada/libgnat/s-diflio.ads +++ b/gcc/ada/libgnat/s-diflio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-diflmk.ads b/gcc/ada/libgnat/s-diflmk.ads index 02db92d..00ffb24 100644 --- a/gcc/ada/libgnat/s-diflmk.ads +++ b/gcc/ada/libgnat/s-diflmk.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2018-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-digemk.ads b/gcc/ada/libgnat/s-digemk.ads index be97085..0af3a8d 100644 --- a/gcc/ada/libgnat/s-digemk.ads +++ b/gcc/ada/libgnat/s-digemk.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-diinio.adb b/gcc/ada/libgnat/s-diinio.adb index 559504e..4abb0c9 100644 --- a/gcc/ada/libgnat/s-diinio.adb +++ b/gcc/ada/libgnat/s-diinio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-diinio.ads b/gcc/ada/libgnat/s-diinio.ads index a79e723..90b850d 100644 --- a/gcc/ada/libgnat/s-diinio.ads +++ b/gcc/ada/libgnat/s-diinio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dilomk.ads b/gcc/ada/libgnat/s-dilomk.ads index 37e101b..a62a9ef 100644 --- a/gcc/ada/libgnat/s-dilomk.ads +++ b/gcc/ada/libgnat/s-dilomk.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2018-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dim.ads b/gcc/ada/libgnat/s-dim.ads index 0bcc0da..2c95364 100644 --- a/gcc/ada/libgnat/s-dim.ads +++ b/gcc/ada/libgnat/s-dim.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2012-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dimkio.ads b/gcc/ada/libgnat/s-dimkio.ads index 186319e..a5f4f48 100644 --- a/gcc/ada/libgnat/s-dimkio.ads +++ b/gcc/ada/libgnat/s-dimkio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dimmks.ads b/gcc/ada/libgnat/s-dimmks.ads index 91176649..a02cf69 100644 --- a/gcc/ada/libgnat/s-dimmks.ads +++ b/gcc/ada/libgnat/s-dimmks.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-direio.adb b/gcc/ada/libgnat/s-direio.adb index 8e3740c..8c080c3 100644 --- a/gcc/ada/libgnat/s-direio.adb +++ b/gcc/ada/libgnat/s-direio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,7 +32,6 @@ with Ada.IO_Exceptions; use Ada.IO_Exceptions; with Ada.Unchecked_Deallocation; with Interfaces.C_Streams; use Interfaces.C_Streams; -with System; use System; with System.CRTL; with System.File_IO; with System.Soft_Links; diff --git a/gcc/ada/libgnat/s-direio.ads b/gcc/ada/libgnat/s-direio.ads index 01ffbca..0fc077b 100644 --- a/gcc/ada/libgnat/s-direio.ads +++ b/gcc/ada/libgnat/s-direio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dlmkio.ads b/gcc/ada/libgnat/s-dlmkio.ads index d0b0bb2..0d107c4 100644 --- a/gcc/ada/libgnat/s-dlmkio.ads +++ b/gcc/ada/libgnat/s-dlmkio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2018-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dlmopr.ads b/gcc/ada/libgnat/s-dlmopr.ads index 6fe46a5..ab674ab 100644 --- a/gcc/ada/libgnat/s-dlmopr.ads +++ b/gcc/ada/libgnat/s-dlmopr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2018-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dmotpr.ads b/gcc/ada/libgnat/s-dmotpr.ads index 458ae52..6c14846 100644 --- a/gcc/ada/libgnat/s-dmotpr.ads +++ b/gcc/ada/libgnat/s-dmotpr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dorepr.adb b/gcc/ada/libgnat/s-dorepr.adb index 9f6df92..941b4fb 100644 --- a/gcc/ada/libgnat/s-dorepr.adb +++ b/gcc/ada/libgnat/s-dorepr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dorepr__fma.adb b/gcc/ada/libgnat/s-dorepr__fma.adb index 56d4dbb..1f8c9ee 100644 --- a/gcc/ada/libgnat/s-dorepr__fma.adb +++ b/gcc/ada/libgnat/s-dorepr__fma.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dourea.adb b/gcc/ada/libgnat/s-dourea.adb index 53bed1d..a6cf2a1 100644 --- a/gcc/ada/libgnat/s-dourea.adb +++ b/gcc/ada/libgnat/s-dourea.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dourea.ads b/gcc/ada/libgnat/s-dourea.ads index 0c97f34..29c10d9 100644 --- a/gcc/ada/libgnat/s-dourea.ads +++ b/gcc/ada/libgnat/s-dourea.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dsaser.ads b/gcc/ada/libgnat/s-dsaser.ads index da0d17b..d898e52 100644 --- a/gcc/ada/libgnat/s-dsaser.ads +++ b/gcc/ada/libgnat/s-dsaser.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2006-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-dwalin.adb b/gcc/ada/libgnat/s-dwalin.adb index e02b0fd..788be41 100644 --- a/gcc/ada/libgnat/s-dwalin.adb +++ b/gcc/ada/libgnat/s-dwalin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -35,7 +35,6 @@ with Ada.Unchecked_Deallocation; with Interfaces; use Interfaces; -with System; use System; with System.Address_Image; with System.Bounded_Strings; use System.Bounded_Strings; with System.IO; use System.IO; diff --git a/gcc/ada/libgnat/s-dwalin.ads b/gcc/ada/libgnat/s-dwalin.ads index bd86e5e..4148a17 100644 --- a/gcc/ada/libgnat/s-dwalin.ads +++ b/gcc/ada/libgnat/s-dwalin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-elaall.adb b/gcc/ada/libgnat/s-elaall.adb index 5807433..35826d8 100644 --- a/gcc/ada/libgnat/s-elaall.adb +++ b/gcc/ada/libgnat/s-elaall.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2014-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-elaall.ads b/gcc/ada/libgnat/s-elaall.ads index 44c1f60..b9a6dd1 100644 --- a/gcc/ada/libgnat/s-elaall.ads +++ b/gcc/ada/libgnat/s-elaall.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2014-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-excdeb.adb b/gcc/ada/libgnat/s-excdeb.adb index 2c22ee9..63d3c17 100644 --- a/gcc/ada/libgnat/s-excdeb.adb +++ b/gcc/ada/libgnat/s-excdeb.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2006-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package body System.Exceptions_Debug is --------------------------- diff --git a/gcc/ada/libgnat/s-excdeb.ads b/gcc/ada/libgnat/s-excdeb.ads index 6c93f4c..3b9b537 100644 --- a/gcc/ada/libgnat/s-excdeb.ads +++ b/gcc/ada/libgnat/s-excdeb.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2006-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -33,8 +33,6 @@ -- It should be compiled without optimization to let debuggers inspect -- parameter values reliably from breakpoints on the routines. -pragma Compiler_Unit_Warning; - with System.Standard_Library; package System.Exceptions_Debug is diff --git a/gcc/ada/libgnat/s-except.adb b/gcc/ada/libgnat/s-except.adb index fa220b3..dec7ea7 100644 --- a/gcc/ada/libgnat/s-except.adb +++ b/gcc/ada/libgnat/s-except.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2006-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-except.ads b/gcc/ada/libgnat/s-except.ads index 10448bc..5404156 100644 --- a/gcc/ada/libgnat/s-except.ads +++ b/gcc/ada/libgnat/s-except.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2006-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package System.Exceptions is pragma Preelaborate; diff --git a/gcc/ada/libgnat/s-excmac__arm.adb b/gcc/ada/libgnat/s-excmac__arm.adb index 8dc6974..ff53464 100644 --- a/gcc/ada/libgnat/s-excmac__arm.adb +++ b/gcc/ada/libgnat/s-excmac__arm.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2013-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-excmac__arm.ads b/gcc/ada/libgnat/s-excmac__arm.ads index f69690d..9438e26 100644 --- a/gcc/ada/libgnat/s-excmac__arm.ads +++ b/gcc/ada/libgnat/s-excmac__arm.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2013-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-excmac__gcc.adb b/gcc/ada/libgnat/s-excmac__gcc.adb index 1b03a1b..7cfed83 100644 --- a/gcc/ada/libgnat/s-excmac__gcc.adb +++ b/gcc/ada/libgnat/s-excmac__gcc.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2013-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-excmac__gcc.ads b/gcc/ada/libgnat/s-excmac__gcc.ads index ffb8ea3..a004d94 100644 --- a/gcc/ada/libgnat/s-excmac__gcc.ads +++ b/gcc/ada/libgnat/s-excmac__gcc.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2013-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-exctab.adb b/gcc/ada/libgnat/s-exctab.adb index 48e3247..44eabfc 100644 --- a/gcc/ada/libgnat/s-exctab.adb +++ b/gcc/ada/libgnat/s-exctab.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1996-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with System.Soft_Links; use System.Soft_Links; package body System.Exception_Table is diff --git a/gcc/ada/libgnat/s-exctab.ads b/gcc/ada/libgnat/s-exctab.ads index 0d1774e..07a12c1 100644 --- a/gcc/ada/libgnat/s-exctab.ads +++ b/gcc/ada/libgnat/s-exctab.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1996-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -33,8 +33,6 @@ -- registered exception names, for the implementation of the mapping -- of names to exceptions (used for exception streams and attributes) -pragma Compiler_Unit_Warning; - with System.Standard_Library; package System.Exception_Table is diff --git a/gcc/ada/libgnat/s-exctra.adb b/gcc/ada/libgnat/s-exctra.adb index 963f5f9..442d611 100644 --- a/gcc/ada/libgnat/s-exctra.adb +++ b/gcc/ada/libgnat/s-exctra.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-exctra.ads b/gcc/ada/libgnat/s-exctra.ads index 6be48fb..a7b81ed 100644 --- a/gcc/ada/libgnat/s-exctra.ads +++ b/gcc/ada/libgnat/s-exctra.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-exnflt.ads b/gcc/ada/libgnat/s-exnflt.ads index 13079fc..8acf8f0 100644 --- a/gcc/ada/libgnat/s-exnflt.ads +++ b/gcc/ada/libgnat/s-exnflt.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-exnint.adb b/gcc/ada/libgnat/s-exnint.adb index 052dd1c..20775c5 100644 --- a/gcc/ada/libgnat/s-exnint.adb +++ b/gcc/ada/libgnat/s-exnint.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-exnint.ads b/gcc/ada/libgnat/s-exnint.ads index cfdf933..2ac89fd 100644 --- a/gcc/ada/libgnat/s-exnint.ads +++ b/gcc/ada/libgnat/s-exnint.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,11 +31,26 @@ -- Integer exponentiation (checks off) +-- Preconditions, postconditions, ghost code, loop invariants and assertions +-- in this unit are meant for analysis only, not for run-time checking, as it +-- would be too costly otherwise. This is enforced by setting the assertion +-- policy to Ignore. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + with System.Exponn; -package System.Exn_Int is +package System.Exn_Int + with SPARK_Mode +is + + package Exponn_Integer is new Exponn (Integer); - function Exn_Integer is new Exponn (Integer); - pragma Pure_Function (Exn_Integer); + function Exn_Integer (Left : Integer; Right : Natural) return Integer + renames Exponn_Integer.Expon; end System.Exn_Int; diff --git a/gcc/ada/libgnat/s-exnlfl.ads b/gcc/ada/libgnat/s-exnlfl.ads index 58d4a4c..bedb1f7 100644 --- a/gcc/ada/libgnat/s-exnlfl.ads +++ b/gcc/ada/libgnat/s-exnlfl.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-exnllf.adb b/gcc/ada/libgnat/s-exnllf.adb index 2186c6d..c278e83 100644 --- a/gcc/ada/libgnat/s-exnllf.adb +++ b/gcc/ada/libgnat/s-exnllf.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-exnllf.ads b/gcc/ada/libgnat/s-exnllf.ads index 2b02a65..9426035 100644 --- a/gcc/ada/libgnat/s-exnllf.ads +++ b/gcc/ada/libgnat/s-exnllf.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-exnlli.adb b/gcc/ada/libgnat/s-exnlli.adb index 4fdcf89..b7f8194 100644 --- a/gcc/ada/libgnat/s-exnlli.adb +++ b/gcc/ada/libgnat/s-exnlli.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-exnlli.ads b/gcc/ada/libgnat/s-exnlli.ads index 4a54344..80118d0 100644 --- a/gcc/ada/libgnat/s-exnlli.ads +++ b/gcc/ada/libgnat/s-exnlli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,11 +31,27 @@ -- Long_Long_Integer exponentiation (checks off) +-- Preconditions, postconditions, ghost code, loop invariants and assertions +-- in this unit are meant for analysis only, not for run-time checking, as it +-- would be too costly otherwise. This is enforced by setting the assertion +-- policy to Ignore. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + with System.Exponn; -package System.Exn_LLI is +package System.Exn_LLI + with SPARK_Mode +is + + package Exponn_Integer is new Exponn (Long_Long_Integer); - function Exn_Long_Long_Integer is new Exponn (Long_Long_Integer); - pragma Pure_Function (Exn_Long_Long_Integer); + function Exn_Long_Long_Integer + (Left : Long_Long_Integer; Right : Natural) return Long_Long_Integer + renames Exponn_Integer.Expon; end System.Exn_LLI; diff --git a/gcc/ada/libgnat/s-exnllli.ads b/gcc/ada/libgnat/s-exnllli.ads index 06a9784..61b515b 100644 --- a/gcc/ada/libgnat/s-exnllli.ads +++ b/gcc/ada/libgnat/s-exnllli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,11 +31,28 @@ -- Long_Long_Long_Integer exponentiation (checks off) +-- Preconditions, postconditions, ghost code, loop invariants and assertions +-- in this unit are meant for analysis only, not for run-time checking, as it +-- would be too costly otherwise. This is enforced by setting the assertion +-- policy to Ignore. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + with System.Exponn; -package System.Exn_LLLI is +package System.Exn_LLLI + with SPARK_Mode +is + + package Exponn_Integer is new Exponn (Long_Long_Long_Integer); - function Exn_Long_Long_Long_Integer is new Exponn (Long_Long_Long_Integer); - pragma Pure_Function (Exn_Long_Long_Long_Integer); + function Exn_Long_Long_Long_Integer + (Left : Long_Long_Long_Integer; Right : Natural) + return Long_Long_Long_Integer + renames Exponn_Integer.Expon; end System.Exn_LLLI; diff --git a/gcc/ada/libgnat/s-expint.adb b/gcc/ada/libgnat/s-expint.adb index b19a72f..f451693 100644 --- a/gcc/ada/libgnat/s-expint.adb +++ b/gcc/ada/libgnat/s-expint.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-expint.ads b/gcc/ada/libgnat/s-expint.ads index f41b6fa..500495a 100644 --- a/gcc/ada/libgnat/s-expint.ads +++ b/gcc/ada/libgnat/s-expint.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,11 +31,26 @@ -- Integer exponentiation (checks on) +-- Preconditions, postconditions, ghost code, loop invariants and assertions +-- in this unit are meant for analysis only, not for run-time checking, as it +-- would be too costly otherwise. This is enforced by setting the assertion +-- policy to Ignore. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + with System.Expont; -package System.Exp_Int is +package System.Exp_Int + with SPARK_Mode +is + + package Expont_Integer is new Expont (Integer); - function Exp_Integer is new Expont (Integer); - pragma Pure_Function (Exp_Integer); + function Exp_Integer (Left : Integer; Right : Natural) return Integer + renames Expont_Integer.Expon; end System.Exp_Int; diff --git a/gcc/ada/libgnat/s-explli.adb b/gcc/ada/libgnat/s-explli.adb index ccfbec0..283cad6 100644 --- a/gcc/ada/libgnat/s-explli.adb +++ b/gcc/ada/libgnat/s-explli.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-explli.ads b/gcc/ada/libgnat/s-explli.ads index d9c8544..f8f2c10 100644 --- a/gcc/ada/libgnat/s-explli.ads +++ b/gcc/ada/libgnat/s-explli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,11 +31,27 @@ -- Long_Long_Integer exponentiation (checks on) +-- Preconditions, postconditions, ghost code, loop invariants and assertions +-- in this unit are meant for analysis only, not for run-time checking, as it +-- would be too costly otherwise. This is enforced by setting the assertion +-- policy to Ignore. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + with System.Expont; -package System.Exp_LLI is +package System.Exp_LLI + with SPARK_Mode +is + + package Expont_Integer is new Expont (Long_Long_Integer); - function Exp_Long_Long_Integer is new Expont (Long_Long_Integer); - pragma Pure_Function (Exp_Long_Long_Integer); + function Exp_Long_Long_Integer + (Left : Long_Long_Integer; Right : Natural) return Long_Long_Integer + renames Expont_Integer.Expon; end System.Exp_LLI; diff --git a/gcc/ada/libgnat/s-expllli.ads b/gcc/ada/libgnat/s-expllli.ads index 1ee278d..017efec 100644 --- a/gcc/ada/libgnat/s-expllli.ads +++ b/gcc/ada/libgnat/s-expllli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,11 +31,28 @@ -- Long_Long_Long_Integer exponentiation (checks on) +-- Preconditions, postconditions, ghost code, loop invariants and assertions +-- in this unit are meant for analysis only, not for run-time checking, as it +-- would be too costly otherwise. This is enforced by setting the assertion +-- policy to Ignore. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + with System.Expont; -package System.Exp_LLLI is +package System.Exp_LLLI + with SPARK_Mode +is + + package Expont_Integer is new Expont (Long_Long_Long_Integer); - function Exp_Long_Long_Long_Integer is new Expont (Long_Long_Long_Integer); - pragma Pure_Function (Exp_Long_Long_Long_Integer); + function Exp_Long_Long_Long_Integer + (Left : Long_Long_Long_Integer; Right : Natural) + return Long_Long_Long_Integer + renames Expont_Integer.Expon; end System.Exp_LLLI; diff --git a/gcc/ada/libgnat/s-explllu.ads b/gcc/ada/libgnat/s-explllu.ads index 5a54ada..9b2d978 100644 --- a/gcc/ada/libgnat/s-explllu.ads +++ b/gcc/ada/libgnat/s-explllu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -34,10 +34,23 @@ -- The result is always full width, the caller must do a masking operation if -- the modulus is less than 2 ** Long_Long_Long_Unsigned'Size. +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced +-- by setting the corresponding assertion policy to Ignore. Postconditions +-- and contract cases should not be executed at runtime as well, in order +-- not to slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + with System.Exponu; with System.Unsigned_Types; -package System.Exp_LLLU is +package System.Exp_LLLU + with SPARK_Mode +is subtype Long_Long_Long_Unsigned is Unsigned_Types.Long_Long_Long_Unsigned; diff --git a/gcc/ada/libgnat/s-expllu.adb b/gcc/ada/libgnat/s-expllu.adb index 0c46560..c6003f5 100644 --- a/gcc/ada/libgnat/s-expllu.adb +++ b/gcc/ada/libgnat/s-expllu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-expllu.ads b/gcc/ada/libgnat/s-expllu.ads index 9f7b404..3b2a1b1 100644 --- a/gcc/ada/libgnat/s-expllu.ads +++ b/gcc/ada/libgnat/s-expllu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -34,10 +34,23 @@ -- The result is always full width, the caller must do a masking operation if -- the modulus is less than 2 ** Long_Long_Unsigned'Size. +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced +-- by setting the corresponding assertion policy to Ignore. Postconditions +-- and contract cases should not be executed at runtime as well, in order +-- not to slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + with System.Exponu; with System.Unsigned_Types; -package System.Exp_LLU is +package System.Exp_LLU + with SPARK_Mode +is subtype Long_Long_Unsigned is Unsigned_Types.Long_Long_Unsigned; diff --git a/gcc/ada/libgnat/s-expmod.adb b/gcc/ada/libgnat/s-expmod.adb index d3465d9..60d86e5 100644 --- a/gcc/ada/libgnat/s-expmod.adb +++ b/gcc/ada/libgnat/s-expmod.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,9 +29,168 @@ -- -- ------------------------------------------------------------------------------ -package body System.Exp_Mod is +-- Preconditions, postconditions, ghost code, loop invariants and assertions +-- in this unit are meant for analysis only, not for run-time checking, as it +-- would be too costly otherwise. This is enforced by setting the assertion +-- policy to Ignore. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + +with Ada.Numerics.Big_Numbers.Big_Integers_Ghost; +use Ada.Numerics.Big_Numbers.Big_Integers_Ghost; + +package body System.Exp_Mod + with SPARK_Mode +is use System.Unsigned_Types; + -- Local lemmas + + procedure Lemma_Add_Mod (X, Y : Big_Natural; B : Big_Positive) + with + Ghost, + Post => (X + Y) mod B = ((X mod B) + (Y mod B)) mod B; + + procedure Lemma_Exp_Expand (A : Big_Integer; Exp : Natural) + with + Ghost, + Post => + (if Exp rem 2 = 0 then + A ** Exp = A ** (Exp / 2) * A ** (Exp / 2) + else + A ** Exp = A ** (Exp / 2) * A ** (Exp / 2) * A); + + procedure Lemma_Exp_Mod (A : Big_Natural; Exp : Natural; B : Big_Positive) + with + Ghost, + Subprogram_Variant => (Decreases => Exp), + Post => ((A mod B) ** Exp) mod B = (A ** Exp) mod B; + + procedure Lemma_Mod_Ident (A : Big_Natural; B : Big_Positive) + with + Ghost, + Pre => A < B, + Post => A mod B = A; + + procedure Lemma_Mod_Mod (A : Big_Integer; B : Big_Positive) + with + Ghost, + Post => A mod B mod B = A mod B; + + procedure Lemma_Mult_Div (X : Big_Natural; Y : Big_Positive) + with + Ghost, + Post => X * Y / Y = X; + + procedure Lemma_Mult_Mod (X, Y : Big_Natural; B : Big_Positive) + with + Ghost, + -- The following subprogram variant can be added as soon as supported + -- Subprogram_Variant => (Decreases => Y), + Post => (X * Y) mod B = ((X mod B) * (Y mod B)) mod B; + + ----------------------------- + -- Local lemma null bodies -- + ----------------------------- + + procedure Lemma_Mod_Ident (A : Big_Natural; B : Big_Positive) is null; + procedure Lemma_Mod_Mod (A : Big_Integer; B : Big_Positive) is null; + procedure Lemma_Mult_Div (X : Big_Natural; Y : Big_Positive) is null; + + ------------------- + -- Lemma_Add_Mod -- + ------------------- + + procedure Lemma_Add_Mod (X, Y : Big_Natural; B : Big_Positive) is + Left : constant Big_Natural := (X + Y) mod B; + Right : constant Big_Natural := ((X mod B) + (Y mod B)) mod B; + XQuot : constant Big_Natural := X / B; + YQuot : constant Big_Natural := Y / B; + AQuot : constant Big_Natural := (X mod B + Y mod B) / B; + begin + if Y /= 0 and B > 1 then + pragma Assert (X = XQuot * B + X mod B); + pragma Assert (Y = YQuot * B + Y mod B); + pragma Assert + (Left = ((XQuot + YQuot) * B + X mod B + Y mod B) mod B); + pragma Assert (X mod B + Y mod B = AQuot * B + Right); + pragma Assert (Left = ((XQuot + YQuot + AQuot) * B + Right) mod B); + pragma Assert (Left = Right); + end if; + end Lemma_Add_Mod; + + ---------------------- + -- Lemma_Exp_Expand -- + ---------------------- + + procedure Lemma_Exp_Expand (A : Big_Integer; Exp : Natural) is + begin + if Exp rem 2 = 0 then + pragma Assert (Exp = Exp / 2 + Exp / 2); + else + pragma Assert (Exp = Exp / 2 + Exp / 2 + 1); + pragma Assert (A ** Exp = A ** (Exp / 2) * A ** (Exp / 2 + 1)); + pragma Assert (A ** (Exp / 2 + 1) = A ** (Exp / 2) * A); + pragma Assert (A ** Exp = A ** (Exp / 2) * A ** (Exp / 2) * A); + end if; + end Lemma_Exp_Expand; + + ------------------- + -- Lemma_Exp_Mod -- + ------------------- + + procedure Lemma_Exp_Mod (A : Big_Natural; Exp : Natural; B : Big_Positive) + is + begin + if Exp /= 0 then + declare + Left : constant Big_Integer := ((A mod B) ** Exp) mod B; + Right : constant Big_Integer := (A ** Exp) mod B; + begin + Lemma_Mult_Mod (A mod B, (A mod B) ** (Exp - 1), B); + Lemma_Mod_Mod (A, B); + Lemma_Exp_Mod (A, Exp - 1, B); + Lemma_Mult_Mod (A, A ** (Exp - 1), B); + pragma Assert (Left = Right); + end; + end if; + end Lemma_Exp_Mod; + + -------------------- + -- Lemma_Mult_Mod -- + -------------------- + + procedure Lemma_Mult_Mod (X, Y : Big_Natural; B : Big_Positive) is + Left : constant Big_Natural := (X * Y) mod B; + Right : constant Big_Natural := ((X mod B) * (Y mod B)) mod B; + begin + if Y /= 0 and B > 1 then + Lemma_Add_Mod (X * (Y - 1), X, B); + Lemma_Mult_Mod (X, Y - 1, B); + Lemma_Mod_Mod (X, B); + Lemma_Add_Mod ((X mod B) * ((Y - 1) mod B), X mod B, B); + Lemma_Add_Mod (Y - 1, 1, B); + pragma Assert (((Y - 1) mod B + 1) mod B = Y mod B); + if (Y - 1) mod B + 1 < B then + Lemma_Mod_Ident ((Y - 1) mod B + 1, B); + Lemma_Mod_Mod ((X mod B) * (Y mod B), B); + pragma Assert (Left = Right); + else + pragma Assert (Y mod B = 0); + pragma Assert ((X * Y) mod B = (X * Y) - (X * Y) / B * B); + pragma Assert + ((X * Y) mod B = (X * Y) - (X * (Y / B) * B) / B * B); + Lemma_Mult_Div (X * (Y / B), B); + pragma Assert (Left = 0); + pragma Assert (Left = Right); + end if; + end if; + end Lemma_Mult_Mod; + ----------------- -- Exp_Modular -- ----------------- @@ -47,11 +206,36 @@ package body System.Exp_Mod is function Mult (X, Y : Unsigned) return Unsigned is (Unsigned (Long_Long_Unsigned (X) * Long_Long_Unsigned (Y) - mod Long_Long_Unsigned (Modulus))); + mod Long_Long_Unsigned (Modulus))) + with + Pre => Modulus /= 0; -- Modular multiplication. Note that we can't take advantage of the -- compiler's circuit, because the modulus is not known statically. + -- Local ghost variables, functions and lemmas + + M : constant Big_Positive := Big (Modulus) with Ghost; + + function Equal_Modulo (X, Y : Big_Integer) return Boolean is + (X mod M = Y mod M) + with + Ghost, + Pre => Modulus /= 0; + + procedure Lemma_Mult (X, Y : Unsigned) + with + Ghost, + Post => Big (Mult (X, Y)) = (Big (X) * Big (Y)) mod M + and then Big (Mult (X, Y)) < M; + + procedure Lemma_Mult (X, Y : Unsigned) is null; + + Rest : Big_Integer with Ghost; + -- Ghost variable to hold Factor**Exp between Exp and Factor updates + begin + pragma Assert (Modulus /= 1); + -- We use the standard logarithmic approach, Exp gets shifted right -- testing successive low order bits and Factor is the value of the -- base raised to the next power of 2. @@ -62,14 +246,69 @@ package body System.Exp_Mod is if Exp /= 0 then loop + pragma Loop_Invariant (Exp > 0); + pragma Loop_Invariant (Result < Modulus); + pragma Loop_Invariant (Equal_Modulo + (Big (Result) * Big (Factor) ** Exp, Big (Left) ** Right)); + pragma Loop_Variant (Decreases => Exp); + pragma Annotate + (CodePeer, False_Positive, + "validity check", "confusion on generated code"); + if Exp rem 2 /= 0 then + pragma Assert + (Big (Factor) ** Exp + = Big (Factor) * Big (Factor) ** (Exp - 1)); + pragma Assert (Equal_Modulo + ((Big (Result) * Big (Factor)) * Big (Factor) ** (Exp - 1), + Big (Left) ** Right)); + Lemma_Mult_Mod (Big (Result) * Big (Factor), + Big (Factor) ** (Exp - 1), + Big (Modulus)); + Lemma_Mult (Result, Factor); + Result := Mult (Result, Factor); + + Lemma_Mod_Ident (Big (Result), Big (Modulus)); + Lemma_Mod_Mod (Big (Factor) ** (Exp - 1), Big (Modulus)); + Lemma_Mult_Mod (Big (Result), + Big (Factor) ** (Exp - 1), + Big (Modulus)); + pragma Assert (Equal_Modulo + (Big (Result) * Big (Factor) ** (Exp - 1), + Big (Left) ** Right)); + Lemma_Exp_Expand (Big (Factor), Exp - 1); + pragma Assert (Exp / 2 = (Exp - 1) / 2); end if; + Lemma_Exp_Expand (Big (Factor), Exp); + Exp := Exp / 2; exit when Exp = 0; + + Rest := Big (Factor) ** Exp; + pragma Assert (Equal_Modulo + (Big (Result) * (Rest * Rest), Big (Left) ** Right)); + Lemma_Exp_Mod (Big (Factor) * Big (Factor), Exp, Big (Modulus)); + pragma Assert + ((Big (Factor) * Big (Factor)) ** Exp = Rest * Rest); + pragma Assert (Equal_Modulo + ((Big (Factor) * Big (Factor)) ** Exp, + Rest * Rest)); + Lemma_Mult (Factor, Factor); + Factor := Mult (Factor, Factor); + + Lemma_Mod_Mod (Rest * Rest, Big (Modulus)); + Lemma_Mod_Ident (Big (Result), Big (Modulus)); + Lemma_Mult_Mod (Big (Result), Rest * Rest, Big (Modulus)); + Lemma_Mult_Mod (Big (Result), Big (Factor) ** Exp, + Big (Modulus)); + pragma Assert (Equal_Modulo + (Big (Result) * Big (Factor) ** Exp, Big (Left) ** Right)); end loop; + + pragma Assert (Big (Result) = Big (Left) ** Right mod Big (Modulus)); end if; return Result; diff --git a/gcc/ada/libgnat/s-expmod.ads b/gcc/ada/libgnat/s-expmod.ads index aa87efc..7e9d7bc 100644 --- a/gcc/ada/libgnat/s-expmod.ads +++ b/gcc/ada/libgnat/s-expmod.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -35,22 +35,50 @@ -- Note that 1 is a binary modulus (2**0), so the compiler should not (and -- will not) call this function with Modulus equal to 1. +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + +with Ada.Numerics.Big_Numbers.Big_Integers_Ghost; + with System.Unsigned_Types; -package System.Exp_Mod is - pragma Pure; +package System.Exp_Mod + with Pure, SPARK_Mode +is use type System.Unsigned_Types.Unsigned; + subtype Unsigned is System.Unsigned_Types.Unsigned; + + use type Ada.Numerics.Big_Numbers.Big_Integers_Ghost.Big_Integer; + subtype Big_Integer is + Ada.Numerics.Big_Numbers.Big_Integers_Ghost.Big_Integer + with Ghost; + + package Unsigned_Conversion is + new Ada.Numerics.Big_Numbers.Big_Integers_Ghost.Unsigned_Conversions + (Int => Unsigned); + + function Big (Arg : Unsigned) return Big_Integer is + (Unsigned_Conversion.To_Big_Integer (Arg)) + with Ghost; - subtype Power_Of_2 is System.Unsigned_Types.Unsigned with + subtype Power_Of_2 is Unsigned with Dynamic_Predicate => Power_Of_2 /= 0 and then (Power_Of_2 and (Power_Of_2 - 1)) = 0; function Exp_Modular - (Left : System.Unsigned_Types.Unsigned; - Modulus : System.Unsigned_Types.Unsigned; - Right : Natural) return System.Unsigned_Types.Unsigned + (Left : Unsigned; + Modulus : Unsigned; + Right : Natural) return Unsigned with - Pre => Modulus /= 0 and then Modulus not in Power_Of_2, - Post => Exp_Modular'Result = Left ** Right mod Modulus; + Pre => Modulus /= 0 and then Modulus not in Power_Of_2, + Post => Big (Exp_Modular'Result) = Big (Left) ** Right mod Big (Modulus); end System.Exp_Mod; diff --git a/gcc/ada/libgnat/s-exponn.adb b/gcc/ada/libgnat/s-exponn.adb index 8a1cd78..0d0a16b 100644 --- a/gcc/ada/libgnat/s-exponn.adb +++ b/gcc/ada/libgnat/s-exponn.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,44 +29,195 @@ -- -- ------------------------------------------------------------------------------ -function System.Exponn (Left : Int; Right : Natural) return Int is +package body System.Exponn + with SPARK_Mode +is - -- Note that negative exponents get a constraint error because the - -- subtype of the Right argument (the exponent) is Natural. + -- Preconditions, postconditions, ghost code, loop invariants and + -- assertions in this unit are meant for analysis only, not for run-time + -- checking, as it would be too costly otherwise. This is enforced by + -- setting the assertion policy to Ignore. - Result : Int := 1; - Factor : Int := Left; - Exp : Natural := Right; + pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); -begin - -- We use the standard logarithmic approach, Exp gets shifted right - -- testing successive low order bits and Factor is the value of the - -- base raised to the next power of 2. + -- Local lemmas - -- Note: it is not worth special casing base values -1, 0, +1 since - -- the expander does this when the base is a literal, and other cases - -- will be extremely rare. + procedure Lemma_Exp_Expand (A : Big_Integer; Exp : Natural) + with + Ghost, + Pre => A /= 0, + Post => + (if Exp rem 2 = 0 then + A ** Exp = A ** (Exp / 2) * A ** (Exp / 2) + else + A ** Exp = A ** (Exp / 2) * A ** (Exp / 2) * A); + + procedure Lemma_Exp_In_Range (A : Big_Integer; Exp : Positive) + with + Ghost, + Pre => In_Int_Range (A ** Exp * A ** Exp), + Post => In_Int_Range (A * A); + + procedure Lemma_Exp_Not_Zero (A : Big_Integer; Exp : Natural) + with + Ghost, + Pre => A /= 0, + Post => A ** Exp /= 0; + + procedure Lemma_Exp_Positive (A : Big_Integer; Exp : Natural) + with + Ghost, + Pre => A /= 0 + and then Exp rem 2 = 0, + Post => A ** Exp > 0; + + procedure Lemma_Mult_In_Range (X, Y, Z : Big_Integer) + with + Ghost, + Pre => Y /= 0 + and then not (X = -Big (Int'First) and Y = -1) + and then X * Y = Z + and then In_Int_Range (Z), + Post => In_Int_Range (X); + + ----------------------------- + -- Local lemma null bodies -- + ----------------------------- + + procedure Lemma_Exp_Not_Zero (A : Big_Integer; Exp : Natural) is null; + procedure Lemma_Mult_In_Range (X, Y, Z : Big_Integer) is null; + + ----------- + -- Expon -- + ----------- + + function Expon (Left : Int; Right : Natural) return Int is + + -- Note that negative exponents get a constraint error because the + -- subtype of the Right argument (the exponent) is Natural. + + Result : Int := 1; + Factor : Int := Left; + Exp : Natural := Right; + + Rest : Big_Integer with Ghost; + -- Ghost variable to hold Factor**Exp between Exp and Factor updates + + begin + -- We use the standard logarithmic approach, Exp gets shifted right + -- testing successive low order bits and Factor is the value of the + -- base raised to the next power of 2. + + -- Note: for compilation only, it is not worth special casing base + -- values -1, 0, +1 since the expander does this when the base is a + -- literal, and other cases will be extremely rare. But for proof, + -- special casing zero in both positions makes ghost code and lemmas + -- simpler, so we do it. + + if Right = 0 then + return 1; + elsif Left = 0 then + return 0; + end if; - if Exp /= 0 then loop + pragma Loop_Invariant (Exp > 0); + pragma Loop_Invariant (Factor /= 0); + pragma Loop_Invariant + (Big (Result) * Big (Factor) ** Exp = Big (Left) ** Right); + pragma Loop_Variant (Decreases => Exp); + if Exp rem 2 /= 0 then declare pragma Suppress (Overflow_Check); begin + pragma Assert + (Big (Factor) ** Exp + = Big (Factor) * Big (Factor) ** (Exp - 1)); + Lemma_Exp_Positive (Big (Factor), Exp - 1); + Lemma_Mult_In_Range (Big (Result) * Big (Factor), + Big (Factor) ** (Exp - 1), + Big (Left) ** Right); + Result := Result * Factor; end; end if; + Lemma_Exp_Expand (Big (Factor), Exp); + Exp := Exp / 2; exit when Exp = 0; + Rest := Big (Factor) ** Exp; + pragma Assert + (Big (Result) * (Rest * Rest) = Big (Left) ** Right); + declare pragma Suppress (Overflow_Check); begin + Lemma_Mult_In_Range (Rest * Rest, + Big (Result), + Big (Left) ** Right); + Lemma_Exp_In_Range (Big (Factor), Exp); + Factor := Factor * Factor; end; + + pragma Assert (Big (Factor) ** Exp = Rest * Rest); end loop; - end if; - return Result; + pragma Assert (Big (Result) = Big (Left) ** Right); + + return Result; + end Expon; + + ---------------------- + -- Lemma_Exp_Expand -- + ---------------------- + + procedure Lemma_Exp_Expand (A : Big_Integer; Exp : Natural) is + begin + if Exp rem 2 = 0 then + pragma Assert (Exp = Exp / 2 + Exp / 2); + else + pragma Assert (Exp = Exp / 2 + Exp / 2 + 1); + pragma Assert (A ** Exp = A ** (Exp / 2) * A ** (Exp / 2 + 1)); + pragma Assert (A ** (Exp / 2 + 1) = A ** (Exp / 2) * A); + pragma Assert (A ** Exp = A ** (Exp / 2) * A ** (Exp / 2) * A); + end if; + end Lemma_Exp_Expand; + + ------------------------ + -- Lemma_Exp_In_Range -- + ------------------------ + + procedure Lemma_Exp_In_Range (A : Big_Integer; Exp : Positive) is + begin + if A /= 0 and Exp /= 1 then + pragma Assert (A ** Exp = A * A ** (Exp - 1)); + Lemma_Mult_In_Range + (A * A, A ** (Exp - 1) * A ** (Exp - 1), A ** Exp * A ** Exp); + end if; + end Lemma_Exp_In_Range; + + ------------------------ + -- Lemma_Exp_Positive -- + ------------------------ + + procedure Lemma_Exp_Positive (A : Big_Integer; Exp : Natural) is + begin + if Exp = 0 then + pragma Assert (A ** Exp = 1); + else + pragma Assert (Exp = 2 * (Exp / 2)); + pragma Assert (A ** Exp = A ** (Exp / 2) * A ** (Exp / 2)); + pragma Assert (A ** Exp = (A ** (Exp / 2)) ** 2); + Lemma_Exp_Not_Zero (A, Exp / 2); + end if; + end Lemma_Exp_Positive; + end System.Exponn; diff --git a/gcc/ada/libgnat/s-exponn.ads b/gcc/ada/libgnat/s-exponn.ads index c95b0ed..2c95f60 100644 --- a/gcc/ada/libgnat/s-exponn.ads +++ b/gcc/ada/libgnat/s-exponn.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,8 +31,41 @@ -- Signed integer exponentiation (checks off) +with Ada.Numerics.Big_Numbers.Big_Integers_Ghost; +use Ada.Numerics.Big_Numbers.Big_Integers_Ghost; + generic type Int is range <>; -function System.Exponn (Left : Int; Right : Natural) return Int; +package System.Exponn + with Pure, SPARK_Mode +is + + -- Preconditions in this unit are meant for analysis only, not for run-time + -- checking, so that the expected exceptions are raised. This is enforced + -- by setting the corresponding assertion policy to Ignore. Postconditions + -- and contract cases should not be executed at runtime as well, in order + -- not to slow down the execution of these functions. + + pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + + package Signed_Conversion is new Signed_Conversions (Int => Int); + + function Big (Arg : Int) return Big_Integer is + (Signed_Conversion.To_Big_Integer (Arg)) + with Ghost; + + function In_Int_Range (Arg : Big_Integer) return Boolean is + (In_Range (Arg, Big (Int'First), Big (Int'Last))) + with Ghost; + + function Expon (Left : Int; Right : Natural) return Int + with + Pre => In_Int_Range (Big (Left) ** Right), + Post => Expon'Result = Left ** Right; + +end System.Exponn; diff --git a/gcc/ada/libgnat/s-exponr.adb b/gcc/ada/libgnat/s-exponr.adb index ad7f401..f6bab2f 100644 --- a/gcc/ada/libgnat/s-exponr.adb +++ b/gcc/ada/libgnat/s-exponr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-exponr.ads b/gcc/ada/libgnat/s-exponr.ads index e5bdec7..6b201d0 100644 --- a/gcc/ada/libgnat/s-exponr.ads +++ b/gcc/ada/libgnat/s-exponr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-expont.adb b/gcc/ada/libgnat/s-expont.adb index 3c259cf..4f576b8 100644 --- a/gcc/ada/libgnat/s-expont.adb +++ b/gcc/ada/libgnat/s-expont.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,44 +29,195 @@ -- -- ------------------------------------------------------------------------------ -function System.Expont (Left : Int; Right : Natural) return Int is +package body System.Expont + with SPARK_Mode +is - -- Note that negative exponents get a constraint error because the - -- subtype of the Right argument (the exponent) is Natural. + -- Preconditions, postconditions, ghost code, loop invariants and + -- assertions in this unit are meant for analysis only, not for run-time + -- checking, as it would be too costly otherwise. This is enforced by + -- setting the assertion policy to Ignore. - Result : Int := 1; - Factor : Int := Left; - Exp : Natural := Right; + pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); -begin - -- We use the standard logarithmic approach, Exp gets shifted right - -- testing successive low order bits and Factor is the value of the - -- base raised to the next power of 2. + -- Local lemmas - -- Note: it is not worth special casing base values -1, 0, +1 since - -- the expander does this when the base is a literal, and other cases - -- will be extremely rare. + procedure Lemma_Exp_Expand (A : Big_Integer; Exp : Natural) + with + Ghost, + Pre => A /= 0, + Post => + (if Exp rem 2 = 0 then + A ** Exp = A ** (Exp / 2) * A ** (Exp / 2) + else + A ** Exp = A ** (Exp / 2) * A ** (Exp / 2) * A); + + procedure Lemma_Exp_In_Range (A : Big_Integer; Exp : Positive) + with + Ghost, + Pre => In_Int_Range (A ** Exp * A ** Exp), + Post => In_Int_Range (A * A); + + procedure Lemma_Exp_Not_Zero (A : Big_Integer; Exp : Natural) + with + Ghost, + Pre => A /= 0, + Post => A ** Exp /= 0; + + procedure Lemma_Exp_Positive (A : Big_Integer; Exp : Natural) + with + Ghost, + Pre => A /= 0 + and then Exp rem 2 = 0, + Post => A ** Exp > 0; + + procedure Lemma_Mult_In_Range (X, Y, Z : Big_Integer) + with + Ghost, + Pre => Y /= 0 + and then not (X = -Big (Int'First) and Y = -1) + and then X * Y = Z + and then In_Int_Range (Z), + Post => In_Int_Range (X); + + ----------------------------- + -- Local lemma null bodies -- + ----------------------------- + + procedure Lemma_Exp_Not_Zero (A : Big_Integer; Exp : Natural) is null; + procedure Lemma_Mult_In_Range (X, Y, Z : Big_Integer) is null; + + ----------- + -- Expon -- + ----------- + + function Expon (Left : Int; Right : Natural) return Int is + + -- Note that negative exponents get a constraint error because the + -- subtype of the Right argument (the exponent) is Natural. + + Result : Int := 1; + Factor : Int := Left; + Exp : Natural := Right; + + Rest : Big_Integer with Ghost; + -- Ghost variable to hold Factor**Exp between Exp and Factor updates + + begin + -- We use the standard logarithmic approach, Exp gets shifted right + -- testing successive low order bits and Factor is the value of the + -- base raised to the next power of 2. + + -- Note: for compilation only, it is not worth special casing base + -- values -1, 0, +1 since the expander does this when the base is a + -- literal, and other cases will be extremely rare. But for proof, + -- special casing zero in both positions makes ghost code and lemmas + -- simpler, so we do it. + + if Right = 0 then + return 1; + elsif Left = 0 then + return 0; + end if; - if Exp /= 0 then loop + pragma Loop_Invariant (Exp > 0); + pragma Loop_Invariant (Factor /= 0); + pragma Loop_Invariant + (Big (Result) * Big (Factor) ** Exp = Big (Left) ** Right); + pragma Loop_Variant (Decreases => Exp); + if Exp rem 2 /= 0 then declare pragma Unsuppress (Overflow_Check); begin + pragma Assert + (Big (Factor) ** Exp + = Big (Factor) * Big (Factor) ** (Exp - 1)); + Lemma_Exp_Positive (Big (Factor), Exp - 1); + Lemma_Mult_In_Range (Big (Result) * Big (Factor), + Big (Factor) ** (Exp - 1), + Big (Left) ** Right); + Result := Result * Factor; end; end if; + Lemma_Exp_Expand (Big (Factor), Exp); + Exp := Exp / 2; exit when Exp = 0; + Rest := Big (Factor) ** Exp; + pragma Assert + (Big (Result) * (Rest * Rest) = Big (Left) ** Right); + declare pragma Unsuppress (Overflow_Check); begin + Lemma_Mult_In_Range (Rest * Rest, + Big (Result), + Big (Left) ** Right); + Lemma_Exp_In_Range (Big (Factor), Exp); + Factor := Factor * Factor; end; + + pragma Assert (Big (Factor) ** Exp = Rest * Rest); end loop; - end if; - return Result; + pragma Assert (Big (Result) = Big (Left) ** Right); + + return Result; + end Expon; + + ---------------------- + -- Lemma_Exp_Expand -- + ---------------------- + + procedure Lemma_Exp_Expand (A : Big_Integer; Exp : Natural) is + begin + if Exp rem 2 = 0 then + pragma Assert (Exp = Exp / 2 + Exp / 2); + else + pragma Assert (Exp = Exp / 2 + Exp / 2 + 1); + pragma Assert (A ** Exp = A ** (Exp / 2) * A ** (Exp / 2 + 1)); + pragma Assert (A ** (Exp / 2 + 1) = A ** (Exp / 2) * A); + pragma Assert (A ** Exp = A ** (Exp / 2) * A ** (Exp / 2) * A); + end if; + end Lemma_Exp_Expand; + + ------------------------ + -- Lemma_Exp_In_Range -- + ------------------------ + + procedure Lemma_Exp_In_Range (A : Big_Integer; Exp : Positive) is + begin + if A /= 0 and Exp /= 1 then + pragma Assert (A ** Exp = A * A ** (Exp - 1)); + Lemma_Mult_In_Range + (A * A, A ** (Exp - 1) * A ** (Exp - 1), A ** Exp * A ** Exp); + end if; + end Lemma_Exp_In_Range; + + ------------------------ + -- Lemma_Exp_Positive -- + ------------------------ + + procedure Lemma_Exp_Positive (A : Big_Integer; Exp : Natural) is + begin + if Exp = 0 then + pragma Assert (A ** Exp = 1); + else + pragma Assert (Exp = 2 * (Exp / 2)); + pragma Assert (A ** Exp = A ** (Exp / 2) * A ** (Exp / 2)); + pragma Assert (A ** Exp = (A ** (Exp / 2)) ** 2); + Lemma_Exp_Not_Zero (A, Exp / 2); + end if; + end Lemma_Exp_Positive; + end System.Expont; diff --git a/gcc/ada/libgnat/s-expont.ads b/gcc/ada/libgnat/s-expont.ads index 022cb64..7ca43ab 100644 --- a/gcc/ada/libgnat/s-expont.ads +++ b/gcc/ada/libgnat/s-expont.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,8 +31,41 @@ -- Signed integer exponentiation (checks on) +with Ada.Numerics.Big_Numbers.Big_Integers_Ghost; +use Ada.Numerics.Big_Numbers.Big_Integers_Ghost; + generic type Int is range <>; -function System.Expont (Left : Int; Right : Natural) return Int; +package System.Expont + with Pure, SPARK_Mode +is + + -- Preconditions in this unit are meant for analysis only, not for run-time + -- checking, so that the expected exceptions are raised. This is enforced + -- by setting the corresponding assertion policy to Ignore. Postconditions + -- and contract cases should not be executed at runtime as well, in order + -- not to slow down the execution of these functions. + + pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + + package Signed_Conversion is new Signed_Conversions (Int => Int); + + function Big (Arg : Int) return Big_Integer is + (Signed_Conversion.To_Big_Integer (Arg)) + with Ghost; + + function In_Int_Range (Arg : Big_Integer) return Boolean is + (In_Range (Arg, Big (Int'First), Big (Int'Last))) + with Ghost; + + function Expon (Left : Int; Right : Natural) return Int + with + Pre => In_Int_Range (Big (Left) ** Right), + Post => Expon'Result = Left ** Right; + +end System.Expont; diff --git a/gcc/ada/libgnat/s-exponu.adb b/gcc/ada/libgnat/s-exponu.adb index 9525638..214e613 100644 --- a/gcc/ada/libgnat/s-exponu.adb +++ b/gcc/ada/libgnat/s-exponu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,19 @@ -- -- ------------------------------------------------------------------------------ -function System.Exponu (Left : Int; Right : Natural) return Int is +function System.Exponu (Left : Int; Right : Natural) return Int + with SPARK_Mode +is + -- Preconditions, postconditions, ghost code, loop invariants and + -- assertions in this unit are meant for analysis only, not for run-time + -- checking, as it would be too costly otherwise. This is enforced by + -- setting the assertion policy to Ignore. + + pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); -- Note that negative exponents get a constraint error because the -- subtype of the Right argument (the exponent) is Natural. @@ -49,7 +61,16 @@ begin if Exp /= 0 then loop + pragma Loop_Invariant (Exp > 0); + pragma Loop_Invariant (Result * Factor ** Exp = Left ** Right); + pragma Loop_Variant (Decreases => Exp); + if Exp rem 2 /= 0 then + pragma Assert + (Result * (Factor * Factor ** (Exp - 1)) = Left ** Right); + pragma Assert + ((Result * Factor) * Factor ** (Exp - 1) = Left ** Right); + Result := Result * Factor; end if; diff --git a/gcc/ada/libgnat/s-exponu.ads b/gcc/ada/libgnat/s-exponu.ads index 7faa122..b115308 100644 --- a/gcc/ada/libgnat/s-exponu.ads +++ b/gcc/ada/libgnat/s-exponu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,8 +31,22 @@ -- Modular integer exponentiation +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced +-- by setting the corresponding assertion policy to Ignore. Postconditions +-- and contract cases should not be executed at runtime as well, in order +-- not to slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + generic type Int is mod <>; -function System.Exponu (Left : Int; Right : Natural) return Int; +function System.Exponu (Left : Int; Right : Natural) return Int +with + SPARK_Mode, + Post => System.Exponu'Result = Left ** Right; diff --git a/gcc/ada/libgnat/s-expuns.adb b/gcc/ada/libgnat/s-expuns.adb index 6f943da..b881c8c 100644 --- a/gcc/ada/libgnat/s-expuns.adb +++ b/gcc/ada/libgnat/s-expuns.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-expuns.ads b/gcc/ada/libgnat/s-expuns.ads index b49e7c0..e667f47 100644 --- a/gcc/ada/libgnat/s-expuns.ads +++ b/gcc/ada/libgnat/s-expuns.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -34,10 +34,23 @@ -- The result is always full width, the caller must do a masking operation if -- the modulus is less than 2 ** Unsigned'Size. +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced +-- by setting the corresponding assertion policy to Ignore. Postconditions +-- and contract cases should not be executed at runtime as well, in order +-- not to slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + with System.Exponu; with System.Unsigned_Types; -package System.Exp_Uns is +package System.Exp_Uns + with SPARK_Mode +is subtype Unsigned is Unsigned_Types.Unsigned; diff --git a/gcc/ada/libgnat/s-fatflt.ads b/gcc/ada/libgnat/s-fatflt.ads index 079326b..ca9c3b0 100644 --- a/gcc/ada/libgnat/s-fatflt.ads +++ b/gcc/ada/libgnat/s-fatflt.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fatgen.adb b/gcc/ada/libgnat/s-fatgen.adb index e591cca..7c04a5b 100644 --- a/gcc/ada/libgnat/s-fatgen.adb +++ b/gcc/ada/libgnat/s-fatgen.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -194,7 +194,6 @@ package body System.Fat_Gen is function Compose (Fraction : T; Exponent : UI) return T is Arg_Frac : T; Arg_Exp : UI; - pragma Unreferenced (Arg_Exp); begin Decompose (Fraction, Arg_Frac, Arg_Exp); return Scaling (Arg_Frac, Exponent); @@ -285,7 +284,6 @@ package body System.Fat_Gen is function Exponent (X : T) return UI is X_Frac : T; X_Exp : UI; - pragma Unreferenced (X_Frac); begin Decompose (X, X_Frac, X_Exp); return X_Exp; @@ -487,7 +485,6 @@ package body System.Fat_Gen is function Fraction (X : T) return T is X_Frac : T; X_Exp : UI; - pragma Unreferenced (X_Exp); begin Decompose (X, X_Frac, X_Exp); return X_Frac; @@ -624,7 +621,6 @@ package body System.Fat_Gen is P_Even : Boolean; Arg_Frac : T; - pragma Unreferenced (Arg_Frac); begin if Y = 0.0 then diff --git a/gcc/ada/libgnat/s-fatgen.ads b/gcc/ada/libgnat/s-fatgen.ads index 1b191e2..90dde0c 100644 --- a/gcc/ada/libgnat/s-fatgen.ads +++ b/gcc/ada/libgnat/s-fatgen.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fatlfl.ads b/gcc/ada/libgnat/s-fatlfl.ads index 08e0764..63713c9 100644 --- a/gcc/ada/libgnat/s-fatlfl.ads +++ b/gcc/ada/libgnat/s-fatlfl.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fatllf.ads b/gcc/ada/libgnat/s-fatllf.ads index 7aad47a..7659aa2 100644 --- a/gcc/ada/libgnat/s-fatllf.ads +++ b/gcc/ada/libgnat/s-fatllf.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-ficobl.ads b/gcc/ada/libgnat/s-ficobl.ads index 4e97079..1cb3699 100644 --- a/gcc/ada/libgnat/s-ficobl.ads +++ b/gcc/ada/libgnat/s-ficobl.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-filatt.ads b/gcc/ada/libgnat/s-filatt.ads index 30fa836..3af4018 100644 --- a/gcc/ada/libgnat/s-filatt.ads +++ b/gcc/ada/libgnat/s-filatt.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2013-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -46,6 +46,11 @@ package System.File_Attributes is (N : System.Address; A : access File_Attributes) return Integer; + function File_Length_Attr + (FD : Integer; + N : System.Address; + A : access File_Attributes) return Long_Long_Integer; + function Is_Regular_File_Attr (N : System.Address; A : access File_Attributes) return Integer; @@ -65,6 +70,7 @@ private pragma Import (C, Reset_Attributes, "__gnat_reset_attributes"); pragma Import (C, Error_Attributes, "__gnat_error_attributes"); pragma Import (C, File_Exists_Attr, "__gnat_file_exists_attr"); + pragma Import (C, File_Length_Attr, "__gnat_file_length_attr"); pragma Import (C, Is_Regular_File_Attr, "__gnat_is_regular_file_attr"); pragma Import (C, Is_Directory_Attr, "__gnat_is_directory_attr"); diff --git a/gcc/ada/libgnat/s-fileio.adb b/gcc/ada/libgnat/s-fileio.adb index 152cd96..3fdb297 100644 --- a/gcc/ada/libgnat/s-fileio.adb +++ b/gcc/ada/libgnat/s-fileio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -244,7 +244,7 @@ package body System.File_IO is if File.Shared_Status = Yes then declare - P : AFCB_Ptr; + P : AFCB_Ptr; begin P := Open_Files; @@ -576,7 +576,6 @@ package body System.File_IO is Default : Boolean) return Boolean is V1, V2 : Natural; - pragma Unreferenced (V2); begin Form_Parameter (Form, Keyword, V1, V2); diff --git a/gcc/ada/libgnat/s-fileio.ads b/gcc/ada/libgnat/s-fileio.ads index 56bd3e6..eaa4a08 100644 --- a/gcc/ada/libgnat/s-fileio.ads +++ b/gcc/ada/libgnat/s-fileio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-finmas.adb b/gcc/ada/libgnat/s-finmas.adb index 05029e1..3986c81 100644 --- a/gcc/ada/libgnat/s-finmas.adb +++ b/gcc/ada/libgnat/s-finmas.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2015-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-finmas.ads b/gcc/ada/libgnat/s-finmas.ads index ea5a3fb..e1a68a7 100644 --- a/gcc/ada/libgnat/s-finmas.ads +++ b/gcc/ada/libgnat/s-finmas.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -33,8 +33,6 @@ with Ada.Finalization; with System.Storage_Elements; with System.Storage_Pools; -pragma Compiler_Unit_Warning; - package System.Finalization_Masters is pragma Preelaborate; diff --git a/gcc/ada/libgnat/s-finroo.adb b/gcc/ada/libgnat/s-finroo.adb index 591b474..01598bb 100644 --- a/gcc/ada/libgnat/s-finroo.adb +++ b/gcc/ada/libgnat/s-finroo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-finroo.ads b/gcc/ada/libgnat/s-finroo.ads index 23393c5..f94a054 100644 --- a/gcc/ada/libgnat/s-finroo.ads +++ b/gcc/ada/libgnat/s-finroo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-flocon.adb b/gcc/ada/libgnat/s-flocon.adb index 008e629..81ebcbb 100644 --- a/gcc/ada/libgnat/s-flocon.adb +++ b/gcc/ada/libgnat/s-flocon.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, AdaCore -- +-- Copyright (C) 2011-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-flocon.ads b/gcc/ada/libgnat/s-flocon.ads index 0c66b78..0d5b91d 100644 --- a/gcc/ada/libgnat/s-flocon.ads +++ b/gcc/ada/libgnat/s-flocon.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, AdaCore -- +-- Copyright (C) 2000-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-flocon__none.adb b/gcc/ada/libgnat/s-flocon__none.adb index baf4edd..33d87ff 100644 --- a/gcc/ada/libgnat/s-flocon__none.adb +++ b/gcc/ada/libgnat/s-flocon__none.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, AdaCore -- +-- Copyright (C) 2011-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fode128.ads b/gcc/ada/libgnat/s-fode128.ads index c5490cf..0a0c3d4 100644 --- a/gcc/ada/libgnat/s-fode128.ads +++ b/gcc/ada/libgnat/s-fode128.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fode32.ads b/gcc/ada/libgnat/s-fode32.ads index 7e0d377..8e34c15 100644 --- a/gcc/ada/libgnat/s-fode32.ads +++ b/gcc/ada/libgnat/s-fode32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fode64.ads b/gcc/ada/libgnat/s-fode64.ads index 826aa50..90cf462 100644 --- a/gcc/ada/libgnat/s-fode64.ads +++ b/gcc/ada/libgnat/s-fode64.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fofi128.ads b/gcc/ada/libgnat/s-fofi128.ads index cbb9b02..baf59a9 100644 --- a/gcc/ada/libgnat/s-fofi128.ads +++ b/gcc/ada/libgnat/s-fofi128.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fofi32.ads b/gcc/ada/libgnat/s-fofi32.ads index b5b2645..d5ccd03 100644 --- a/gcc/ada/libgnat/s-fofi32.ads +++ b/gcc/ada/libgnat/s-fofi32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fofi64.ads b/gcc/ada/libgnat/s-fofi64.ads index 41acc77..26af059 100644 --- a/gcc/ada/libgnat/s-fofi64.ads +++ b/gcc/ada/libgnat/s-fofi64.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fore_d.adb b/gcc/ada/libgnat/s-fore_d.adb index 73f563f..0d345d7 100644 --- a/gcc/ada/libgnat/s-fore_d.adb +++ b/gcc/ada/libgnat/s-fore_d.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fore_d.ads b/gcc/ada/libgnat/s-fore_d.ads index b930370..902aa78 100644 --- a/gcc/ada/libgnat/s-fore_d.ads +++ b/gcc/ada/libgnat/s-fore_d.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fore_f.adb b/gcc/ada/libgnat/s-fore_f.adb index 109bffa..1d4fcd0 100644 --- a/gcc/ada/libgnat/s-fore_f.adb +++ b/gcc/ada/libgnat/s-fore_f.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-fore_f.ads b/gcc/ada/libgnat/s-fore_f.ads index 52cf449..ae20373 100644 --- a/gcc/ada/libgnat/s-fore_f.ads +++ b/gcc/ada/libgnat/s-fore_f.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-forrea.adb b/gcc/ada/libgnat/s-forrea.adb index 739ac92..bd9be89 100644 --- a/gcc/ada/libgnat/s-forrea.adb +++ b/gcc/ada/libgnat/s-forrea.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-forrea.ads b/gcc/ada/libgnat/s-forrea.ads index 73784c0..263a58a 100644 --- a/gcc/ada/libgnat/s-forrea.ads +++ b/gcc/ada/libgnat/s-forrea.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-gearop.adb b/gcc/ada/libgnat/s-gearop.adb index 957efd5..32c67c3 100644 --- a/gcc/ada/libgnat/s-gearop.adb +++ b/gcc/ada/libgnat/s-gearop.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2006-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,18 +29,44 @@ -- -- ------------------------------------------------------------------------------ +-- Preconditions, postconditions, ghost code, loop invariants and assertions +-- in this unit are meant for analysis only, not for run-time checking, as it +-- would be too costly otherwise. This is enforced by setting the assertion +-- policy to Ignore. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + with Ada.Numerics; use Ada.Numerics; -package body System.Generic_Array_Operations is + +package body System.Generic_Array_Operations + with SPARK_Mode +is + pragma Warnings + (Off, "aspect * not enforced on inlined subprogram", + Reason => "Contracts in this unit are never executed"); + function Check_Unit_Last (Index : Integer; Order : Positive; - First : Integer) return Integer; + First : Integer) return Integer + with + Pre => Index >= First + and then First <= Integer'Last - Order + 1 + and then Index <= First + (Order - 1), + Post => Check_Unit_Last'Result = First + (Order - 1); + pragma Inline_Always (Check_Unit_Last); -- Compute index of last element returned by Unit_Vector or Unit_Matrix. -- A separate function is needed to allow raising Constraint_Error before -- declaring the function result variable. The result variable needs to be -- declared first, to allow front-end inlining. + pragma Warnings (On, "aspect * not enforced on inlined subprogram"); + -------------- -- Diagonal -- -------------- @@ -48,9 +74,14 @@ package body System.Generic_Array_Operations is function Diagonal (A : Matrix) return Vector is N : constant Natural := Natural'Min (A'Length (1), A'Length (2)); begin - return R : Vector (A'First (1) .. A'First (1) + N - 1) do + return R : Vector (A'First (1) .. A'First (1) + (N - 1)) + with Relaxed_Initialization + do for J in 0 .. N - 1 loop R (R'First + J) := A (A'First (1) + J, A'First (2) + J); + + pragma Loop_Invariant + (for all JJ in R'First .. R'First + J => R (JJ)'Initialized); end loop; end return; end Diagonal; @@ -103,7 +134,10 @@ package body System.Generic_Array_Operations is (M : in out Matrix; Target : Integer; Source : Integer; - Factor : Scalar); + Factor : Scalar) + with + Pre => Target in M'Range (1) + and then Source in M'Range (1); -- Elementary row operation that subtracts Factor * M (Source, <>) from -- M (Target, <>) @@ -131,6 +165,9 @@ package body System.Generic_Array_Operations is begin Do_Rows : for Row in reverse M'Range (1) loop + + pragma Loop_Invariant (Max_Col <= M'Last (2)); + Find_Non_Zero : for Col in reverse M'First (2) .. Max_Col loop if Is_Non_Zero (M (Row, Col)) then @@ -144,12 +181,15 @@ package body System.Generic_Array_Operations is -- equals Integer'First, which is true for aggregates -- without explicit bounds.. - J : Integer := M'First (1); + J : Integer := M'First (1); + NZ : constant Scalar := M (Row, Col); begin while J < Row loop - Sub_Row (N, J, Row, (M (J, Col) / M (Row, Col))); - Sub_Row (M, J, Row, (M (J, Col) / M (Row, Col))); + pragma Loop_Invariant (J in M'Range (1)); + + Sub_Row (N, J, Row, (M (J, Col) / NZ)); + Sub_Row (M, J, Row, (M (J, Col) / NZ)); J := J + 1; end loop; end; @@ -189,19 +229,38 @@ package body System.Generic_Array_Operations is (M : in out Matrix; Target : Integer; Source : Integer; - Factor : Scalar); + Factor : Scalar) + with + Pre => Target in M'Range (1) + and then Source in M'Range (1); -- Subtrace Factor * M (Source, <>) from M (Target, <>) procedure Divide_Row (M, N : in out Matrix; Row : Integer; - Scale : Scalar); + Scale : Scalar) + with + Pre => Row in M'Range (1) + and then M'First (1) = N'First (1) + and then M'Last (1) = N'Last (1) + and then Scale /= Zero; -- Divide M (Row) and N (Row) by Scale, and update Det procedure Switch_Row (M, N : in out Matrix; Row_1 : Integer; - Row_2 : Integer); + Row_2 : Integer) + with + Pre => Row_1 in M'Range (1) + and then Row_2 in M'Range (1) + and then M'First (1) = N'First (1) + and then M'Last (1) = N'Last (1), + Post => (for all J in M'Range (2) => + M (Row_1, J) = M'Old (Row_2, J) + and then M (Row_2, J) = M'Old (Row_1, J)) + and then (for all J in N'Range (2) => + N (Row_1, J) = N'Old (Row_2, J) + and then N (Row_2, J) = N'Old (Row_1, J)); -- Exchange M (Row_1) and N (Row_1) with M (Row_2) and N (Row_2), -- negating Det in the process. @@ -238,8 +297,7 @@ package body System.Generic_Array_Operations is end loop; for J in N'Range (2) loop - N (Row - M'First (1) + N'First (1), J) := - N (Row - M'First (1) + N'First (1), J) / Scale; + N (Row, J) := N (Row, J) / Scale; pragma Annotate (CodePeer, False_Positive, "divide by zero", "Scale /= 0"); end loop; @@ -254,7 +312,9 @@ package body System.Generic_Array_Operations is Row_1 : Integer; Row_2 : Integer) is - procedure Swap (X, Y : in out Scalar); + procedure Swap (X, Y : in out Scalar) + with + Post => X = Y'Old and then Y = X'Old; -- Exchange the values of X and Y ---------- @@ -276,11 +336,28 @@ package body System.Generic_Array_Operations is for J in M'Range (2) loop Swap (M (Row_1, J), M (Row_2, J)); + pragma Annotate + (GNATprove, False_Positive, + "formal parameters ""X"" and ""Y"" might be aliased", + "Row_1 /= Row_2"); + + pragma Loop_Invariant + (for all JJ in M'First (2) .. J => + M (Row_1, JJ) = M'Loop_Entry (Row_2, JJ) + and then M (Row_2, JJ) = M'Loop_Entry (Row_1, JJ)); end loop; for J in N'Range (2) loop - Swap (N (Row_1 - M'First (1) + N'First (1), J), - N (Row_2 - M'First (1) + N'First (1), J)); + Swap (N (Row_1, J), N (Row_2, J)); + pragma Annotate + (GNATprove, False_Positive, + "formal parameters ""X"" and ""Y"" might be aliased", + "Row_1 /= Row_2"); + + pragma Loop_Invariant + (for all JJ in N'First (2) .. J => + N (Row_1, JJ) = N'Loop_Entry (Row_2, JJ) + and then N (Row_2, JJ) = N'Loop_Entry (Row_1, JJ)); end loop; end if; end Switch_Row; @@ -295,6 +372,8 @@ package body System.Generic_Array_Operations is Det := One; for J in M'Range (2) loop + pragma Loop_Invariant (Row >= M'First (1)); + declare Max_Row : Integer := Row; Max_Abs : Real'Base := 0.0; @@ -303,6 +382,10 @@ package body System.Generic_Array_Operations is -- Find best pivot in column J, starting in row Row for K in Row .. M'Last (1) loop + pragma Loop_Invariant (Max_Row in M'Range (1)); + pragma Loop_Invariant + (if Max_Abs /= 0.0 then Max_Abs = abs M (Max_Row, J)); + declare New_Abs : constant Real'Base := abs M (K, J); begin @@ -316,6 +399,8 @@ package body System.Generic_Array_Operations is if Max_Abs > 0.0 then Switch_Row (M, N, Row, Max_Row); + pragma Assert (Max_Abs = abs M (Row, J)); + -- The temporaries below are necessary to force a copy of the -- value and avoid improper aliasing. @@ -325,7 +410,7 @@ package body System.Generic_Array_Operations is Divide_Row (M, N, Row, Scale); end; - for U in Row + 1 .. M'Last (1) loop + for U in Row .. M'Last (1) when U /= Row loop declare Factor : constant Scalar := M (U, J); begin @@ -379,7 +464,11 @@ package body System.Generic_Array_Operations is begin for J in X'Range loop + pragma Loop_Invariant (Sum >= 0.0); Sum := Sum + Result_Real'Base (abs X (J))**2; + pragma Annotate + (GNATprove, Intentional, "float overflow check might fail", + "Intermediate computation might overflow in L2_Norm"); end loop; return Sqrt (Sum); @@ -391,11 +480,25 @@ package body System.Generic_Array_Operations is function Matrix_Elementwise_Operation (X : X_Matrix) return Result_Matrix is begin - return R : Result_Matrix (X'Range (1), X'Range (2)) do + return R : Result_Matrix (X'Range (1), X'Range (2)) + with Relaxed_Initialization + do for J in R'Range (1) loop for K in R'Range (2) loop R (J, K) := Operation (X (J, K)); + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'First (2) .. K => R (J, KK)'Initialized); end loop; + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'Range (2) => R (J, KK)'Initialized); end loop; end return; end Matrix_Elementwise_Operation; @@ -422,7 +525,9 @@ package body System.Generic_Array_Operations is Right : Right_Matrix) return Result_Matrix is begin - return R : Result_Matrix (Left'Range (1), Left'Range (2)) do + return R : Result_Matrix (Left'Range (1), Left'Range (2)) + with Relaxed_Initialization + do if Left'Length (1) /= Right'Length (1) or else Left'Length (2) /= Right'Length (2) @@ -439,7 +544,19 @@ package body System.Generic_Array_Operations is Right (J - R'First (1) + Right'First (1), K - R'First (2) + Right'First (2))); + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'First (2) .. K => R (J, KK)'Initialized); end loop; + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'Range (2) => R (J, KK)'Initialized); end loop; end return; end Matrix_Matrix_Elementwise_Operation; @@ -454,7 +571,9 @@ package body System.Generic_Array_Operations is Z : Z_Scalar) return Result_Matrix is begin - return R : Result_Matrix (X'Range (1), X'Range (2)) do + return R : Result_Matrix (X'Range (1), X'Range (2)) + with Relaxed_Initialization + do if X'Length (1) /= Y'Length (1) or else X'Length (2) /= Y'Length (2) @@ -471,7 +590,19 @@ package body System.Generic_Array_Operations is Y (J - R'First (1) + Y'First (1), K - R'First (2) + Y'First (2)), Z); + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'First (2) .. K => R (J, KK)'Initialized); end loop; + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'Range (2) => R (J, KK)'Initialized); end loop; end return; end Matrix_Matrix_Scalar_Elementwise_Operation; @@ -527,11 +658,25 @@ package body System.Generic_Array_Operations is Right : Right_Scalar) return Result_Matrix is begin - return R : Result_Matrix (Left'Range (1), Left'Range (2)) do + return R : Result_Matrix (Left'Range (1), Left'Range (2)) + with Relaxed_Initialization + do for J in R'Range (1) loop for K in R'Range (2) loop R (J, K) := Operation (Left (J, K), Right); + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'First (2) .. K => R (J, KK)'Initialized); end loop; + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'Range (2) => R (J, KK)'Initialized); end loop; end return; end Matrix_Scalar_Elementwise_Operation; @@ -561,11 +706,25 @@ package body System.Generic_Array_Operations is Right : Right_Matrix) return Result_Matrix is begin - return R : Result_Matrix (Right'Range (1), Right'Range (2)) do + return R : Result_Matrix (Right'Range (1), Right'Range (2)) + with Relaxed_Initialization + do for J in R'Range (1) loop for K in R'Range (2) loop R (J, K) := Operation (Left, Right (J, K)); + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'First (2) .. K => R (J, KK)'Initialized); end loop; + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'Range (2) => R (J, KK)'Initialized); end loop; end return; end Scalar_Matrix_Elementwise_Operation; @@ -590,7 +749,9 @@ package body System.Generic_Array_Operations is -- Sqrt -- ---------- - function Sqrt (X : Real'Base) return Real'Base is + function Sqrt (X : Real'Base) return Real'Base + with SPARK_Mode => Off -- Not in SPARK due to use of Real'Exponent + is Root, Next : Real'Base; begin @@ -651,7 +812,9 @@ package body System.Generic_Array_Operations is Right : Right_Matrix) return Result_Matrix is begin - return R : Result_Matrix (Left'Range (1), Right'Range (2)) do + return R : Result_Matrix (Left'Range (1), Right'Range (2)) + with Relaxed_Initialization + do if Left'Length (2) /= Right'Length (1) then raise Constraint_Error with "incompatible dimensions in matrix multiplication"; @@ -671,7 +834,19 @@ package body System.Generic_Array_Operations is R (J, K) := S; end; + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'First (2) .. K => R (J, KK)'Initialized); end loop; + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'Range (2) => R (J, KK)'Initialized); end loop; end return; end Matrix_Matrix_Product; @@ -681,10 +856,21 @@ package body System.Generic_Array_Operations is ---------------------------- function Matrix_Vector_Solution (A : Matrix; X : Vector) return Vector is + + procedure Ignore (M : Matrix) + with + Ghost, + Depends => (null => M); + + procedure Ignore (M : Matrix) is null; + -- Ghost procedure to document that the value of argument M is ignored, + -- which prevents a warning being issued about the value not being used + -- in the rest of the code. + N : constant Natural := A'Length (1); MA : Matrix := A; - MX : Matrix (A'Range (1), 1 .. 1); - R : Vector (A'Range (2)); + MX : Matrix (A'Range (1), 1 .. 1) with Relaxed_Initialization; + R : Vector (A'Range (2)) with Relaxed_Initialization; Det : Scalar; begin @@ -698,18 +884,29 @@ package body System.Generic_Array_Operations is for J in 0 .. MX'Length (1) - 1 loop MX (MX'First (1) + J, 1) := X (X'First + J); + + pragma Loop_Invariant + (for all JJ in MX'First (1) .. MX'First (1) + J => + MX (JJ, 1)'Initialized); end loop; Forward_Eliminate (MA, MX, Det); if Det = Zero then raise Constraint_Error with "matrix is singular"; + pragma Annotate + (GNATprove, Intentional, "exception might be raised", + "An exception should be raised on a singular matrix"); end if; Back_Substitute (MA, MX); + Ignore (MA); for J in 0 .. R'Length - 1 loop R (R'First + J) := MX (MX'First (1) + J, 1); + + pragma Loop_Invariant + (for all JJ in R'First .. R'First + J => R (JJ)'Initialized); end loop; return R; @@ -720,9 +917,20 @@ package body System.Generic_Array_Operations is ---------------------------- function Matrix_Matrix_Solution (A, X : Matrix) return Matrix is + + procedure Ignore (M : Matrix) + with + Ghost, + Depends => (null => M); + + procedure Ignore (M : Matrix) is null; + -- Ghost procedure to document that the value of argument M is ignored, + -- which prevents a warning being issued about the value not being used + -- in the rest of the code. + N : constant Natural := A'Length (1); - MA : Matrix (A'Range (2), A'Range (2)); - MB : Matrix (A'Range (2), X'Range (2)); + MA : Matrix (A'Range (2), A'Range (2)) with Relaxed_Initialization; + MB : Matrix (A'Range (2), X'Range (2)) with Relaxed_Initialization; Det : Scalar; begin @@ -737,20 +945,53 @@ package body System.Generic_Array_Operations is for J in 0 .. A'Length (1) - 1 loop for K in MA'Range (2) loop MA (MA'First (1) + J, K) := A (A'First (1) + J, K); + + pragma Loop_Invariant + (for all JJ in MA'First (1) .. MA'First (1) + J + when JJ /= MA'First (1) + J + => + (for all KK in MA'Range (2) => + MA (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in MA'First (2) .. K => + MA (MA'First (1) + J, KK)'Initialized); end loop; for K in MB'Range (2) loop MB (MB'First (1) + J, K) := X (X'First (1) + J, K); + + pragma Loop_Invariant + (for all JJ in MB'First (1) .. MB'First (1) + J + when JJ /= MB'First (1) + J + => + (for all KK in MB'Range (2) => + MB (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in MB'First (2) .. K => + MB (MB'First (1) + J, KK)'Initialized); end loop; + + pragma Loop_Invariant + (for all JJ in MA'First (1) .. MA'First (1) + J => + (for all KK in MA'Range (2) => + MA (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all JJ in MB'First (1) .. MB'First (1) + J => + (for all KK in MB'Range (2) => + MB (JJ, KK)'Initialized)); end loop; Forward_Eliminate (MA, MB, Det); if Det = Zero then raise Constraint_Error with "matrix is singular"; + pragma Annotate + (GNATprove, Intentional, "exception might be raised", + "An exception should be raised on a singular matrix"); end if; Back_Substitute (MA, MB); + Ignore (MA); return MB; end Matrix_Matrix_Solution; @@ -795,11 +1036,25 @@ package body System.Generic_Array_Operations is Right : Right_Vector) return Matrix is begin - return R : Matrix (Left'Range, Right'Range) do + return R : Matrix (Left'Range, Right'Range) + with Relaxed_Initialization + do for J in R'Range (1) loop for K in R'Range (2) loop R (J, K) := Left (J) * Right (K); + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'First (2) .. K => R (J, KK)'Initialized); end loop; + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all KK in R'Range (2) => R (JJ, KK)'Initialized)); + pragma Loop_Invariant + (for all KK in R'Range (2) => R (J, KK)'Initialized); end loop; end return; end Outer_Product; @@ -828,7 +1083,17 @@ package body System.Generic_Array_Operations is for K in R'Range (2) loop R (J, K) := A (K - R'First (2) + A'First (1), J - R'First (1) + A'First (2)); + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J when JJ /= J => + (for all K in R'Range (2) => R (JJ, K)'Initialized)); + pragma Loop_Invariant + (for all KK in R'First (2) .. K => R (J, KK)'Initialized); end loop; + + pragma Loop_Invariant + (for all JJ in R'First (1) .. J => + (for all K in R'Range (2) => R (JJ, K)'Initialized)); end loop; end Transpose; @@ -883,7 +1148,7 @@ package body System.Generic_Array_Operations is return R : Matrix (First_1 .. Check_Unit_Last (First_1, Order, First_1), First_2 .. Check_Unit_Last (First_2, Order, First_2)) do - R := (others => (others => Zero)); + R := [others => [others => Zero]]; for J in 0 .. Order - 1 loop R (First_1 + J, First_2 + J) := One; @@ -902,7 +1167,7 @@ package body System.Generic_Array_Operations is is begin return R : Vector (First .. Check_Unit_Last (Index, Order, First)) do - R := (others => Zero); + R := [others => Zero]; R (Index) := One; end return; end Unit_Vector; diff --git a/gcc/ada/libgnat/s-gearop.ads b/gcc/ada/libgnat/s-gearop.ads index 340cf96..15e1174 100644 --- a/gcc/ada/libgnat/s-gearop.ads +++ b/gcc/ada/libgnat/s-gearop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2006-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,29 @@ -- -- ------------------------------------------------------------------------------ -package System.Generic_Array_Operations is -pragma Pure (Generic_Array_Operations); +-- Proof of this unit is only done up to silver level, i.e. absence of runtime +-- errors, and only regarding runtime checks that depend on the generic part, +-- ignoring runtime checks related to formal generic subprogram parameters +-- in instantiations. For example, contracts do not protect against scalar +-- overflows in arithmetic operations passed on as formal generic subprogram +-- parameters. + +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced +-- by setting the corresponding assertion policy to Ignore. Postconditions +-- and contract cases should not be executed at runtime as well, in order +-- not to slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + +package System.Generic_Array_Operations + with SPARK_Mode +is + + pragma Pure (Generic_Array_Operations); --------------------- -- Back_Substitute -- @@ -43,7 +64,10 @@ pragma Pure (Generic_Array_Operations); with function "*" (Left, Right : Scalar) return Scalar is <>; with function "/" (Left, Right : Scalar) return Scalar is <>; with function Is_Non_Zero (X : Scalar) return Boolean is <>; - procedure Back_Substitute (M, N : in out Matrix); + procedure Back_Substitute (M, N : in out Matrix) + with + Pre => M'First (1) = N'First (1) + and then M'Last (1) = N'Last (1); -------------- -- Diagonal -- @@ -53,7 +77,14 @@ pragma Pure (Generic_Array_Operations); type Scalar is private; type Vector is array (Integer range <>) of Scalar; type Matrix is array (Integer range <>, Integer range <>) of Scalar; - function Diagonal (A : Matrix) return Vector; + function Diagonal (A : Matrix) return Vector + with + Pre => A'First (1) < A'Last (1) + and then A'First (2) < A'Last (2) + and then (if A'First (1) <= 0 then + A'Last (1) < Integer'Last + A'First (1)) + and then (if A'First (2) <= 0 then + A'Last (2) < Integer'Last + A'First (2)); ----------------------- -- Forward_Eliminate -- @@ -76,7 +107,10 @@ pragma Pure (Generic_Array_Operations); procedure Forward_Eliminate (M : in out Matrix; N : in out Matrix; - Det : out Scalar); + Det : out Scalar) + with + Pre => M'First (1) = N'First (1) + and then M'Last (1) = N'Last (1); -------------------------- -- Square_Matrix_Length -- @@ -85,8 +119,14 @@ pragma Pure (Generic_Array_Operations); generic type Scalar is private; type Matrix is array (Integer range <>, Integer range <>) of Scalar; - function Square_Matrix_Length (A : Matrix) return Natural; - -- If A is non-square, raise Constraint_Error, else return its dimension + function Square_Matrix_Length (A : Matrix) return Natural + with + Pre => (if A'First (1) <= 0 then + A'Last (1) < Integer'Last + A'First (1)) + and then (if A'First (2) <= 0 then + A'Last (2) < Integer'Last + A'First (2)) + and then A'Length (1) = A'Length (2); + -- If A is non-square, raise Constraint_Error, else return its dimension ---------------------------------- -- Vector_Elementwise_Operation -- @@ -129,7 +169,13 @@ pragma Pure (Generic_Array_Operations); Right : Right_Scalar) return Result_Scalar; function Vector_Vector_Elementwise_Operation (Left : Left_Vector; - Right : Right_Vector) return Result_Vector; + Right : Right_Vector) return Result_Vector + with + Pre => (if Left'First <= 0 then + Left'Last < Integer'Last + Left'First) + and then (if Right'First <= 0 then + Right'Last < Integer'Last + Right'First) + and then Left'Length = Right'Length; ------------------------------------------------ -- Vector_Vector_Scalar_Elementwise_Operation -- @@ -150,7 +196,11 @@ pragma Pure (Generic_Array_Operations); function Vector_Vector_Scalar_Elementwise_Operation (X : X_Vector; Y : Y_Vector; - Z : Z_Scalar) return Result_Vector; + Z : Z_Scalar) return Result_Vector + with + Pre => (if X'First <= 0 then X'Last < Integer'Last + X'First) + and then (if Y'First <= 0 then Y'Last < Integer'Last + Y'First) + and then X'Length = Y'Length; ----------------------------------------- -- Matrix_Matrix_Elementwise_Operation -- @@ -171,7 +221,18 @@ pragma Pure (Generic_Array_Operations); Right : Right_Scalar) return Result_Scalar; function Matrix_Matrix_Elementwise_Operation (Left : Left_Matrix; - Right : Right_Matrix) return Result_Matrix; + Right : Right_Matrix) return Result_Matrix + with + Pre => (if Left'First (1) <= 0 then + Left'Last (1) < Integer'Last + Left'First (1)) + and then (if Right'First (1) <= 0 then + Right'Last (1) < Integer'Last + Right'First (1)) + and then Left'Length (1) = Right'Length (1) + and then (if Left'First (2) <= 0 then + Left'Last (2) < Integer'Last + Left'First (2)) + and then (if Right'First (2) <= 0 then + Right'Last (2) < Integer'Last + Right'First (2)) + and then Left'Length (2) = Right'Length (2); ------------------------------------------------ -- Matrix_Matrix_Scalar_Elementwise_Operation -- @@ -193,7 +254,18 @@ pragma Pure (Generic_Array_Operations); function Matrix_Matrix_Scalar_Elementwise_Operation (X : X_Matrix; Y : Y_Matrix; - Z : Z_Scalar) return Result_Matrix; + Z : Z_Scalar) return Result_Matrix + with + Pre => (if X'First (1) <= 0 then + X'Last (1) < Integer'Last + X'First (1)) + and then (if Y'First (1) <= 0 then + Y'Last (1) < Integer'Last + Y'First (1)) + and then X'Length (1) = Y'Length (1) + and then (if X'First (2) <= 0 then + X'Last (2) < Integer'Last + X'First (2)) + and then (if Y'First (2) <= 0 then + Y'Last (2) < Integer'Last + Y'First (2)) + and then X'Length (2) = Y'Length (2); ----------------------------------------- -- Vector_Scalar_Elementwise_Operation -- @@ -286,7 +358,13 @@ pragma Pure (Generic_Array_Operations); Right : Result_Scalar) return Result_Scalar is <>; function Inner_Product (Left : Left_Vector; - Right : Right_Vector) return Result_Scalar; + Right : Right_Vector) return Result_Scalar + with + Pre => (if Left'First <= 0 then + Left'Last < Integer'Last + Left'First) + and then (if Right'First <= 0 then + Right'Last < Integer'Last + Right'First) + and then Left'Length = Right'Length; ------------- -- L2_Norm -- @@ -340,7 +418,13 @@ pragma Pure (Generic_Array_Operations); Right : Result_Scalar) return Result_Scalar is <>; function Matrix_Vector_Product (Left : Matrix; - Right : Right_Vector) return Result_Vector; + Right : Right_Vector) return Result_Vector + with + Pre => (if Left'First (2) <= 0 then + Left'Last (2) < Integer'Last + Left'First (2)) + and then (if Right'First <= 0 then + Right'Last < Integer'Last + Right'First) + and then Left'Length (2) = Right'Length; --------------------------- -- Vector_Matrix_Product -- @@ -363,7 +447,13 @@ pragma Pure (Generic_Array_Operations); Right : Result_Scalar) return Result_Scalar is <>; function Vector_Matrix_Product (Left : Left_Vector; - Right : Matrix) return Result_Vector; + Right : Matrix) return Result_Vector + with + Pre => (if Left'First <= 0 then + Left'Last < Integer'Last + Left'First) + and then (if Right'First (1) <= 0 then + Right'Last (1) < Integer'Last + Right'First (1)) + and then Left'Length = Right'Length (1); --------------------------- -- Matrix_Matrix_Product -- @@ -388,7 +478,13 @@ pragma Pure (Generic_Array_Operations); Right : Result_Scalar) return Result_Scalar is <>; function Matrix_Matrix_Product (Left : Left_Matrix; - Right : Right_Matrix) return Result_Matrix; + Right : Right_Matrix) return Result_Matrix + with + Pre => (if Left'First (2) <= 0 then + Left'Last (2) < Integer'Last + Left'First (2)) + and then (if Right'First (1) <= 0 then + Right'Last (1) < Integer'Last + Right'First (1)) + and then Left'Length (2) = Right'Length (1); ---------------------------- -- Matrix_Vector_Solution -- @@ -404,7 +500,16 @@ pragma Pure (Generic_Array_Operations); (M : in out Matrix; N : in out Matrix; Det : out Scalar) is <>; - function Matrix_Vector_Solution (A : Matrix; X : Vector) return Vector; + function Matrix_Vector_Solution (A : Matrix; X : Vector) return Vector + with + Pre => (if A'First (1) <= 0 then + A'Last (1) < Integer'Last + A'First (1)) + and then (if A'First (2) <= 0 then + A'Last (2) < Integer'Last + A'First (2)) + and then A'Length (1) = A'Length (2) + and then (if X'First <= 0 then + X'Last < Integer'Last + X'First) + and then A'Length (1) = X'Length; ---------------------------- -- Matrix_Matrix_Solution -- @@ -419,7 +524,16 @@ pragma Pure (Generic_Array_Operations); (M : in out Matrix; N : in out Matrix; Det : out Scalar) is <>; - function Matrix_Matrix_Solution (A : Matrix; X : Matrix) return Matrix; + function Matrix_Matrix_Solution (A : Matrix; X : Matrix) return Matrix + with + Pre => (if A'First (1) <= 0 then + A'Last (1) < Integer'Last + A'First (1)) + and then (if A'First (2) <= 0 then + A'Last (2) < Integer'Last + A'First (2)) + and then A'Length (1) = A'Length (2) + and then (if X'First (1) <= 0 then + X'Last (1) < Integer'Last + X'First (1)) + and then A'Length (1) = X'Length (1); ---------- -- Sqrt -- @@ -436,7 +550,10 @@ pragma Pure (Generic_Array_Operations); generic type Scalar is private; type Matrix is array (Integer range <>, Integer range <>) of Scalar; - procedure Swap_Column (A : in out Matrix; Left, Right : Integer); + procedure Swap_Column (A : in out Matrix; Left, Right : Integer) + with + Pre => Left in A'Range (2) + and then Right in A'Range (2); --------------- -- Transpose -- @@ -445,7 +562,18 @@ pragma Pure (Generic_Array_Operations); generic type Scalar is private; type Matrix is array (Integer range <>, Integer range <>) of Scalar; - procedure Transpose (A : Matrix; R : out Matrix); + procedure Transpose (A : Matrix; R : out Matrix) + with + Relaxed_Initialization => R, + Pre => A'First (1) = R'First (2) + and then A'Last (1) = R'Last (2) + and then A'First (2) = R'First (1) + and then A'Last (2) = R'Last (1) + and then (if A'First (1) < 0 then + A'Last (1) <= Integer'Last + A'First (1)) + and then (if A'First (2) < 0 then + A'Last (2) <= Integer'Last + A'First (2)), + Post => R'Initialized; ------------------------------- -- Update_Vector_With_Vector -- @@ -457,7 +585,13 @@ pragma Pure (Generic_Array_Operations); type X_Vector is array (Integer range <>) of X_Scalar; type Y_Vector is array (Integer range <>) of Y_Scalar; with procedure Update (X : in out X_Scalar; Y : Y_Scalar); - procedure Update_Vector_With_Vector (X : in out X_Vector; Y : Y_Vector); + procedure Update_Vector_With_Vector (X : in out X_Vector; Y : Y_Vector) + with + Pre => (if X'First <= 0 then + X'Last < Integer'Last + X'First) + and then (if Y'First <= 0 then + Y'Last < Integer'Last + Y'First) + and then X'Length = Y'Length; ------------------------------- -- Update_Matrix_With_Matrix -- @@ -469,7 +603,18 @@ pragma Pure (Generic_Array_Operations); type X_Matrix is array (Integer range <>, Integer range <>) of X_Scalar; type Y_Matrix is array (Integer range <>, Integer range <>) of Y_Scalar; with procedure Update (X : in out X_Scalar; Y : Y_Scalar); - procedure Update_Matrix_With_Matrix (X : in out X_Matrix; Y : Y_Matrix); + procedure Update_Matrix_With_Matrix (X : in out X_Matrix; Y : Y_Matrix) + with + Pre => (if X'First (1) <= 0 then + X'Last (1) < Integer'Last + X'First (1)) + and then (if Y'First (1) <= 0 then + Y'Last (1) < Integer'Last + Y'First (1)) + and then X'Length (1) = Y'Length (1) + and then (if X'First (2) <= 0 then + X'Last (2) < Integer'Last + X'First (2)) + and then (if Y'First (2) <= 0 then + Y'Last (2) < Integer'Last + Y'First (2)) + and then X'Length (2) = Y'Length (2); ----------------- -- Unit_Matrix -- @@ -483,7 +628,10 @@ pragma Pure (Generic_Array_Operations); function Unit_Matrix (Order : Positive; First_1 : Integer := 1; - First_2 : Integer := 1) return Matrix; + First_2 : Integer := 1) return Matrix + with + Pre => First_1 <= Integer'Last - Order + 1 + and then First_2 <= Integer'Last - Order + 1; ----------------- -- Unit_Vector -- @@ -497,6 +645,10 @@ pragma Pure (Generic_Array_Operations); function Unit_Vector (Index : Integer; Order : Positive; - First : Integer := 1) return Vector; + First : Integer := 1) return Vector + with + Pre => Index >= First + and then First <= Integer'Last - Order + 1 + and then Index <= First + (Order - 1); end System.Generic_Array_Operations; diff --git a/gcc/ada/libgnat/s-genbig.adb b/gcc/ada/libgnat/s-genbig.adb index 8d03f0a..1b9a9bd 100644 --- a/gcc/ada/libgnat/s-genbig.adb +++ b/gcc/ada/libgnat/s-genbig.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2012-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -50,10 +50,10 @@ package body System.Generic_Bignums is subtype LLI is Long_Long_Integer; - One_Data : constant Digit_Vector (1 .. 1) := (1 => 1); + One_Data : constant Digit_Vector (1 .. 1) := [1]; -- Constant one - Zero_Data : constant Digit_Vector (1 .. 0) := (1 .. 0 => 0); + Zero_Data : constant Digit_Vector (1 .. 0) := []; -- Constant zero ----------------------- @@ -332,7 +332,7 @@ package body System.Generic_Bignums is elsif X.Len = 1 and then X.D (1) = 2 and then Y.D (1) < 32 then declare D : constant Digit_Vector (1 .. 1) := - (1 => Shift_Left (SD'(1), Natural (Y.D (1)))); + [Shift_Left (SD'(1), Natural (Y.D (1)))]; begin return Normalize (D, X.Neg); end; @@ -573,7 +573,7 @@ package body System.Generic_Bignums is ------------- function Big_Mul (X, Y : Bignum) return Big_Integer is - Result : Digit_Vector (1 .. X.Len + Y.Len) := (others => 0); + Result : Digit_Vector (1 .. X.Len + Y.Len) := [others => 0]; -- Accumulate result (max length of result is sum of operand lengths) L : Length; @@ -1149,22 +1149,22 @@ package body System.Generic_Bignums is begin if X = 0 then - return Allocate_Big_Integer ((1 .. 0 => <>), False); + return Allocate_Big_Integer ([], False); -- One word result elsif X in -(2 ** 32 - 1) .. +(2 ** 32 - 1) then - return Allocate_Big_Integer ((1 => SD (abs X)), X < 0); + return Allocate_Big_Integer ([SD (abs X)], X < 0); -- Large negative number annoyance elsif X = -2 ** 63 then - return Allocate_Big_Integer ((2 ** 31, 0), True); + return Allocate_Big_Integer ([2 ** 31, 0], True); elsif Long_Long_Long_Integer'Size = 128 and then X = Long_Long_Long_Integer'First then - return Allocate_Big_Integer ((2 ** 31, 0, 0, 0), True); + return Allocate_Big_Integer ([2 ** 31, 0, 0, 0], True); -- Other negative numbers @@ -1196,17 +1196,17 @@ package body System.Generic_Bignums is function To_Bignum (X : Unsigned_128) return Big_Integer is begin if X = 0 then - return Allocate_Big_Integer ((1 .. 0 => <>), False); + return Allocate_Big_Integer ([], False); -- One word result elsif X < 2 ** 32 then - return Allocate_Big_Integer ((1 => SD (X)), False); + return Allocate_Big_Integer ([SD (X)], False); -- Two word result elsif Shift_Right (X, 32) < 2 ** 32 then - return Allocate_Big_Integer ((SD (X / Base), SD (X mod Base)), False); + return Allocate_Big_Integer ([SD (X / Base), SD (X mod Base)], False); -- Three or four word result @@ -1241,7 +1241,7 @@ package body System.Generic_Bignums is function To_String (X : Bignum; Width : Natural := 0; Base : Positive := 10) return String is - Big_Base : aliased Bignum_Data := (1, False, (1 => SD (Base))); + Big_Base : aliased Bignum_Data := (1, False, [SD (Base)]); function Add_Base (S : String) return String; -- Add base information if Base /= 10 @@ -1285,7 +1285,7 @@ package body System.Generic_Bignums is function Image (Arg : Bignum) return String is begin if Big_LT (Arg, Big_Base'Unchecked_Access) then - return (1 => Hex_Chars (Natural (From_Bignum (Arg)))); + return [Hex_Chars (Natural (From_Bignum (Arg)))]; else declare Div : aliased Big_Integer; @@ -1315,8 +1315,8 @@ package body System.Generic_Bignums is Min_Length : Natural; Char : Character := ' ') return String is begin - return (1 .. Integer'Max (Integer (Min_Length) - Str'Length, 0) - => Char) & Str; + return [1 .. Integer'Max (Integer (Min_Length) - Str'Length, 0) + => Char] & Str; end Leading_Padding; Zero : aliased Bignum_Data := (0, False, D => Zero_Data); diff --git a/gcc/ada/libgnat/s-genbig.ads b/gcc/ada/libgnat/s-genbig.ads index 6fc1c10..d36e9f2 100644 --- a/gcc/ada/libgnat/s-genbig.ads +++ b/gcc/ada/libgnat/s-genbig.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2012-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-geveop.adb b/gcc/ada/libgnat/s-geveop.adb index bfbb232..1ceac3e 100644 --- a/gcc/ada/libgnat/s-geveop.adb +++ b/gcc/ada/libgnat/s-geveop.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,6 @@ -- -- ------------------------------------------------------------------------------ -with System; use System; with System.Address_Operations; use System.Address_Operations; with System.Storage_Elements; use System.Storage_Elements; diff --git a/gcc/ada/libgnat/s-geveop.ads b/gcc/ada/libgnat/s-geveop.ads index 8ad85a5..1b9bb03 100644 --- a/gcc/ada/libgnat/s-geveop.ads +++ b/gcc/ada/libgnat/s-geveop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-gloloc.adb b/gcc/ada/libgnat/s-gloloc.adb index 201fc6f..bd7952d 100644 --- a/gcc/ada/libgnat/s-gloloc.adb +++ b/gcc/ada/libgnat/s-gloloc.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-gloloc.ads b/gcc/ada/libgnat/s-gloloc.ads index 8c27fab..bd8a9a9 100644 --- a/gcc/ada/libgnat/s-gloloc.ads +++ b/gcc/ada/libgnat/s-gloloc.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-gloloc__mingw.adb b/gcc/ada/libgnat/s-gloloc__mingw.adb index be92ba6..157d22e 100644 --- a/gcc/ada/libgnat/s-gloloc__mingw.adb +++ b/gcc/ada/libgnat/s-gloloc__mingw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-htable.adb b/gcc/ada/libgnat/s-htable.adb index af2db2f..f098f34 100644 --- a/gcc/ada/libgnat/s-htable.adb +++ b/gcc/ada/libgnat/s-htable.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with Ada.Unchecked_Deallocation; with System.String_Hash; @@ -173,7 +171,7 @@ package body System.HTable is begin -- Use an aggregate for efficiency reasons - Table := (others => Null_Ptr); + Table := [others => Null_Ptr]; end Reset; --------- diff --git a/gcc/ada/libgnat/s-htable.ads b/gcc/ada/libgnat/s-htable.ads index b3b3dfa..f42609c 100644 --- a/gcc/ada/libgnat/s-htable.ads +++ b/gcc/ada/libgnat/s-htable.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -37,8 +37,6 @@ -- The Static_HTable package provides a more complex interface that allows -- complete control over allocation. -pragma Compiler_Unit_Warning; - package System.HTable is pragma Preelaborate; diff --git a/gcc/ada/libgnat/s-imageb.adb b/gcc/ada/libgnat/s-imageb.adb index e8d367b..951de24 100644 --- a/gcc/ada/libgnat/s-imageb.adb +++ b/gcc/ada/libgnat/s-imageb.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imageb.ads b/gcc/ada/libgnat/s-imageb.ads index b739807..9b91be8 100644 --- a/gcc/ada/libgnat/s-imageb.ads +++ b/gcc/ada/libgnat/s-imageb.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imaged.adb b/gcc/ada/libgnat/s-imaged.adb index 42c6423..6633464 100644 --- a/gcc/ada/libgnat/s-imaged.adb +++ b/gcc/ada/libgnat/s-imaged.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imaged.ads b/gcc/ada/libgnat/s-imaged.ads index b53f96f..41c7515 100644 --- a/gcc/ada/libgnat/s-imaged.ads +++ b/gcc/ada/libgnat/s-imaged.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imagef.adb b/gcc/ada/libgnat/s-imagef.adb index e18fbf3..14e9d06 100644 --- a/gcc/ada/libgnat/s-imagef.adb +++ b/gcc/ada/libgnat/s-imagef.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imagef.ads b/gcc/ada/libgnat/s-imagef.ads index cac268a..67892b1 100644 --- a/gcc/ada/libgnat/s-imagef.ads +++ b/gcc/ada/libgnat/s-imagef.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imagei.adb b/gcc/ada/libgnat/s-imagei.adb index a942eaf..e7199af 100644 --- a/gcc/ada/libgnat/s-imagei.adb +++ b/gcc/ada/libgnat/s-imagei.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imagei.ads b/gcc/ada/libgnat/s-imagei.ads index f80d92d..7d2434b 100644 --- a/gcc/ada/libgnat/s-imagei.ads +++ b/gcc/ada/libgnat/s-imagei.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imagen.adb b/gcc/ada/libgnat/s-imagen.adb index 48c2e9f..cd8e170 100644 --- a/gcc/ada/libgnat/s-imagen.adb +++ b/gcc/ada/libgnat/s-imagen.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imagen.ads b/gcc/ada/libgnat/s-imagen.ads index 6598be9..d6ccfc6 100644 --- a/gcc/ada/libgnat/s-imagen.ads +++ b/gcc/ada/libgnat/s-imagen.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imager.adb b/gcc/ada/libgnat/s-imager.adb index 882bb27..dc817b3 100644 --- a/gcc/ada/libgnat/s-imager.adb +++ b/gcc/ada/libgnat/s-imager.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imager.ads b/gcc/ada/libgnat/s-imager.ads index 1aa8687..2a6a321 100644 --- a/gcc/ada/libgnat/s-imager.ads +++ b/gcc/ada/libgnat/s-imager.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imageu.adb b/gcc/ada/libgnat/s-imageu.adb index fa3ac80..3ca5efc 100644 --- a/gcc/ada/libgnat/s-imageu.adb +++ b/gcc/ada/libgnat/s-imageu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imageu.ads b/gcc/ada/libgnat/s-imageu.ads index 4dcd6bc..5983e5d 100644 --- a/gcc/ada/libgnat/s-imageu.ads +++ b/gcc/ada/libgnat/s-imageu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imagew.adb b/gcc/ada/libgnat/s-imagew.adb index a76a4dc..24a5ba3 100644 --- a/gcc/ada/libgnat/s-imagew.adb +++ b/gcc/ada/libgnat/s-imagew.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imagew.ads b/gcc/ada/libgnat/s-imagew.ads index edf2ec3..133f01a 100644 --- a/gcc/ada/libgnat/s-imagew.ads +++ b/gcc/ada/libgnat/s-imagew.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imde128.ads b/gcc/ada/libgnat/s-imde128.ads index 1812325..e2caac8 100644 --- a/gcc/ada/libgnat/s-imde128.ads +++ b/gcc/ada/libgnat/s-imde128.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imde32.ads b/gcc/ada/libgnat/s-imde32.ads index f2583cc..0397d9c 100644 --- a/gcc/ada/libgnat/s-imde32.ads +++ b/gcc/ada/libgnat/s-imde32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imde64.ads b/gcc/ada/libgnat/s-imde64.ads index e603c5d..c147cb0 100644 --- a/gcc/ada/libgnat/s-imde64.ads +++ b/gcc/ada/libgnat/s-imde64.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imen16.ads b/gcc/ada/libgnat/s-imen16.ads index 755549e..b7192c2 100644 --- a/gcc/ada/libgnat/s-imen16.ads +++ b/gcc/ada/libgnat/s-imen16.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imen32.ads b/gcc/ada/libgnat/s-imen32.ads index 3cb88d8..96a1b34 100644 --- a/gcc/ada/libgnat/s-imen32.ads +++ b/gcc/ada/libgnat/s-imen32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imenu8.ads b/gcc/ada/libgnat/s-imenu8.ads index 8c5a64d..cdd5a5f 100644 --- a/gcc/ada/libgnat/s-imenu8.ads +++ b/gcc/ada/libgnat/s-imenu8.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imfi128.ads b/gcc/ada/libgnat/s-imfi128.ads index ab988fa..2658454 100644 --- a/gcc/ada/libgnat/s-imfi128.ads +++ b/gcc/ada/libgnat/s-imfi128.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imfi32.ads b/gcc/ada/libgnat/s-imfi32.ads index 98b8e8c..d722e51 100644 --- a/gcc/ada/libgnat/s-imfi32.ads +++ b/gcc/ada/libgnat/s-imfi32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imfi64.ads b/gcc/ada/libgnat/s-imfi64.ads index ba83a50..c2e9f1b 100644 --- a/gcc/ada/libgnat/s-imfi64.ads +++ b/gcc/ada/libgnat/s-imfi64.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgbiu.adb b/gcc/ada/libgnat/s-imgbiu.adb index ea8feb9..e887ed4 100644 --- a/gcc/ada/libgnat/s-imgbiu.adb +++ b/gcc/ada/libgnat/s-imgbiu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgbiu.ads b/gcc/ada/libgnat/s-imgbiu.ads index 09171c3..37215a4 100644 --- a/gcc/ada/libgnat/s-imgbiu.ads +++ b/gcc/ada/libgnat/s-imgbiu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgboo.adb b/gcc/ada/libgnat/s-imgboo.adb index 69ee639..221c0c6 100644 --- a/gcc/ada/libgnat/s-imgboo.adb +++ b/gcc/ada/libgnat/s-imgboo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,17 @@ -- -- ------------------------------------------------------------------------------ -package body System.Img_Bool is +-- Ghost code, loop invariants and assertions in this unit are meant for +-- analysis only, not for run-time checking, as it would be too costly +-- otherwise. This is enforced by setting the assertion policy to Ignore. + +pragma Assertion_Policy (Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + +package body System.Img_Bool + with SPARK_Mode +is ------------------- -- Image_Boolean -- diff --git a/gcc/ada/libgnat/s-imgboo.ads b/gcc/ada/libgnat/s-imgboo.ads index 45b3bfa..1fe309f 100644 --- a/gcc/ada/libgnat/s-imgboo.ads +++ b/gcc/ada/libgnat/s-imgboo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,13 +31,33 @@ -- Boolean'Image -package System.Img_Bool is - pragma Pure; +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + +with System.Val_Bool; + +package System.Img_Bool + with SPARK_Mode, Preelaborate +is procedure Image_Boolean (V : Boolean; S : in out String; - P : out Natural); + P : out Natural) + with + Pre => S'First = 1 + and then (if V then S'Length >= 4 else S'Length >= 5), + Post => (if V then P = 4 else P = 5) + and then System.Val_Bool.Is_Boolean_Image_Ghost (S (1 .. P)) + and then System.Val_Bool.Value_Boolean (S (1 .. P)) = V; -- Computes Boolean'Image (V) and stores the result in S (1 .. P) -- setting the resulting value of P. The caller guarantees that S -- is long enough to hold the result, and that S'First is 1. diff --git a/gcc/ada/libgnat/s-imgcha.adb b/gcc/ada/libgnat/s-imgcha.adb index bfcae49..5046a10 100644 --- a/gcc/ada/libgnat/s-imgcha.adb +++ b/gcc/ada/libgnat/s-imgcha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -48,7 +48,7 @@ package body System.Img_Char is range Character'Val (16#00#) .. Character'Val (16#1F#); C0 : constant array (C0_Range) of Cname := - (Character'Val (16#00#) => "NUL", + [Character'Val (16#00#) => "NUL", Character'Val (16#01#) => "SOH", Character'Val (16#02#) => "STX", Character'Val (16#03#) => "ETX", @@ -79,13 +79,13 @@ package body System.Img_Char is Character'Val (16#1C#) => "FS ", Character'Val (16#1D#) => "GS ", Character'Val (16#1E#) => "RS ", - Character'Val (16#1F#) => "US "); + Character'Val (16#1F#) => "US "]; subtype C1_Range is Character range Character'Val (16#7F#) .. Character'Val (16#9F#); C1 : constant array (C1_Range) of Cname := - (Character'Val (16#7F#) => "DEL", + [Character'Val (16#7F#) => "DEL", Character'Val (16#80#) => "res", Character'Val (16#81#) => "res", Character'Val (16#82#) => "BPH", @@ -117,7 +117,7 @@ package body System.Img_Char is Character'Val (16#9C#) => "ST ", Character'Val (16#9D#) => "OSC", Character'Val (16#9E#) => "PM ", - Character'Val (16#9F#) => "APC"); + Character'Val (16#9F#) => "APC"]; begin -- Control characters are represented by their names (RM 3.5(32)) diff --git a/gcc/ada/libgnat/s-imgcha.ads b/gcc/ada/libgnat/s-imgcha.ads index 6cd954d..ce8729a 100644 --- a/gcc/ada/libgnat/s-imgcha.ads +++ b/gcc/ada/libgnat/s-imgcha.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgflt.ads b/gcc/ada/libgnat/s-imgflt.ads index 44f00b8..59e5087 100644 --- a/gcc/ada/libgnat/s-imgflt.ads +++ b/gcc/ada/libgnat/s-imgflt.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgint.adb b/gcc/ada/libgnat/s-imgint.adb index f031120..4d2e2b1 100644 --- a/gcc/ada/libgnat/s-imgint.adb +++ b/gcc/ada/libgnat/s-imgint.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgint.ads b/gcc/ada/libgnat/s-imgint.ads index 5a1b8ed..7b1fe22 100644 --- a/gcc/ada/libgnat/s-imgint.ads +++ b/gcc/ada/libgnat/s-imgint.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imglfl.ads b/gcc/ada/libgnat/s-imglfl.ads index 48f7fc0..2a27986 100644 --- a/gcc/ada/libgnat/s-imglfl.ads +++ b/gcc/ada/libgnat/s-imglfl.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgllb.adb b/gcc/ada/libgnat/s-imgllb.adb index 291a815..c09b797 100644 --- a/gcc/ada/libgnat/s-imgllb.adb +++ b/gcc/ada/libgnat/s-imgllb.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgllb.ads b/gcc/ada/libgnat/s-imgllb.ads index b65dbed..59c37f9 100644 --- a/gcc/ada/libgnat/s-imgllb.ads +++ b/gcc/ada/libgnat/s-imgllb.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgllf.ads b/gcc/ada/libgnat/s-imgllf.ads index 2a5a3e2..074b37d 100644 --- a/gcc/ada/libgnat/s-imgllf.ads +++ b/gcc/ada/libgnat/s-imgllf.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imglli.adb b/gcc/ada/libgnat/s-imglli.adb index 6eb265c..e8e5cb7 100644 --- a/gcc/ada/libgnat/s-imglli.adb +++ b/gcc/ada/libgnat/s-imglli.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imglli.ads b/gcc/ada/libgnat/s-imglli.ads index e6e3efc..fc773ae 100644 --- a/gcc/ada/libgnat/s-imglli.ads +++ b/gcc/ada/libgnat/s-imglli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imglllb.ads b/gcc/ada/libgnat/s-imglllb.ads index 6d1e418..a3147e5 100644 --- a/gcc/ada/libgnat/s-imglllb.ads +++ b/gcc/ada/libgnat/s-imglllb.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgllli.ads b/gcc/ada/libgnat/s-imgllli.ads index 5ca2f39..a5a1052 100644 --- a/gcc/ada/libgnat/s-imgllli.ads +++ b/gcc/ada/libgnat/s-imgllli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imglllu.ads b/gcc/ada/libgnat/s-imglllu.ads index 4406cb1..ae918c4 100644 --- a/gcc/ada/libgnat/s-imglllu.ads +++ b/gcc/ada/libgnat/s-imglllu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imglllw.ads b/gcc/ada/libgnat/s-imglllw.ads index 8958f8c..485bc92 100644 --- a/gcc/ada/libgnat/s-imglllw.ads +++ b/gcc/ada/libgnat/s-imglllw.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgllu.adb b/gcc/ada/libgnat/s-imgllu.adb index 050f357..751ee69 100644 --- a/gcc/ada/libgnat/s-imgllu.adb +++ b/gcc/ada/libgnat/s-imgllu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgllu.ads b/gcc/ada/libgnat/s-imgllu.ads index e8b9d77..220228f 100644 --- a/gcc/ada/libgnat/s-imgllu.ads +++ b/gcc/ada/libgnat/s-imgllu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgllw.adb b/gcc/ada/libgnat/s-imgllw.adb index 1c3f185..15effff 100644 --- a/gcc/ada/libgnat/s-imgllw.adb +++ b/gcc/ada/libgnat/s-imgllw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgllw.ads b/gcc/ada/libgnat/s-imgllw.ads index 1862b78..2ec2d3e 100644 --- a/gcc/ada/libgnat/s-imgllw.ads +++ b/gcc/ada/libgnat/s-imgllw.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgrea.adb b/gcc/ada/libgnat/s-imgrea.adb index 255e659..4d1e06b 100644 --- a/gcc/ada/libgnat/s-imgrea.adb +++ b/gcc/ada/libgnat/s-imgrea.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgrea.ads b/gcc/ada/libgnat/s-imgrea.ads index 45abac1..ca18d95 100644 --- a/gcc/ada/libgnat/s-imgrea.ads +++ b/gcc/ada/libgnat/s-imgrea.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imguns.adb b/gcc/ada/libgnat/s-imguns.adb index bc4d851..29e7478 100644 --- a/gcc/ada/libgnat/s-imguns.adb +++ b/gcc/ada/libgnat/s-imguns.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imguns.ads b/gcc/ada/libgnat/s-imguns.ads index e44f4fc..c15a79d 100644 --- a/gcc/ada/libgnat/s-imguns.ads +++ b/gcc/ada/libgnat/s-imguns.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imguti.adb b/gcc/ada/libgnat/s-imguti.adb index e86be49..ca8bb94 100644 --- a/gcc/ada/libgnat/s-imguti.adb +++ b/gcc/ada/libgnat/s-imguti.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imguti.ads b/gcc/ada/libgnat/s-imguti.ads index 68e8e2a..541c42b 100644 --- a/gcc/ada/libgnat/s-imguti.ads +++ b/gcc/ada/libgnat/s-imguti.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgwch.adb b/gcc/ada/libgnat/s-imgwch.adb index 9663126..5c3b861 100644 --- a/gcc/ada/libgnat/s-imgwch.adb +++ b/gcc/ada/libgnat/s-imgwch.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgwch.ads b/gcc/ada/libgnat/s-imgwch.ads index 7b285f4..84e1235 100644 --- a/gcc/ada/libgnat/s-imgwch.ads +++ b/gcc/ada/libgnat/s-imgwch.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgwiu.adb b/gcc/ada/libgnat/s-imgwiu.adb index a7e7d7a..603fd2e 100644 --- a/gcc/ada/libgnat/s-imgwiu.adb +++ b/gcc/ada/libgnat/s-imgwiu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-imgwiu.ads b/gcc/ada/libgnat/s-imgwiu.ads index 605625a..1d6609c 100644 --- a/gcc/ada/libgnat/s-imgwiu.ads +++ b/gcc/ada/libgnat/s-imgwiu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-io.adb b/gcc/ada/libgnat/s-io.adb index 9f42791..099d0cb 100644 --- a/gcc/ada/libgnat/s-io.adb +++ b/gcc/ada/libgnat/s-io.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-io.ads b/gcc/ada/libgnat/s-io.ads index 20284b1..473150d 100644 --- a/gcc/ada/libgnat/s-io.ads +++ b/gcc/ada/libgnat/s-io.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-llflex.ads b/gcc/ada/libgnat/s-llflex.ads index ff0d007..79ac5fb 100644 --- a/gcc/ada/libgnat/s-llflex.ads +++ b/gcc/ada/libgnat/s-llflex.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-maccod.ads b/gcc/ada/libgnat/s-maccod.ads index c78dc91..c3abf07 100644 --- a/gcc/ada/libgnat/s-maccod.ads +++ b/gcc/ada/libgnat/s-maccod.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-mantis.adb b/gcc/ada/libgnat/s-mantis.adb index d7a4c60..74c5b1e 100644 --- a/gcc/ada/libgnat/s-mantis.adb +++ b/gcc/ada/libgnat/s-mantis.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1996-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-mantis.ads b/gcc/ada/libgnat/s-mantis.ads index fbf35f8..203a40a 100644 --- a/gcc/ada/libgnat/s-mantis.ads +++ b/gcc/ada/libgnat/s-mantis.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1996-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-mastop.adb b/gcc/ada/libgnat/s-mastop.adb index 26c874c..0b69027 100644 --- a/gcc/ada/libgnat/s-mastop.adb +++ b/gcc/ada/libgnat/s-mastop.adb @@ -7,7 +7,7 @@ -- B o d y -- -- (Dummy version) -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -33,8 +33,6 @@ -- This dummy version of System.Machine_State_Operations is used on targets -- for which zero cost exception handling is not implemented. -pragma Compiler_Unit_Warning; - package body System.Machine_State_Operations is -- Turn off warnings since many unused parameters diff --git a/gcc/ada/libgnat/s-mastop.ads b/gcc/ada/libgnat/s-mastop.ads index 1df1047..2d20a8e 100644 --- a/gcc/ada/libgnat/s-mastop.ads +++ b/gcc/ada/libgnat/s-mastop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with System.Storage_Elements; package System.Machine_State_Operations is diff --git a/gcc/ada/libgnat/s-memcop.ads b/gcc/ada/libgnat/s-memcop.ads index 147c161..5754ba2 100644 --- a/gcc/ada/libgnat/s-memcop.ads +++ b/gcc/ada/libgnat/s-memcop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/s-memory.adb b/gcc/ada/libgnat/s-memory.adb index c026bcf..965ef15 100644 --- a/gcc/ada/libgnat/s-memory.adb +++ b/gcc/ada/libgnat/s-memory.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -38,8 +38,6 @@ -- of task on sjlj runtimes) cannot safely be handled while malloc is -- executing. -pragma Compiler_Unit_Warning; - with System.CRTL; with System.Parameters; with System.Soft_Links; @@ -136,7 +134,7 @@ package body System.Memory is Size : size_t) return System.Address is - Result : System.Address; + Result : System.Address; begin if Size = size_t'Last then raise Storage_Error with "object too large"; diff --git a/gcc/ada/libgnat/s-memory.ads b/gcc/ada/libgnat/s-memory.ads index 728779d..c2256b3 100644 --- a/gcc/ada/libgnat/s-memory.ads +++ b/gcc/ada/libgnat/s-memory.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -40,8 +40,6 @@ -- This unit may be used directly from an application program by providing -- an appropriate WITH, and the interface can be expected to remain stable. -pragma Compiler_Unit_Warning; - package System.Memory is pragma Elaborate_Body; diff --git a/gcc/ada/libgnat/s-mmap.adb b/gcc/ada/libgnat/s-mmap.adb index fc978a4..3c526e8 100644 --- a/gcc/ada/libgnat/s-mmap.adb +++ b/gcc/ada/libgnat/s-mmap.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- This library is free software; you can redistribute it and/or modify it -- -- under terms of the GNU General Public License as published by the Free -- @@ -367,7 +367,7 @@ package body System.Mmap is Length : File_Size := 0; Mutable : Boolean := False) return Mapped_Region is - Region : Mapped_Region := Invalid_Mapped_Region; + Region : Mapped_Region := Invalid_Mapped_Region; begin Read (File, Region, Offset, Length, Mutable); return Region; diff --git a/gcc/ada/libgnat/s-mmap.ads b/gcc/ada/libgnat/s-mmap.ads index 939c1ce..edb8da7 100644 --- a/gcc/ada/libgnat/s-mmap.ads +++ b/gcc/ada/libgnat/s-mmap.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- This library is free software; you can redistribute it and/or modify it -- -- under terms of the GNU General Public License as published by the Free -- diff --git a/gcc/ada/libgnat/s-mmauni__long.ads b/gcc/ada/libgnat/s-mmauni__long.ads index 3a68579..e0e06ab 100644 --- a/gcc/ada/libgnat/s-mmauni__long.ads +++ b/gcc/ada/libgnat/s-mmauni__long.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- This library is free software; you can redistribute it and/or modify it -- -- under terms of the GNU General Public License as published by the Free -- diff --git a/gcc/ada/libgnat/s-mmosin__mingw.adb b/gcc/ada/libgnat/s-mmosin__mingw.adb index 588e42e..455f382 100644 --- a/gcc/ada/libgnat/s-mmosin__mingw.adb +++ b/gcc/ada/libgnat/s-mmosin__mingw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- This library is free software; you can redistribute it and/or modify it -- -- under terms of the GNU General Public License as published by the Free -- diff --git a/gcc/ada/libgnat/s-mmosin__mingw.ads b/gcc/ada/libgnat/s-mmosin__mingw.ads index 74ac1f6..ec7c14e 100644 --- a/gcc/ada/libgnat/s-mmosin__mingw.ads +++ b/gcc/ada/libgnat/s-mmosin__mingw.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- This library is free software; you can redistribute it and/or modify it -- -- under terms of the GNU General Public License as published by the Free -- diff --git a/gcc/ada/libgnat/s-mmosin__unix.adb b/gcc/ada/libgnat/s-mmosin__unix.adb index 6a3e4ce..f3e5503 100644 --- a/gcc/ada/libgnat/s-mmosin__unix.adb +++ b/gcc/ada/libgnat/s-mmosin__unix.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- This library is free software; you can redistribute it and/or modify it -- -- under terms of the GNU General Public License as published by the Free -- @@ -30,7 +30,6 @@ ------------------------------------------------------------------------------ with Ada.IO_Exceptions; -with System; use System; with System.OS_Lib; use System.OS_Lib; with System.Mmap.Unix; use System.Mmap.Unix; diff --git a/gcc/ada/libgnat/s-mmosin__unix.ads b/gcc/ada/libgnat/s-mmosin__unix.ads index e9338cb..3b6d56d 100644 --- a/gcc/ada/libgnat/s-mmosin__unix.ads +++ b/gcc/ada/libgnat/s-mmosin__unix.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, AdaCore -- +-- Copyright (C) 2007-2022, AdaCore -- -- -- -- This library is free software; you can redistribute it and/or modify it -- -- under terms of the GNU General Public License as published by the Free -- diff --git a/gcc/ada/libgnat/s-multip.adb b/gcc/ada/libgnat/s-multip.adb index 8c9ae2b..f2a18e9 100644 --- a/gcc/ada/libgnat/s-multip.adb +++ b/gcc/ada/libgnat/s-multip.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2010-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-objrea.adb b/gcc/ada/libgnat/s-objrea.adb index e1bc677..854bbb2 100644 --- a/gcc/ada/libgnat/s-objrea.adb +++ b/gcc/ada/libgnat/s-objrea.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1472,7 +1472,7 @@ package body System.Object_Reader is (Obj : in out XCOFF32_Object_File; Sym : Object_Symbol) return String_Ptr_Len is - Symbol : Symbol_Entry; + Symbol : Symbol_Entry; begin Seek (Obj.Symtab_Stream, Sym.Off); @@ -1820,7 +1820,7 @@ package body System.Object_Reader is (S : in out Mapped_Stream; Off : Offset) return String is - Buf : Buffer; + Buf : Buffer; begin Seek (S, Off); diff --git a/gcc/ada/libgnat/s-objrea.ads b/gcc/ada/libgnat/s-objrea.ads index d20a53d..fc440ff 100644 --- a/gcc/ada/libgnat/s-objrea.ads +++ b/gcc/ada/libgnat/s-objrea.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-optide.adb b/gcc/ada/libgnat/s-optide.adb index 6ab0301..0e19e62 100644 --- a/gcc/ada/libgnat/s-optide.adb +++ b/gcc/ada/libgnat/s-optide.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2012-2021, AdaCore -- +-- Copyright (C) 2012-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-os_lib.adb b/gcc/ada/libgnat/s-os_lib.adb index 19f4cf7..0681580 100644 --- a/gcc/ada/libgnat/s-os_lib.adb +++ b/gcc/ada/libgnat/s-os_lib.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, AdaCore -- +-- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,11 +29,8 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; -with System; use System; with System.Case_Util; with System.CRTL; with System.Soft_Links; @@ -1214,7 +1211,6 @@ package body System.OS_Lib is H : Hour_Type; Mn : Minute_Type; S : Second_Type; - pragma Unreferenced (Y, Mo, H, Mn, S); begin GM_Split (Date, Y, Mo, D, H, Mn, S); @@ -1233,7 +1229,6 @@ package body System.OS_Lib is D : Day_Type; Mn : Minute_Type; S : Second_Type; - pragma Unreferenced (Y, Mo, D, Mn, S); begin GM_Split (Date, Y, Mo, D, H, Mn, S); @@ -1252,7 +1247,6 @@ package body System.OS_Lib is D : Day_Type; H : Hour_Type; S : Second_Type; - pragma Unreferenced (Y, Mo, D, H, S); begin GM_Split (Date, Y, Mo, D, H, Mn, S); @@ -1271,7 +1265,6 @@ package body System.OS_Lib is H : Hour_Type; Mn : Minute_Type; S : Second_Type; - pragma Unreferenced (Y, D, H, Mn, S); begin GM_Split (Date, Y, Mo, D, H, Mn, S); @@ -1290,7 +1283,6 @@ package body System.OS_Lib is D : Day_Type; H : Hour_Type; Mn : Minute_Type; - pragma Unreferenced (Y, Mo, D, H, Mn); begin GM_Split (Date, Y, Mo, D, H, Mn, S); @@ -1428,7 +1420,6 @@ package body System.OS_Lib is H : Hour_Type; Mn : Minute_Type; S : Second_Type; - pragma Unreferenced (Mo, D, H, Mn, S); begin GM_Split (Date, Y, Mo, D, H, Mn, S); diff --git a/gcc/ada/libgnat/s-os_lib.ads b/gcc/ada/libgnat/s-os_lib.ads index 139d2e0..503793f 100644 --- a/gcc/ada/libgnat/s-os_lib.ads +++ b/gcc/ada/libgnat/s-os_lib.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -48,9 +48,6 @@ -- be used by other predefined packages. User access to this package is via -- a renaming of this package in GNAT.OS_Lib (file g-os_lib.ads). -pragma Compiler_Unit_Warning; - -with System; with System.Strings; package System.OS_Lib is diff --git a/gcc/ada/libgnat/s-osprim.ads b/gcc/ada/libgnat/s-osprim.ads index fb4eb9ff..4174c52 100644 --- a/gcc/ada/libgnat/s-osprim.ads +++ b/gcc/ada/libgnat/s-osprim.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-osprim__darwin.adb b/gcc/ada/libgnat/s-osprim__darwin.adb index 00d0ccb..118e355 100644 --- a/gcc/ada/libgnat/s-osprim__darwin.adb +++ b/gcc/ada/libgnat/s-osprim__darwin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-osprim__lynxos.ads b/gcc/ada/libgnat/s-osprim__lynxos.ads index 790c597..fe8710d 100644 --- a/gcc/ada/libgnat/s-osprim__lynxos.ads +++ b/gcc/ada/libgnat/s-osprim__lynxos.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-osprim__mingw.adb b/gcc/ada/libgnat/s-osprim__mingw.adb index 61f24fd..9586f52 100644 --- a/gcc/ada/libgnat/s-osprim__mingw.adb +++ b/gcc/ada/libgnat/s-osprim__mingw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-osprim__posix.adb b/gcc/ada/libgnat/s-osprim__posix.adb index 96bf70e..a07cc18 100644 --- a/gcc/ada/libgnat/s-osprim__posix.adb +++ b/gcc/ada/libgnat/s-osprim__posix.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-osprim__posix2008.adb b/gcc/ada/libgnat/s-osprim__posix2008.adb index 44f14c4f..7419b26 100644 --- a/gcc/ada/libgnat/s-osprim__posix2008.adb +++ b/gcc/ada/libgnat/s-osprim__posix2008.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-osprim__rtems.adb b/gcc/ada/libgnat/s-osprim__rtems.adb index 23669e1..186db27 100644 --- a/gcc/ada/libgnat/s-osprim__rtems.adb +++ b/gcc/ada/libgnat/s-osprim__rtems.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-osprim__solaris.adb b/gcc/ada/libgnat/s-osprim__solaris.adb index 62e2d98..6812656 100644 --- a/gcc/ada/libgnat/s-osprim__solaris.adb +++ b/gcc/ada/libgnat/s-osprim__solaris.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-osprim__unix.adb b/gcc/ada/libgnat/s-osprim__unix.adb index 4d2db9b..5f00012 100644 --- a/gcc/ada/libgnat/s-osprim__unix.adb +++ b/gcc/ada/libgnat/s-osprim__unix.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-osprim__x32.adb b/gcc/ada/libgnat/s-osprim__x32.adb index 9dc1ba9..b68ddc1 100644 --- a/gcc/ada/libgnat/s-osprim__x32.adb +++ b/gcc/ada/libgnat/s-osprim__x32.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2013-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack03.adb b/gcc/ada/libgnat/s-pack03.adb index 1f6c2ef..6c5719a 100644 --- a/gcc/ada/libgnat/s-pack03.adb +++ b/gcc/ada/libgnat/s-pack03.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack03.ads b/gcc/ada/libgnat/s-pack03.ads index eb1094e..bcd7f73 100644 --- a/gcc/ada/libgnat/s-pack03.ads +++ b/gcc/ada/libgnat/s-pack03.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack05.adb b/gcc/ada/libgnat/s-pack05.adb index c7845aa..afc2a33 100644 --- a/gcc/ada/libgnat/s-pack05.adb +++ b/gcc/ada/libgnat/s-pack05.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack05.ads b/gcc/ada/libgnat/s-pack05.ads index 3f4ef87..a31a8b4 100644 --- a/gcc/ada/libgnat/s-pack05.ads +++ b/gcc/ada/libgnat/s-pack05.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack06.adb b/gcc/ada/libgnat/s-pack06.adb index 02b5331..3ca6112 100644 --- a/gcc/ada/libgnat/s-pack06.adb +++ b/gcc/ada/libgnat/s-pack06.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack06.ads b/gcc/ada/libgnat/s-pack06.ads index e7ca7b1..76b3a9b 100644 --- a/gcc/ada/libgnat/s-pack06.ads +++ b/gcc/ada/libgnat/s-pack06.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack07.adb b/gcc/ada/libgnat/s-pack07.adb index dbcb05e..181d52b 100644 --- a/gcc/ada/libgnat/s-pack07.adb +++ b/gcc/ada/libgnat/s-pack07.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack07.ads b/gcc/ada/libgnat/s-pack07.ads index 49be5ee..0bbedd4 100644 --- a/gcc/ada/libgnat/s-pack07.ads +++ b/gcc/ada/libgnat/s-pack07.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack09.adb b/gcc/ada/libgnat/s-pack09.adb index af5804c..7b9ce94 100644 --- a/gcc/ada/libgnat/s-pack09.adb +++ b/gcc/ada/libgnat/s-pack09.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack09.ads b/gcc/ada/libgnat/s-pack09.ads index f03afc0..823830c 100644 --- a/gcc/ada/libgnat/s-pack09.ads +++ b/gcc/ada/libgnat/s-pack09.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack10.adb b/gcc/ada/libgnat/s-pack10.adb index 1ba1769..c10f80e 100644 --- a/gcc/ada/libgnat/s-pack10.adb +++ b/gcc/ada/libgnat/s-pack10.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack10.ads b/gcc/ada/libgnat/s-pack10.ads index 621e84f..f3afd63 100644 --- a/gcc/ada/libgnat/s-pack10.ads +++ b/gcc/ada/libgnat/s-pack10.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack100.adb b/gcc/ada/libgnat/s-pack100.adb index d3211e3..d6ec55d 100644 --- a/gcc/ada/libgnat/s-pack100.adb +++ b/gcc/ada/libgnat/s-pack100.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack100.ads b/gcc/ada/libgnat/s-pack100.ads index ada158d..ef8bf29 100644 --- a/gcc/ada/libgnat/s-pack100.ads +++ b/gcc/ada/libgnat/s-pack100.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack101.adb b/gcc/ada/libgnat/s-pack101.adb index 9ef16e5..9b4344b 100644 --- a/gcc/ada/libgnat/s-pack101.adb +++ b/gcc/ada/libgnat/s-pack101.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack101.ads b/gcc/ada/libgnat/s-pack101.ads index 91eaf5c..b9dcdb3 100644 --- a/gcc/ada/libgnat/s-pack101.ads +++ b/gcc/ada/libgnat/s-pack101.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack102.adb b/gcc/ada/libgnat/s-pack102.adb index 9da1d19..5d571cb 100644 --- a/gcc/ada/libgnat/s-pack102.adb +++ b/gcc/ada/libgnat/s-pack102.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack102.ads b/gcc/ada/libgnat/s-pack102.ads index 22c17024..09e87c0 100644 --- a/gcc/ada/libgnat/s-pack102.ads +++ b/gcc/ada/libgnat/s-pack102.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack103.adb b/gcc/ada/libgnat/s-pack103.adb index 158daf9..519316a 100644 --- a/gcc/ada/libgnat/s-pack103.adb +++ b/gcc/ada/libgnat/s-pack103.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack103.ads b/gcc/ada/libgnat/s-pack103.ads index 0e1442f..0050447 100644 --- a/gcc/ada/libgnat/s-pack103.ads +++ b/gcc/ada/libgnat/s-pack103.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack104.adb b/gcc/ada/libgnat/s-pack104.adb index 4cf7e0e..b80d494 100644 --- a/gcc/ada/libgnat/s-pack104.adb +++ b/gcc/ada/libgnat/s-pack104.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack104.ads b/gcc/ada/libgnat/s-pack104.ads index 1e111f9..79a0f36 100644 --- a/gcc/ada/libgnat/s-pack104.ads +++ b/gcc/ada/libgnat/s-pack104.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack105.adb b/gcc/ada/libgnat/s-pack105.adb index 44052c5..795650b 100644 --- a/gcc/ada/libgnat/s-pack105.adb +++ b/gcc/ada/libgnat/s-pack105.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack105.ads b/gcc/ada/libgnat/s-pack105.ads index dfe49f8..a7c8740 100644 --- a/gcc/ada/libgnat/s-pack105.ads +++ b/gcc/ada/libgnat/s-pack105.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack106.adb b/gcc/ada/libgnat/s-pack106.adb index a604456..9c1e739 100644 --- a/gcc/ada/libgnat/s-pack106.adb +++ b/gcc/ada/libgnat/s-pack106.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack106.ads b/gcc/ada/libgnat/s-pack106.ads index b4a4711..647e0ac 100644 --- a/gcc/ada/libgnat/s-pack106.ads +++ b/gcc/ada/libgnat/s-pack106.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack107.adb b/gcc/ada/libgnat/s-pack107.adb index 4c04486..b5ffd76 100644 --- a/gcc/ada/libgnat/s-pack107.adb +++ b/gcc/ada/libgnat/s-pack107.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack107.ads b/gcc/ada/libgnat/s-pack107.ads index dcd4c07..ab67890 100644 --- a/gcc/ada/libgnat/s-pack107.ads +++ b/gcc/ada/libgnat/s-pack107.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack108.adb b/gcc/ada/libgnat/s-pack108.adb index 6da22bd..684732f 100644 --- a/gcc/ada/libgnat/s-pack108.adb +++ b/gcc/ada/libgnat/s-pack108.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack108.ads b/gcc/ada/libgnat/s-pack108.ads index 8bb2017..1486e28 100644 --- a/gcc/ada/libgnat/s-pack108.ads +++ b/gcc/ada/libgnat/s-pack108.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack109.adb b/gcc/ada/libgnat/s-pack109.adb index 3770666..8530067 100644 --- a/gcc/ada/libgnat/s-pack109.adb +++ b/gcc/ada/libgnat/s-pack109.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack109.ads b/gcc/ada/libgnat/s-pack109.ads index 3d809c3..cd8dc9f 100644 --- a/gcc/ada/libgnat/s-pack109.ads +++ b/gcc/ada/libgnat/s-pack109.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack11.adb b/gcc/ada/libgnat/s-pack11.adb index ed3b901..96bdbfe 100644 --- a/gcc/ada/libgnat/s-pack11.adb +++ b/gcc/ada/libgnat/s-pack11.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack11.ads b/gcc/ada/libgnat/s-pack11.ads index 6298e49..c35fa85 100644 --- a/gcc/ada/libgnat/s-pack11.ads +++ b/gcc/ada/libgnat/s-pack11.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack110.adb b/gcc/ada/libgnat/s-pack110.adb index c88fdd5..19c1696 100644 --- a/gcc/ada/libgnat/s-pack110.adb +++ b/gcc/ada/libgnat/s-pack110.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack110.ads b/gcc/ada/libgnat/s-pack110.ads index 74a5cf5..6948fa3 100644 --- a/gcc/ada/libgnat/s-pack110.ads +++ b/gcc/ada/libgnat/s-pack110.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack111.adb b/gcc/ada/libgnat/s-pack111.adb index b760b90..992b7e0 100644 --- a/gcc/ada/libgnat/s-pack111.adb +++ b/gcc/ada/libgnat/s-pack111.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack111.ads b/gcc/ada/libgnat/s-pack111.ads index a653ed4..75b2a3a 100644 --- a/gcc/ada/libgnat/s-pack111.ads +++ b/gcc/ada/libgnat/s-pack111.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack112.adb b/gcc/ada/libgnat/s-pack112.adb index f6880fe..735a5db 100644 --- a/gcc/ada/libgnat/s-pack112.adb +++ b/gcc/ada/libgnat/s-pack112.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack112.ads b/gcc/ada/libgnat/s-pack112.ads index fdc5349..24f0f7a 100644 --- a/gcc/ada/libgnat/s-pack112.ads +++ b/gcc/ada/libgnat/s-pack112.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack113.adb b/gcc/ada/libgnat/s-pack113.adb index d34b7d7..8436498 100644 --- a/gcc/ada/libgnat/s-pack113.adb +++ b/gcc/ada/libgnat/s-pack113.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack113.ads b/gcc/ada/libgnat/s-pack113.ads index 5c864af..0d6cab4 100644 --- a/gcc/ada/libgnat/s-pack113.ads +++ b/gcc/ada/libgnat/s-pack113.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack114.adb b/gcc/ada/libgnat/s-pack114.adb index b74a46e..8d69e4e 100644 --- a/gcc/ada/libgnat/s-pack114.adb +++ b/gcc/ada/libgnat/s-pack114.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack114.ads b/gcc/ada/libgnat/s-pack114.ads index 89bdec7..c3264b5 100644 --- a/gcc/ada/libgnat/s-pack114.ads +++ b/gcc/ada/libgnat/s-pack114.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack115.adb b/gcc/ada/libgnat/s-pack115.adb index 882ce51..b77c6c0 100644 --- a/gcc/ada/libgnat/s-pack115.adb +++ b/gcc/ada/libgnat/s-pack115.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack115.ads b/gcc/ada/libgnat/s-pack115.ads index 3ace3c4..e28e8ad 100644 --- a/gcc/ada/libgnat/s-pack115.ads +++ b/gcc/ada/libgnat/s-pack115.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack116.adb b/gcc/ada/libgnat/s-pack116.adb index f5c5aaa..a8deae8 100644 --- a/gcc/ada/libgnat/s-pack116.adb +++ b/gcc/ada/libgnat/s-pack116.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack116.ads b/gcc/ada/libgnat/s-pack116.ads index fd219cb..41d98cb 100644 --- a/gcc/ada/libgnat/s-pack116.ads +++ b/gcc/ada/libgnat/s-pack116.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack117.adb b/gcc/ada/libgnat/s-pack117.adb index 817616f..6a33adc 100644 --- a/gcc/ada/libgnat/s-pack117.adb +++ b/gcc/ada/libgnat/s-pack117.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack117.ads b/gcc/ada/libgnat/s-pack117.ads index c7f03cc..3fe8d68 100644 --- a/gcc/ada/libgnat/s-pack117.ads +++ b/gcc/ada/libgnat/s-pack117.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack118.adb b/gcc/ada/libgnat/s-pack118.adb index 0b4003d..8de2722 100644 --- a/gcc/ada/libgnat/s-pack118.adb +++ b/gcc/ada/libgnat/s-pack118.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack118.ads b/gcc/ada/libgnat/s-pack118.ads index 3f5d0e1..6528f95 100644 --- a/gcc/ada/libgnat/s-pack118.ads +++ b/gcc/ada/libgnat/s-pack118.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack119.adb b/gcc/ada/libgnat/s-pack119.adb index 250f895..6e8dcc7 100644 --- a/gcc/ada/libgnat/s-pack119.adb +++ b/gcc/ada/libgnat/s-pack119.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack119.ads b/gcc/ada/libgnat/s-pack119.ads index 6821bd5..43dd1fe 100644 --- a/gcc/ada/libgnat/s-pack119.ads +++ b/gcc/ada/libgnat/s-pack119.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack12.adb b/gcc/ada/libgnat/s-pack12.adb index 66c9dc1..30475f1 100644 --- a/gcc/ada/libgnat/s-pack12.adb +++ b/gcc/ada/libgnat/s-pack12.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack12.ads b/gcc/ada/libgnat/s-pack12.ads index 3808774..e4d05cc 100644 --- a/gcc/ada/libgnat/s-pack12.ads +++ b/gcc/ada/libgnat/s-pack12.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack120.adb b/gcc/ada/libgnat/s-pack120.adb index ad87b96..9ca04af 100644 --- a/gcc/ada/libgnat/s-pack120.adb +++ b/gcc/ada/libgnat/s-pack120.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack120.ads b/gcc/ada/libgnat/s-pack120.ads index b49d3bb..43d7d9b 100644 --- a/gcc/ada/libgnat/s-pack120.ads +++ b/gcc/ada/libgnat/s-pack120.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack121.adb b/gcc/ada/libgnat/s-pack121.adb index baeac89..c389544 100644 --- a/gcc/ada/libgnat/s-pack121.adb +++ b/gcc/ada/libgnat/s-pack121.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack121.ads b/gcc/ada/libgnat/s-pack121.ads index a05586b..7c615b6 100644 --- a/gcc/ada/libgnat/s-pack121.ads +++ b/gcc/ada/libgnat/s-pack121.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack122.adb b/gcc/ada/libgnat/s-pack122.adb index 7cb7ef6..fa896ed 100644 --- a/gcc/ada/libgnat/s-pack122.adb +++ b/gcc/ada/libgnat/s-pack122.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack122.ads b/gcc/ada/libgnat/s-pack122.ads index 57a4575..b612283 100644 --- a/gcc/ada/libgnat/s-pack122.ads +++ b/gcc/ada/libgnat/s-pack122.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack123.adb b/gcc/ada/libgnat/s-pack123.adb index 630cc7e..3748f8d 100644 --- a/gcc/ada/libgnat/s-pack123.adb +++ b/gcc/ada/libgnat/s-pack123.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack123.ads b/gcc/ada/libgnat/s-pack123.ads index b35eb86..b3d3140 100644 --- a/gcc/ada/libgnat/s-pack123.ads +++ b/gcc/ada/libgnat/s-pack123.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack124.adb b/gcc/ada/libgnat/s-pack124.adb index 8ca12eb..2e01c8e 100644 --- a/gcc/ada/libgnat/s-pack124.adb +++ b/gcc/ada/libgnat/s-pack124.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack124.ads b/gcc/ada/libgnat/s-pack124.ads index 12cfee1..6d18b5d 100644 --- a/gcc/ada/libgnat/s-pack124.ads +++ b/gcc/ada/libgnat/s-pack124.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack125.adb b/gcc/ada/libgnat/s-pack125.adb index 32193d9..146ec9e 100644 --- a/gcc/ada/libgnat/s-pack125.adb +++ b/gcc/ada/libgnat/s-pack125.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack125.ads b/gcc/ada/libgnat/s-pack125.ads index b06dfcf..f54d088 100644 --- a/gcc/ada/libgnat/s-pack125.ads +++ b/gcc/ada/libgnat/s-pack125.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack126.adb b/gcc/ada/libgnat/s-pack126.adb index c5529f4..d0e04a3 100644 --- a/gcc/ada/libgnat/s-pack126.adb +++ b/gcc/ada/libgnat/s-pack126.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack126.ads b/gcc/ada/libgnat/s-pack126.ads index a9a4edc..6cdfa8b 100644 --- a/gcc/ada/libgnat/s-pack126.ads +++ b/gcc/ada/libgnat/s-pack126.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack127.adb b/gcc/ada/libgnat/s-pack127.adb index 3a261df..8673425 100644 --- a/gcc/ada/libgnat/s-pack127.adb +++ b/gcc/ada/libgnat/s-pack127.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack127.ads b/gcc/ada/libgnat/s-pack127.ads index 9f37b9a..73de080 100644 --- a/gcc/ada/libgnat/s-pack127.ads +++ b/gcc/ada/libgnat/s-pack127.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack13.adb b/gcc/ada/libgnat/s-pack13.adb index 72aec3f..b654213 100644 --- a/gcc/ada/libgnat/s-pack13.adb +++ b/gcc/ada/libgnat/s-pack13.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack13.ads b/gcc/ada/libgnat/s-pack13.ads index e68e0c2..d3d959b 100644 --- a/gcc/ada/libgnat/s-pack13.ads +++ b/gcc/ada/libgnat/s-pack13.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack14.adb b/gcc/ada/libgnat/s-pack14.adb index 919a59a..d8f6ef5 100644 --- a/gcc/ada/libgnat/s-pack14.adb +++ b/gcc/ada/libgnat/s-pack14.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack14.ads b/gcc/ada/libgnat/s-pack14.ads index 63f0929..b06e92c 100644 --- a/gcc/ada/libgnat/s-pack14.ads +++ b/gcc/ada/libgnat/s-pack14.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack15.adb b/gcc/ada/libgnat/s-pack15.adb index 231cb71..be3a961 100644 --- a/gcc/ada/libgnat/s-pack15.adb +++ b/gcc/ada/libgnat/s-pack15.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack15.ads b/gcc/ada/libgnat/s-pack15.ads index 0b3f4e3..cf6ac4a 100644 --- a/gcc/ada/libgnat/s-pack15.ads +++ b/gcc/ada/libgnat/s-pack15.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack17.adb b/gcc/ada/libgnat/s-pack17.adb index 28b1ecd..8b4f554 100644 --- a/gcc/ada/libgnat/s-pack17.adb +++ b/gcc/ada/libgnat/s-pack17.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack17.ads b/gcc/ada/libgnat/s-pack17.ads index 5aa9bf7..7c03488 100644 --- a/gcc/ada/libgnat/s-pack17.ads +++ b/gcc/ada/libgnat/s-pack17.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack18.adb b/gcc/ada/libgnat/s-pack18.adb index bc077bb5..18d09bf 100644 --- a/gcc/ada/libgnat/s-pack18.adb +++ b/gcc/ada/libgnat/s-pack18.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack18.ads b/gcc/ada/libgnat/s-pack18.ads index b96eccc..3ca1d1c 100644 --- a/gcc/ada/libgnat/s-pack18.ads +++ b/gcc/ada/libgnat/s-pack18.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack19.adb b/gcc/ada/libgnat/s-pack19.adb index cd424b2..5a982f1 100644 --- a/gcc/ada/libgnat/s-pack19.adb +++ b/gcc/ada/libgnat/s-pack19.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack19.ads b/gcc/ada/libgnat/s-pack19.ads index 6c5df71..5394d1c 100644 --- a/gcc/ada/libgnat/s-pack19.ads +++ b/gcc/ada/libgnat/s-pack19.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack20.adb b/gcc/ada/libgnat/s-pack20.adb index 2577f5a..e2655c9 100644 --- a/gcc/ada/libgnat/s-pack20.adb +++ b/gcc/ada/libgnat/s-pack20.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack20.ads b/gcc/ada/libgnat/s-pack20.ads index 558d0d7..44d313f 100644 --- a/gcc/ada/libgnat/s-pack20.ads +++ b/gcc/ada/libgnat/s-pack20.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack21.adb b/gcc/ada/libgnat/s-pack21.adb index de2974d..c1389a1 100644 --- a/gcc/ada/libgnat/s-pack21.adb +++ b/gcc/ada/libgnat/s-pack21.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack21.ads b/gcc/ada/libgnat/s-pack21.ads index be56b08..e78cc3f 100644 --- a/gcc/ada/libgnat/s-pack21.ads +++ b/gcc/ada/libgnat/s-pack21.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack22.adb b/gcc/ada/libgnat/s-pack22.adb index 0dd92d0..33e58ec 100644 --- a/gcc/ada/libgnat/s-pack22.adb +++ b/gcc/ada/libgnat/s-pack22.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack22.ads b/gcc/ada/libgnat/s-pack22.ads index 8d0e3d7..2ddac67 100644 --- a/gcc/ada/libgnat/s-pack22.ads +++ b/gcc/ada/libgnat/s-pack22.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack23.adb b/gcc/ada/libgnat/s-pack23.adb index 54cced1..bf0e3db 100644 --- a/gcc/ada/libgnat/s-pack23.adb +++ b/gcc/ada/libgnat/s-pack23.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack23.ads b/gcc/ada/libgnat/s-pack23.ads index eaf1b3b..e066496 100644 --- a/gcc/ada/libgnat/s-pack23.ads +++ b/gcc/ada/libgnat/s-pack23.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack24.adb b/gcc/ada/libgnat/s-pack24.adb index 2523a86..cfdf350 100644 --- a/gcc/ada/libgnat/s-pack24.adb +++ b/gcc/ada/libgnat/s-pack24.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack24.ads b/gcc/ada/libgnat/s-pack24.ads index d690cac..eb4be08 100644 --- a/gcc/ada/libgnat/s-pack24.ads +++ b/gcc/ada/libgnat/s-pack24.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack25.adb b/gcc/ada/libgnat/s-pack25.adb index 6c97572f..2d33af0 100644 --- a/gcc/ada/libgnat/s-pack25.adb +++ b/gcc/ada/libgnat/s-pack25.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack25.ads b/gcc/ada/libgnat/s-pack25.ads index 04ec3a9..c508aca 100644 --- a/gcc/ada/libgnat/s-pack25.ads +++ b/gcc/ada/libgnat/s-pack25.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack26.adb b/gcc/ada/libgnat/s-pack26.adb index 24381f3..70e1607 100644 --- a/gcc/ada/libgnat/s-pack26.adb +++ b/gcc/ada/libgnat/s-pack26.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack26.ads b/gcc/ada/libgnat/s-pack26.ads index e0d590a..51fcab6 100644 --- a/gcc/ada/libgnat/s-pack26.ads +++ b/gcc/ada/libgnat/s-pack26.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack27.adb b/gcc/ada/libgnat/s-pack27.adb index 720d017..6c4d3ac 100644 --- a/gcc/ada/libgnat/s-pack27.adb +++ b/gcc/ada/libgnat/s-pack27.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack27.ads b/gcc/ada/libgnat/s-pack27.ads index 320ec17..5ff7d8d 100644 --- a/gcc/ada/libgnat/s-pack27.ads +++ b/gcc/ada/libgnat/s-pack27.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack28.adb b/gcc/ada/libgnat/s-pack28.adb index fd0defb..e841d28 100644 --- a/gcc/ada/libgnat/s-pack28.adb +++ b/gcc/ada/libgnat/s-pack28.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack28.ads b/gcc/ada/libgnat/s-pack28.ads index 8a4d168..90e1186 100644 --- a/gcc/ada/libgnat/s-pack28.ads +++ b/gcc/ada/libgnat/s-pack28.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack29.adb b/gcc/ada/libgnat/s-pack29.adb index e5dfa33..e0da92a 100644 --- a/gcc/ada/libgnat/s-pack29.adb +++ b/gcc/ada/libgnat/s-pack29.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack29.ads b/gcc/ada/libgnat/s-pack29.ads index 40f640a..c213297 100644 --- a/gcc/ada/libgnat/s-pack29.ads +++ b/gcc/ada/libgnat/s-pack29.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack30.adb b/gcc/ada/libgnat/s-pack30.adb index 1ce3ea9..88e0ddf 100644 --- a/gcc/ada/libgnat/s-pack30.adb +++ b/gcc/ada/libgnat/s-pack30.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack30.ads b/gcc/ada/libgnat/s-pack30.ads index 5d6b7cb..4b5c84e 100644 --- a/gcc/ada/libgnat/s-pack30.ads +++ b/gcc/ada/libgnat/s-pack30.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack31.adb b/gcc/ada/libgnat/s-pack31.adb index b754b69..cb0e994 100644 --- a/gcc/ada/libgnat/s-pack31.adb +++ b/gcc/ada/libgnat/s-pack31.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack31.ads b/gcc/ada/libgnat/s-pack31.ads index 7bc763c..9b35463 100644 --- a/gcc/ada/libgnat/s-pack31.ads +++ b/gcc/ada/libgnat/s-pack31.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack33.adb b/gcc/ada/libgnat/s-pack33.adb index 27d6e05..2412736 100644 --- a/gcc/ada/libgnat/s-pack33.adb +++ b/gcc/ada/libgnat/s-pack33.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack33.ads b/gcc/ada/libgnat/s-pack33.ads index a063099..1943bbe 100644 --- a/gcc/ada/libgnat/s-pack33.ads +++ b/gcc/ada/libgnat/s-pack33.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack34.adb b/gcc/ada/libgnat/s-pack34.adb index 953b001..297da8d 100644 --- a/gcc/ada/libgnat/s-pack34.adb +++ b/gcc/ada/libgnat/s-pack34.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack34.ads b/gcc/ada/libgnat/s-pack34.ads index 4e87915..ee1594b 100644 --- a/gcc/ada/libgnat/s-pack34.ads +++ b/gcc/ada/libgnat/s-pack34.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack35.adb b/gcc/ada/libgnat/s-pack35.adb index ba0a0e6..5acce13 100644 --- a/gcc/ada/libgnat/s-pack35.adb +++ b/gcc/ada/libgnat/s-pack35.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack35.ads b/gcc/ada/libgnat/s-pack35.ads index eca6935..d04c5c5 100644 --- a/gcc/ada/libgnat/s-pack35.ads +++ b/gcc/ada/libgnat/s-pack35.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack36.adb b/gcc/ada/libgnat/s-pack36.adb index b273b09..4873a77 100644 --- a/gcc/ada/libgnat/s-pack36.adb +++ b/gcc/ada/libgnat/s-pack36.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack36.ads b/gcc/ada/libgnat/s-pack36.ads index a8e9739..ea576ef 100644 --- a/gcc/ada/libgnat/s-pack36.ads +++ b/gcc/ada/libgnat/s-pack36.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack37.adb b/gcc/ada/libgnat/s-pack37.adb index 5a5a1da..dd04177 100644 --- a/gcc/ada/libgnat/s-pack37.adb +++ b/gcc/ada/libgnat/s-pack37.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack37.ads b/gcc/ada/libgnat/s-pack37.ads index b5ade3f..155a3fe 100644 --- a/gcc/ada/libgnat/s-pack37.ads +++ b/gcc/ada/libgnat/s-pack37.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack38.adb b/gcc/ada/libgnat/s-pack38.adb index d2bd084..4c80392 100644 --- a/gcc/ada/libgnat/s-pack38.adb +++ b/gcc/ada/libgnat/s-pack38.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack38.ads b/gcc/ada/libgnat/s-pack38.ads index 6a629190..bd15cb8 100644 --- a/gcc/ada/libgnat/s-pack38.ads +++ b/gcc/ada/libgnat/s-pack38.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack39.adb b/gcc/ada/libgnat/s-pack39.adb index 647610c..c94d920 100644 --- a/gcc/ada/libgnat/s-pack39.adb +++ b/gcc/ada/libgnat/s-pack39.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack39.ads b/gcc/ada/libgnat/s-pack39.ads index c97fc9e..306d388 100644 --- a/gcc/ada/libgnat/s-pack39.ads +++ b/gcc/ada/libgnat/s-pack39.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack40.adb b/gcc/ada/libgnat/s-pack40.adb index 097d58c..d4ead18 100644 --- a/gcc/ada/libgnat/s-pack40.adb +++ b/gcc/ada/libgnat/s-pack40.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack40.ads b/gcc/ada/libgnat/s-pack40.ads index 4d3c43f..529f638 100644 --- a/gcc/ada/libgnat/s-pack40.ads +++ b/gcc/ada/libgnat/s-pack40.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack41.adb b/gcc/ada/libgnat/s-pack41.adb index 5d6ff71..2c30147 100644 --- a/gcc/ada/libgnat/s-pack41.adb +++ b/gcc/ada/libgnat/s-pack41.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack41.ads b/gcc/ada/libgnat/s-pack41.ads index 8e54781..cb8d7f8 100644 --- a/gcc/ada/libgnat/s-pack41.ads +++ b/gcc/ada/libgnat/s-pack41.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack42.adb b/gcc/ada/libgnat/s-pack42.adb index d059ded..bfe7073 100644 --- a/gcc/ada/libgnat/s-pack42.adb +++ b/gcc/ada/libgnat/s-pack42.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack42.ads b/gcc/ada/libgnat/s-pack42.ads index 1c20804..ac733db 100644 --- a/gcc/ada/libgnat/s-pack42.ads +++ b/gcc/ada/libgnat/s-pack42.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack43.adb b/gcc/ada/libgnat/s-pack43.adb index 3b58202..6b37cb1 100644 --- a/gcc/ada/libgnat/s-pack43.adb +++ b/gcc/ada/libgnat/s-pack43.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack43.ads b/gcc/ada/libgnat/s-pack43.ads index f7b80fc..e77d90f 100644 --- a/gcc/ada/libgnat/s-pack43.ads +++ b/gcc/ada/libgnat/s-pack43.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack44.adb b/gcc/ada/libgnat/s-pack44.adb index 90aee39..f5f6f9e 100644 --- a/gcc/ada/libgnat/s-pack44.adb +++ b/gcc/ada/libgnat/s-pack44.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack44.ads b/gcc/ada/libgnat/s-pack44.ads index 0f2ce7e..8d6be0b 100644 --- a/gcc/ada/libgnat/s-pack44.ads +++ b/gcc/ada/libgnat/s-pack44.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack45.adb b/gcc/ada/libgnat/s-pack45.adb index cfc75fb..9d0cc36 100644 --- a/gcc/ada/libgnat/s-pack45.adb +++ b/gcc/ada/libgnat/s-pack45.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack45.ads b/gcc/ada/libgnat/s-pack45.ads index d95e52a..adab41f 100644 --- a/gcc/ada/libgnat/s-pack45.ads +++ b/gcc/ada/libgnat/s-pack45.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack46.adb b/gcc/ada/libgnat/s-pack46.adb index 4b7dc25..8017376 100644 --- a/gcc/ada/libgnat/s-pack46.adb +++ b/gcc/ada/libgnat/s-pack46.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack46.ads b/gcc/ada/libgnat/s-pack46.ads index 38f6897..3c095dc 100644 --- a/gcc/ada/libgnat/s-pack46.ads +++ b/gcc/ada/libgnat/s-pack46.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack47.adb b/gcc/ada/libgnat/s-pack47.adb index d6ab3fd..f3b4e17 100644 --- a/gcc/ada/libgnat/s-pack47.adb +++ b/gcc/ada/libgnat/s-pack47.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack47.ads b/gcc/ada/libgnat/s-pack47.ads index 6b2141d..52a29cb 100644 --- a/gcc/ada/libgnat/s-pack47.ads +++ b/gcc/ada/libgnat/s-pack47.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack48.adb b/gcc/ada/libgnat/s-pack48.adb index 088474c..ea655c4 100644 --- a/gcc/ada/libgnat/s-pack48.adb +++ b/gcc/ada/libgnat/s-pack48.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack48.ads b/gcc/ada/libgnat/s-pack48.ads index 67ed8ba..309f7cd 100644 --- a/gcc/ada/libgnat/s-pack48.ads +++ b/gcc/ada/libgnat/s-pack48.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack49.adb b/gcc/ada/libgnat/s-pack49.adb index c73cac5..55ca96e 100644 --- a/gcc/ada/libgnat/s-pack49.adb +++ b/gcc/ada/libgnat/s-pack49.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack49.ads b/gcc/ada/libgnat/s-pack49.ads index 9b9db07..25b3478 100644 --- a/gcc/ada/libgnat/s-pack49.ads +++ b/gcc/ada/libgnat/s-pack49.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack50.adb b/gcc/ada/libgnat/s-pack50.adb index 2f5704c..9b526cb 100644 --- a/gcc/ada/libgnat/s-pack50.adb +++ b/gcc/ada/libgnat/s-pack50.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack50.ads b/gcc/ada/libgnat/s-pack50.ads index 65203a3..d609843 100644 --- a/gcc/ada/libgnat/s-pack50.ads +++ b/gcc/ada/libgnat/s-pack50.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack51.adb b/gcc/ada/libgnat/s-pack51.adb index 4c474c5..59c8ebf 100644 --- a/gcc/ada/libgnat/s-pack51.adb +++ b/gcc/ada/libgnat/s-pack51.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack51.ads b/gcc/ada/libgnat/s-pack51.ads index 0b2b99e..9e59fca 100644 --- a/gcc/ada/libgnat/s-pack51.ads +++ b/gcc/ada/libgnat/s-pack51.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack52.adb b/gcc/ada/libgnat/s-pack52.adb index b4c313a..637d0fa 100644 --- a/gcc/ada/libgnat/s-pack52.adb +++ b/gcc/ada/libgnat/s-pack52.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack52.ads b/gcc/ada/libgnat/s-pack52.ads index 04f1289..814c212 100644 --- a/gcc/ada/libgnat/s-pack52.ads +++ b/gcc/ada/libgnat/s-pack52.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack53.adb b/gcc/ada/libgnat/s-pack53.adb index 3b1b699..b194a66 100644 --- a/gcc/ada/libgnat/s-pack53.adb +++ b/gcc/ada/libgnat/s-pack53.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack53.ads b/gcc/ada/libgnat/s-pack53.ads index 3c794d7..2a2ebd5 100644 --- a/gcc/ada/libgnat/s-pack53.ads +++ b/gcc/ada/libgnat/s-pack53.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack54.adb b/gcc/ada/libgnat/s-pack54.adb index 33eafe4..754dd06 100644 --- a/gcc/ada/libgnat/s-pack54.adb +++ b/gcc/ada/libgnat/s-pack54.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack54.ads b/gcc/ada/libgnat/s-pack54.ads index 046ca04..111bf57 100644 --- a/gcc/ada/libgnat/s-pack54.ads +++ b/gcc/ada/libgnat/s-pack54.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack55.adb b/gcc/ada/libgnat/s-pack55.adb index 400e55c..ce3f64c 100644 --- a/gcc/ada/libgnat/s-pack55.adb +++ b/gcc/ada/libgnat/s-pack55.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack55.ads b/gcc/ada/libgnat/s-pack55.ads index 5421a2e..d401405 100644 --- a/gcc/ada/libgnat/s-pack55.ads +++ b/gcc/ada/libgnat/s-pack55.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack56.adb b/gcc/ada/libgnat/s-pack56.adb index f2d7814..f953b09 100644 --- a/gcc/ada/libgnat/s-pack56.adb +++ b/gcc/ada/libgnat/s-pack56.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack56.ads b/gcc/ada/libgnat/s-pack56.ads index 10539e7..44e6628 100644 --- a/gcc/ada/libgnat/s-pack56.ads +++ b/gcc/ada/libgnat/s-pack56.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack57.adb b/gcc/ada/libgnat/s-pack57.adb index e151840..47a0aad 100644 --- a/gcc/ada/libgnat/s-pack57.adb +++ b/gcc/ada/libgnat/s-pack57.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack57.ads b/gcc/ada/libgnat/s-pack57.ads index a93ae11..16bc37f 100644 --- a/gcc/ada/libgnat/s-pack57.ads +++ b/gcc/ada/libgnat/s-pack57.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack58.adb b/gcc/ada/libgnat/s-pack58.adb index 3c9f73d..9b03d5c 100644 --- a/gcc/ada/libgnat/s-pack58.adb +++ b/gcc/ada/libgnat/s-pack58.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack58.ads b/gcc/ada/libgnat/s-pack58.ads index 2949cc3..7513d5e 100644 --- a/gcc/ada/libgnat/s-pack58.ads +++ b/gcc/ada/libgnat/s-pack58.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack59.adb b/gcc/ada/libgnat/s-pack59.adb index b54b1ff..c24dd9f 100644 --- a/gcc/ada/libgnat/s-pack59.adb +++ b/gcc/ada/libgnat/s-pack59.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack59.ads b/gcc/ada/libgnat/s-pack59.ads index 5bdf60c..f93cac1 100644 --- a/gcc/ada/libgnat/s-pack59.ads +++ b/gcc/ada/libgnat/s-pack59.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack60.adb b/gcc/ada/libgnat/s-pack60.adb index b543ac5..1382caa 100644 --- a/gcc/ada/libgnat/s-pack60.adb +++ b/gcc/ada/libgnat/s-pack60.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack60.ads b/gcc/ada/libgnat/s-pack60.ads index 0362a3c..4ad0b63 100644 --- a/gcc/ada/libgnat/s-pack60.ads +++ b/gcc/ada/libgnat/s-pack60.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack61.adb b/gcc/ada/libgnat/s-pack61.adb index aa631c5..a314bb9 100644 --- a/gcc/ada/libgnat/s-pack61.adb +++ b/gcc/ada/libgnat/s-pack61.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack61.ads b/gcc/ada/libgnat/s-pack61.ads index 6d0d4c7..ec5f329 100644 --- a/gcc/ada/libgnat/s-pack61.ads +++ b/gcc/ada/libgnat/s-pack61.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack62.adb b/gcc/ada/libgnat/s-pack62.adb index 66dd8a1..9ecf9f8 100644 --- a/gcc/ada/libgnat/s-pack62.adb +++ b/gcc/ada/libgnat/s-pack62.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack62.ads b/gcc/ada/libgnat/s-pack62.ads index 826df31..7dd64ca 100644 --- a/gcc/ada/libgnat/s-pack62.ads +++ b/gcc/ada/libgnat/s-pack62.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack63.adb b/gcc/ada/libgnat/s-pack63.adb index b4a210b..c3c3e11 100644 --- a/gcc/ada/libgnat/s-pack63.adb +++ b/gcc/ada/libgnat/s-pack63.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack63.ads b/gcc/ada/libgnat/s-pack63.ads index 9a8e5c4..3298278 100644 --- a/gcc/ada/libgnat/s-pack63.ads +++ b/gcc/ada/libgnat/s-pack63.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack65.adb b/gcc/ada/libgnat/s-pack65.adb index 33e4dbd..de51da6 100644 --- a/gcc/ada/libgnat/s-pack65.adb +++ b/gcc/ada/libgnat/s-pack65.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack65.ads b/gcc/ada/libgnat/s-pack65.ads index 023208d..f219c8f 100644 --- a/gcc/ada/libgnat/s-pack65.ads +++ b/gcc/ada/libgnat/s-pack65.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack66.adb b/gcc/ada/libgnat/s-pack66.adb index 80a7ce4..5dceccb 100644 --- a/gcc/ada/libgnat/s-pack66.adb +++ b/gcc/ada/libgnat/s-pack66.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack66.ads b/gcc/ada/libgnat/s-pack66.ads index 9ae24a8..e47b16f 100644 --- a/gcc/ada/libgnat/s-pack66.ads +++ b/gcc/ada/libgnat/s-pack66.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack67.adb b/gcc/ada/libgnat/s-pack67.adb index c7ec770..63be31c 100644 --- a/gcc/ada/libgnat/s-pack67.adb +++ b/gcc/ada/libgnat/s-pack67.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack67.ads b/gcc/ada/libgnat/s-pack67.ads index 33ecc80..3cfcb3b 100644 --- a/gcc/ada/libgnat/s-pack67.ads +++ b/gcc/ada/libgnat/s-pack67.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack68.adb b/gcc/ada/libgnat/s-pack68.adb index d0180ab..8aff8fd 100644 --- a/gcc/ada/libgnat/s-pack68.adb +++ b/gcc/ada/libgnat/s-pack68.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack68.ads b/gcc/ada/libgnat/s-pack68.ads index 62eeb61..9d53114 100644 --- a/gcc/ada/libgnat/s-pack68.ads +++ b/gcc/ada/libgnat/s-pack68.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack69.adb b/gcc/ada/libgnat/s-pack69.adb index 3342385..7f312b4 100644 --- a/gcc/ada/libgnat/s-pack69.adb +++ b/gcc/ada/libgnat/s-pack69.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack69.ads b/gcc/ada/libgnat/s-pack69.ads index 5819f20..5264590 100644 --- a/gcc/ada/libgnat/s-pack69.ads +++ b/gcc/ada/libgnat/s-pack69.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack70.adb b/gcc/ada/libgnat/s-pack70.adb index 6071a50..15eb839 100644 --- a/gcc/ada/libgnat/s-pack70.adb +++ b/gcc/ada/libgnat/s-pack70.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack70.ads b/gcc/ada/libgnat/s-pack70.ads index d6cfed9..09cb451 100644 --- a/gcc/ada/libgnat/s-pack70.ads +++ b/gcc/ada/libgnat/s-pack70.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack71.adb b/gcc/ada/libgnat/s-pack71.adb index 017d584..207efc4 100644 --- a/gcc/ada/libgnat/s-pack71.adb +++ b/gcc/ada/libgnat/s-pack71.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack71.ads b/gcc/ada/libgnat/s-pack71.ads index 89147c4..015ad51 100644 --- a/gcc/ada/libgnat/s-pack71.ads +++ b/gcc/ada/libgnat/s-pack71.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack72.adb b/gcc/ada/libgnat/s-pack72.adb index 1d60757..2c15ecc 100644 --- a/gcc/ada/libgnat/s-pack72.adb +++ b/gcc/ada/libgnat/s-pack72.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack72.ads b/gcc/ada/libgnat/s-pack72.ads index a5f47e3..65933f8 100644 --- a/gcc/ada/libgnat/s-pack72.ads +++ b/gcc/ada/libgnat/s-pack72.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack73.adb b/gcc/ada/libgnat/s-pack73.adb index 46e9c63..d679624 100644 --- a/gcc/ada/libgnat/s-pack73.adb +++ b/gcc/ada/libgnat/s-pack73.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack73.ads b/gcc/ada/libgnat/s-pack73.ads index a5fb008..ec72850 100644 --- a/gcc/ada/libgnat/s-pack73.ads +++ b/gcc/ada/libgnat/s-pack73.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack74.adb b/gcc/ada/libgnat/s-pack74.adb index 4973866..bf89cf7 100644 --- a/gcc/ada/libgnat/s-pack74.adb +++ b/gcc/ada/libgnat/s-pack74.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack74.ads b/gcc/ada/libgnat/s-pack74.ads index 55c394f..75fdf20 100644 --- a/gcc/ada/libgnat/s-pack74.ads +++ b/gcc/ada/libgnat/s-pack74.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack75.adb b/gcc/ada/libgnat/s-pack75.adb index e6b6467..da24172 100644 --- a/gcc/ada/libgnat/s-pack75.adb +++ b/gcc/ada/libgnat/s-pack75.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack75.ads b/gcc/ada/libgnat/s-pack75.ads index 97249ec..ce472dc 100644 --- a/gcc/ada/libgnat/s-pack75.ads +++ b/gcc/ada/libgnat/s-pack75.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack76.adb b/gcc/ada/libgnat/s-pack76.adb index b94586a..e37e0a6 100644 --- a/gcc/ada/libgnat/s-pack76.adb +++ b/gcc/ada/libgnat/s-pack76.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack76.ads b/gcc/ada/libgnat/s-pack76.ads index 4cde3f3..074516c 100644 --- a/gcc/ada/libgnat/s-pack76.ads +++ b/gcc/ada/libgnat/s-pack76.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack77.adb b/gcc/ada/libgnat/s-pack77.adb index 6b660ea..a0dfa63 100644 --- a/gcc/ada/libgnat/s-pack77.adb +++ b/gcc/ada/libgnat/s-pack77.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack77.ads b/gcc/ada/libgnat/s-pack77.ads index e5a1277..77d16c8 100644 --- a/gcc/ada/libgnat/s-pack77.ads +++ b/gcc/ada/libgnat/s-pack77.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack78.adb b/gcc/ada/libgnat/s-pack78.adb index 03f6fbd..c83bd10 100644 --- a/gcc/ada/libgnat/s-pack78.adb +++ b/gcc/ada/libgnat/s-pack78.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack78.ads b/gcc/ada/libgnat/s-pack78.ads index 564f5c8..bd2d975 100644 --- a/gcc/ada/libgnat/s-pack78.ads +++ b/gcc/ada/libgnat/s-pack78.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack79.adb b/gcc/ada/libgnat/s-pack79.adb index d2eecb2..f6359f5 100644 --- a/gcc/ada/libgnat/s-pack79.adb +++ b/gcc/ada/libgnat/s-pack79.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack79.ads b/gcc/ada/libgnat/s-pack79.ads index 909e992..8ba6ec2 100644 --- a/gcc/ada/libgnat/s-pack79.ads +++ b/gcc/ada/libgnat/s-pack79.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack80.adb b/gcc/ada/libgnat/s-pack80.adb index f5d98d0..7bf99fa 100644 --- a/gcc/ada/libgnat/s-pack80.adb +++ b/gcc/ada/libgnat/s-pack80.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack80.ads b/gcc/ada/libgnat/s-pack80.ads index 5021045..8b0270b 100644 --- a/gcc/ada/libgnat/s-pack80.ads +++ b/gcc/ada/libgnat/s-pack80.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack81.adb b/gcc/ada/libgnat/s-pack81.adb index 8c564d8..34aabd4 100644 --- a/gcc/ada/libgnat/s-pack81.adb +++ b/gcc/ada/libgnat/s-pack81.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack81.ads b/gcc/ada/libgnat/s-pack81.ads index 03009c3..890b582 100644 --- a/gcc/ada/libgnat/s-pack81.ads +++ b/gcc/ada/libgnat/s-pack81.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack82.adb b/gcc/ada/libgnat/s-pack82.adb index 21180b7..f8b0229 100644 --- a/gcc/ada/libgnat/s-pack82.adb +++ b/gcc/ada/libgnat/s-pack82.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack82.ads b/gcc/ada/libgnat/s-pack82.ads index 445035d..40ebbc5 100644 --- a/gcc/ada/libgnat/s-pack82.ads +++ b/gcc/ada/libgnat/s-pack82.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack83.adb b/gcc/ada/libgnat/s-pack83.adb index fdea99e..c36166a 100644 --- a/gcc/ada/libgnat/s-pack83.adb +++ b/gcc/ada/libgnat/s-pack83.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack83.ads b/gcc/ada/libgnat/s-pack83.ads index dfb4887..5f3c629 100644 --- a/gcc/ada/libgnat/s-pack83.ads +++ b/gcc/ada/libgnat/s-pack83.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack84.adb b/gcc/ada/libgnat/s-pack84.adb index c72b08e..27502b1 100644 --- a/gcc/ada/libgnat/s-pack84.adb +++ b/gcc/ada/libgnat/s-pack84.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack84.ads b/gcc/ada/libgnat/s-pack84.ads index 77c9c95..ebf7d01 100644 --- a/gcc/ada/libgnat/s-pack84.ads +++ b/gcc/ada/libgnat/s-pack84.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack85.adb b/gcc/ada/libgnat/s-pack85.adb index be9a18c..5f41e78 100644 --- a/gcc/ada/libgnat/s-pack85.adb +++ b/gcc/ada/libgnat/s-pack85.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack85.ads b/gcc/ada/libgnat/s-pack85.ads index 5f516d0..3af83fa 100644 --- a/gcc/ada/libgnat/s-pack85.ads +++ b/gcc/ada/libgnat/s-pack85.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack86.adb b/gcc/ada/libgnat/s-pack86.adb index 1b64c7c..57355e5 100644 --- a/gcc/ada/libgnat/s-pack86.adb +++ b/gcc/ada/libgnat/s-pack86.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack86.ads b/gcc/ada/libgnat/s-pack86.ads index def41d3..f71f503 100644 --- a/gcc/ada/libgnat/s-pack86.ads +++ b/gcc/ada/libgnat/s-pack86.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack87.adb b/gcc/ada/libgnat/s-pack87.adb index 4cc3b61f..714e520 100644 --- a/gcc/ada/libgnat/s-pack87.adb +++ b/gcc/ada/libgnat/s-pack87.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack87.ads b/gcc/ada/libgnat/s-pack87.ads index 6c0b83c..0b7cbf9 100644 --- a/gcc/ada/libgnat/s-pack87.ads +++ b/gcc/ada/libgnat/s-pack87.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack88.adb b/gcc/ada/libgnat/s-pack88.adb index a51bd48..21667dc 100644 --- a/gcc/ada/libgnat/s-pack88.adb +++ b/gcc/ada/libgnat/s-pack88.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack88.ads b/gcc/ada/libgnat/s-pack88.ads index f03323b..d06af16 100644 --- a/gcc/ada/libgnat/s-pack88.ads +++ b/gcc/ada/libgnat/s-pack88.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack89.adb b/gcc/ada/libgnat/s-pack89.adb index d2bc53d..61216a1 100644 --- a/gcc/ada/libgnat/s-pack89.adb +++ b/gcc/ada/libgnat/s-pack89.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack89.ads b/gcc/ada/libgnat/s-pack89.ads index bdc668b..26ffdc5 100644 --- a/gcc/ada/libgnat/s-pack89.ads +++ b/gcc/ada/libgnat/s-pack89.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack90.adb b/gcc/ada/libgnat/s-pack90.adb index 19ec737..603f168 100644 --- a/gcc/ada/libgnat/s-pack90.adb +++ b/gcc/ada/libgnat/s-pack90.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack90.ads b/gcc/ada/libgnat/s-pack90.ads index bbabf19..f7bafe7 100644 --- a/gcc/ada/libgnat/s-pack90.ads +++ b/gcc/ada/libgnat/s-pack90.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack91.adb b/gcc/ada/libgnat/s-pack91.adb index fe20def..106ffb3 100644 --- a/gcc/ada/libgnat/s-pack91.adb +++ b/gcc/ada/libgnat/s-pack91.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack91.ads b/gcc/ada/libgnat/s-pack91.ads index b35d96c..13bfeb1 100644 --- a/gcc/ada/libgnat/s-pack91.ads +++ b/gcc/ada/libgnat/s-pack91.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack92.adb b/gcc/ada/libgnat/s-pack92.adb index 147d628..d49a6fb 100644 --- a/gcc/ada/libgnat/s-pack92.adb +++ b/gcc/ada/libgnat/s-pack92.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack92.ads b/gcc/ada/libgnat/s-pack92.ads index 22424db..cda9136 100644 --- a/gcc/ada/libgnat/s-pack92.ads +++ b/gcc/ada/libgnat/s-pack92.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack93.adb b/gcc/ada/libgnat/s-pack93.adb index 8db201a..cdf9fa0 100644 --- a/gcc/ada/libgnat/s-pack93.adb +++ b/gcc/ada/libgnat/s-pack93.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack93.ads b/gcc/ada/libgnat/s-pack93.ads index eb4359e..7153b6d 100644 --- a/gcc/ada/libgnat/s-pack93.ads +++ b/gcc/ada/libgnat/s-pack93.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack94.adb b/gcc/ada/libgnat/s-pack94.adb index 53c9f89..df4ebca 100644 --- a/gcc/ada/libgnat/s-pack94.adb +++ b/gcc/ada/libgnat/s-pack94.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack94.ads b/gcc/ada/libgnat/s-pack94.ads index 01efbca..737d2b7 100644 --- a/gcc/ada/libgnat/s-pack94.ads +++ b/gcc/ada/libgnat/s-pack94.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack95.adb b/gcc/ada/libgnat/s-pack95.adb index 1179506..865ec23a 100644 --- a/gcc/ada/libgnat/s-pack95.adb +++ b/gcc/ada/libgnat/s-pack95.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack95.ads b/gcc/ada/libgnat/s-pack95.ads index 38d54b8..87422f3 100644 --- a/gcc/ada/libgnat/s-pack95.ads +++ b/gcc/ada/libgnat/s-pack95.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack96.adb b/gcc/ada/libgnat/s-pack96.adb index 617a91f..115fb17 100644 --- a/gcc/ada/libgnat/s-pack96.adb +++ b/gcc/ada/libgnat/s-pack96.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack96.ads b/gcc/ada/libgnat/s-pack96.ads index d19b65b..388a6cd 100644 --- a/gcc/ada/libgnat/s-pack96.ads +++ b/gcc/ada/libgnat/s-pack96.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack97.adb b/gcc/ada/libgnat/s-pack97.adb index b7ddb81..adaeea8 100644 --- a/gcc/ada/libgnat/s-pack97.adb +++ b/gcc/ada/libgnat/s-pack97.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack97.ads b/gcc/ada/libgnat/s-pack97.ads index c04ecbc..e70a6cf 100644 --- a/gcc/ada/libgnat/s-pack97.ads +++ b/gcc/ada/libgnat/s-pack97.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack98.adb b/gcc/ada/libgnat/s-pack98.adb index 2c3def5..bac1e54 100644 --- a/gcc/ada/libgnat/s-pack98.adb +++ b/gcc/ada/libgnat/s-pack98.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack98.ads b/gcc/ada/libgnat/s-pack98.ads index 23e08ed..fdb4b7f 100644 --- a/gcc/ada/libgnat/s-pack98.ads +++ b/gcc/ada/libgnat/s-pack98.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack99.adb b/gcc/ada/libgnat/s-pack99.adb index 26485cf..c9f84ec 100644 --- a/gcc/ada/libgnat/s-pack99.adb +++ b/gcc/ada/libgnat/s-pack99.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pack99.ads b/gcc/ada/libgnat/s-pack99.ads index 4f49623..73c2abe 100644 --- a/gcc/ada/libgnat/s-pack99.ads +++ b/gcc/ada/libgnat/s-pack99.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-parame.adb b/gcc/ada/libgnat/s-parame.adb index 09a65ee..1204cad 100644 --- a/gcc/ada/libgnat/s-parame.adb +++ b/gcc/ada/libgnat/s-parame.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,8 +31,6 @@ -- This is the default (used on all native platforms) version of this package -pragma Compiler_Unit_Warning; - package body System.Parameters is ------------------------- diff --git a/gcc/ada/libgnat/s-parame.ads b/gcc/ada/libgnat/s-parame.ads index 0f76a65..4b81114 100644 --- a/gcc/ada/libgnat/s-parame.ads +++ b/gcc/ada/libgnat/s-parame.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -46,8 +46,6 @@ -- Note: do not introduce any pragma Inline statements into this unit, since -- otherwise the relinking and rebinding capability would be deactivated. -pragma Compiler_Unit_Warning; - package System.Parameters is pragma Pure; diff --git a/gcc/ada/libgnat/s-parame__hpux.ads b/gcc/ada/libgnat/s-parame__hpux.ads index d6d4e10..dbf05ea 100644 --- a/gcc/ada/libgnat/s-parame__hpux.ads +++ b/gcc/ada/libgnat/s-parame__hpux.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-parame__posix2008.ads b/gcc/ada/libgnat/s-parame__posix2008.ads index af299ec..d221b27 100644 --- a/gcc/ada/libgnat/s-parame__posix2008.ads +++ b/gcc/ada/libgnat/s-parame__posix2008.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -46,8 +46,6 @@ -- Note: do not introduce any pragma Inline statements into this unit, since -- otherwise the relinking and rebinding capability would be deactivated. -pragma Compiler_Unit_Warning; - package System.Parameters is pragma Pure; diff --git a/gcc/ada/libgnat/s-parame__rtems.adb b/gcc/ada/libgnat/s-parame__rtems.adb index ae88a2c..1aab36e 100644 --- a/gcc/ada/libgnat/s-parame__rtems.adb +++ b/gcc/ada/libgnat/s-parame__rtems.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-parame__vxworks.adb b/gcc/ada/libgnat/s-parame__vxworks.adb index 45ee0a9..4b46906 100644 --- a/gcc/ada/libgnat/s-parame__vxworks.adb +++ b/gcc/ada/libgnat/s-parame__vxworks.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-parame__vxworks.ads b/gcc/ada/libgnat/s-parame__vxworks.ads index b22d858..1343d67 100644 --- a/gcc/ada/libgnat/s-parame__vxworks.ads +++ b/gcc/ada/libgnat/s-parame__vxworks.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-parint.adb b/gcc/ada/libgnat/s-parint.adb index 24e8d1b..357f94a 100644 --- a/gcc/ada/libgnat/s-parint.adb +++ b/gcc/ada/libgnat/s-parint.adb @@ -7,7 +7,7 @@ -- B o d y -- -- (Dummy body for non-distributed case) -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-parint.ads b/gcc/ada/libgnat/s-parint.ads index f311a09..8f3aefd 100644 --- a/gcc/ada/libgnat/s-parint.ads +++ b/gcc/ada/libgnat/s-parint.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pehage.adb b/gcc/ada/libgnat/s-pehage.adb index 218c1cb..1468628 100644 --- a/gcc/ada/libgnat/s-pehage.adb +++ b/gcc/ada/libgnat/s-pehage.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1233,7 +1233,7 @@ package body System.Perfect_Hash_Generators is ------------ procedure Insert (Value : String) is - Len : constant Natural := Value'Length; + Len : constant Natural := Value'Length; begin if Verbose then diff --git a/gcc/ada/libgnat/s-pehage.ads b/gcc/ada/libgnat/s-pehage.ads index f8b8129..ba75b94 100644 --- a/gcc/ada/libgnat/s-pehage.ads +++ b/gcc/ada/libgnat/s-pehage.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, AdaCore -- +-- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -64,8 +64,6 @@ -- < h (w2). These hashing functions are convenient for use with realtime -- applications. -pragma Compiler_Unit_Warning; - package System.Perfect_Hash_Generators is type Optimization is (Memory_Space, CPU_Time); diff --git a/gcc/ada/libgnat/s-pooglo.adb b/gcc/ada/libgnat/s-pooglo.adb index b957eff..2b07ae4 100644 --- a/gcc/ada/libgnat/s-pooglo.adb +++ b/gcc/ada/libgnat/s-pooglo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pooglo.ads b/gcc/ada/libgnat/s-pooglo.ads index 67518c2..d988efa 100644 --- a/gcc/ada/libgnat/s-pooglo.ads +++ b/gcc/ada/libgnat/s-pooglo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,7 +32,6 @@ -- Storage pool corresponding to default global storage pool used for types -- for which no storage pool is specified. -with System; with System.Storage_Pools; with System.Storage_Elements; diff --git a/gcc/ada/libgnat/s-pooloc.adb b/gcc/ada/libgnat/s-pooloc.adb index 5592348..581bcca 100644 --- a/gcc/ada/libgnat/s-pooloc.adb +++ b/gcc/ada/libgnat/s-pooloc.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-pooloc.ads b/gcc/ada/libgnat/s-pooloc.ads index 6e33260..3c5da58 100644 --- a/gcc/ada/libgnat/s-pooloc.ads +++ b/gcc/ada/libgnat/s-pooloc.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-poosiz.adb b/gcc/ada/libgnat/s-poosiz.adb index fd984bb..ac0eee9 100644 --- a/gcc/ada/libgnat/s-poosiz.adb +++ b/gcc/ada/libgnat/s-poosiz.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-poosiz.ads b/gcc/ada/libgnat/s-poosiz.ads index f52593f..d9f0ff7 100644 --- a/gcc/ada/libgnat/s-poosiz.ads +++ b/gcc/ada/libgnat/s-poosiz.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-powflt.ads b/gcc/ada/libgnat/s-powflt.ads index 0967403..bf5d66f 100644 --- a/gcc/ada/libgnat/s-powflt.ads +++ b/gcc/ada/libgnat/s-powflt.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -42,26 +42,26 @@ package System.Powten_Flt is -- Largest power of ten exactly representable with a double Float Powten : constant array (0 .. Maxpow, 1 .. 2) of Float := - (00 => (1.0E+00, 0.0), - 01 => (1.0E+01, 0.0), - 02 => (1.0E+02, 0.0), - 03 => (1.0E+03, 0.0), - 04 => (1.0E+04, 0.0), - 05 => (1.0E+05, 0.0), - 06 => (1.0E+06, 0.0), - 07 => (1.0E+07, 0.0), - 08 => (1.0E+08, 0.0), - 09 => (1.0E+09, 0.0), - 10 => (1.0E+10, 0.0), - 11 => (1.0E+11, 1.0E+11 - Float'Machine (1.0E+11)), - 12 => (1.0E+12, 1.0E+12 - Float'Machine (1.0E+12)), - 13 => (1.0E+13, 1.0E+13 - Float'Machine (1.0E+13)), - 14 => (1.0E+14, 1.0E+14 - Float'Machine (1.0E+14)), - 15 => (1.0E+15, 1.0E+15 - Float'Machine (1.0E+15)), - 16 => (1.0E+16, 1.0E+16 - Float'Machine (1.0E+16)), - 17 => (1.0E+17, 1.0E+17 - Float'Machine (1.0E+17)), - 18 => (1.0E+18, 1.0E+18 - Float'Machine (1.0E+18)), - 19 => (1.0E+19, 1.0E+19 - Float'Machine (1.0E+19)), - 20 => (1.0E+20, 1.0E+20 - Float'Machine (1.0E+20))); + [00 => [1.0E+00, 0.0], + 01 => [1.0E+01, 0.0], + 02 => [1.0E+02, 0.0], + 03 => [1.0E+03, 0.0], + 04 => [1.0E+04, 0.0], + 05 => [1.0E+05, 0.0], + 06 => [1.0E+06, 0.0], + 07 => [1.0E+07, 0.0], + 08 => [1.0E+08, 0.0], + 09 => [1.0E+09, 0.0], + 10 => [1.0E+10, 0.0], + 11 => [1.0E+11, 1.0E+11 - Float'Machine (1.0E+11)], + 12 => [1.0E+12, 1.0E+12 - Float'Machine (1.0E+12)], + 13 => [1.0E+13, 1.0E+13 - Float'Machine (1.0E+13)], + 14 => [1.0E+14, 1.0E+14 - Float'Machine (1.0E+14)], + 15 => [1.0E+15, 1.0E+15 - Float'Machine (1.0E+15)], + 16 => [1.0E+16, 1.0E+16 - Float'Machine (1.0E+16)], + 17 => [1.0E+17, 1.0E+17 - Float'Machine (1.0E+17)], + 18 => [1.0E+18, 1.0E+18 - Float'Machine (1.0E+18)], + 19 => [1.0E+19, 1.0E+19 - Float'Machine (1.0E+19)], + 20 => [1.0E+20, 1.0E+20 - Float'Machine (1.0E+20)]]; end System.Powten_Flt; diff --git a/gcc/ada/libgnat/s-powlfl.ads b/gcc/ada/libgnat/s-powlfl.ads index 7800f2f..a8612db 100644 --- a/gcc/ada/libgnat/s-powlfl.ads +++ b/gcc/ada/libgnat/s-powlfl.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -42,50 +42,50 @@ package System.Powten_LFlt is -- Largest power of ten exactly representable with a double Long_Float Powten : constant array (0 .. Maxpow, 1 .. 2) of Long_Float := - (00 => (1.0E+00, 0.0), - 01 => (1.0E+01, 0.0), - 02 => (1.0E+02, 0.0), - 03 => (1.0E+03, 0.0), - 04 => (1.0E+04, 0.0), - 05 => (1.0E+05, 0.0), - 06 => (1.0E+06, 0.0), - 07 => (1.0E+07, 0.0), - 08 => (1.0E+08, 0.0), - 09 => (1.0E+09, 0.0), - 10 => (1.0E+10, 0.0), - 11 => (1.0E+11, 0.0), - 12 => (1.0E+12, 0.0), - 13 => (1.0E+13, 0.0), - 14 => (1.0E+14, 0.0), - 15 => (1.0E+15, 0.0), - 16 => (1.0E+16, 0.0), - 17 => (1.0E+17, 0.0), - 18 => (1.0E+18, 0.0), - 19 => (1.0E+19, 0.0), - 20 => (1.0E+20, 0.0), - 21 => (1.0E+21, 0.0), - 22 => (1.0E+22, 0.0), - 23 => (1.0E+23, 1.0E+23 - Long_Float'Machine (1.0E+23)), - 24 => (1.0E+24, 1.0E+24 - Long_Float'Machine (1.0E+24)), - 25 => (1.0E+25, 1.0E+25 - Long_Float'Machine (1.0E+25)), - 26 => (1.0E+26, 1.0E+26 - Long_Float'Machine (1.0E+26)), - 27 => (1.0E+27, 1.0E+27 - Long_Float'Machine (1.0E+27)), - 28 => (1.0E+28, 1.0E+28 - Long_Float'Machine (1.0E+28)), - 29 => (1.0E+29, 1.0E+29 - Long_Float'Machine (1.0E+29)), - 30 => (1.0E+30, 1.0E+30 - Long_Float'Machine (1.0E+30)), - 31 => (1.0E+31, 1.0E+31 - Long_Float'Machine (1.0E+31)), - 32 => (1.0E+32, 1.0E+32 - Long_Float'Machine (1.0E+32)), - 33 => (1.0E+33, 1.0E+33 - Long_Float'Machine (1.0E+33)), - 34 => (1.0E+34, 1.0E+34 - Long_Float'Machine (1.0E+34)), - 35 => (1.0E+35, 1.0E+35 - Long_Float'Machine (1.0E+35)), - 36 => (1.0E+36, 1.0E+36 - Long_Float'Machine (1.0E+36)), - 37 => (1.0E+37, 1.0E+37 - Long_Float'Machine (1.0E+37)), - 38 => (1.0E+38, 1.0E+38 - Long_Float'Machine (1.0E+38)), - 39 => (1.0E+39, 1.0E+39 - Long_Float'Machine (1.0E+39)), - 40 => (1.0E+40, 1.0E+40 - Long_Float'Machine (1.0E+40)), - 41 => (1.0E+41, 1.0E+41 - Long_Float'Machine (1.0E+41)), - 42 => (1.0E+42, 1.0E+42 - Long_Float'Machine (1.0E+42)), - 43 => (1.0E+43, 1.0E+43 - Long_Float'Machine (1.0E+43)), - 44 => (1.0E+44, 1.0E+44 - Long_Float'Machine (1.0E+44))); + [00 => [1.0E+00, 0.0], + 01 => [1.0E+01, 0.0], + 02 => [1.0E+02, 0.0], + 03 => [1.0E+03, 0.0], + 04 => [1.0E+04, 0.0], + 05 => [1.0E+05, 0.0], + 06 => [1.0E+06, 0.0], + 07 => [1.0E+07, 0.0], + 08 => [1.0E+08, 0.0], + 09 => [1.0E+09, 0.0], + 10 => [1.0E+10, 0.0], + 11 => [1.0E+11, 0.0], + 12 => [1.0E+12, 0.0], + 13 => [1.0E+13, 0.0], + 14 => [1.0E+14, 0.0], + 15 => [1.0E+15, 0.0], + 16 => [1.0E+16, 0.0], + 17 => [1.0E+17, 0.0], + 18 => [1.0E+18, 0.0], + 19 => [1.0E+19, 0.0], + 20 => [1.0E+20, 0.0], + 21 => [1.0E+21, 0.0], + 22 => [1.0E+22, 0.0], + 23 => [1.0E+23, 1.0E+23 - Long_Float'Machine (1.0E+23)], + 24 => [1.0E+24, 1.0E+24 - Long_Float'Machine (1.0E+24)], + 25 => [1.0E+25, 1.0E+25 - Long_Float'Machine (1.0E+25)], + 26 => [1.0E+26, 1.0E+26 - Long_Float'Machine (1.0E+26)], + 27 => [1.0E+27, 1.0E+27 - Long_Float'Machine (1.0E+27)], + 28 => [1.0E+28, 1.0E+28 - Long_Float'Machine (1.0E+28)], + 29 => [1.0E+29, 1.0E+29 - Long_Float'Machine (1.0E+29)], + 30 => [1.0E+30, 1.0E+30 - Long_Float'Machine (1.0E+30)], + 31 => [1.0E+31, 1.0E+31 - Long_Float'Machine (1.0E+31)], + 32 => [1.0E+32, 1.0E+32 - Long_Float'Machine (1.0E+32)], + 33 => [1.0E+33, 1.0E+33 - Long_Float'Machine (1.0E+33)], + 34 => [1.0E+34, 1.0E+34 - Long_Float'Machine (1.0E+34)], + 35 => [1.0E+35, 1.0E+35 - Long_Float'Machine (1.0E+35)], + 36 => [1.0E+36, 1.0E+36 - Long_Float'Machine (1.0E+36)], + 37 => [1.0E+37, 1.0E+37 - Long_Float'Machine (1.0E+37)], + 38 => [1.0E+38, 1.0E+38 - Long_Float'Machine (1.0E+38)], + 39 => [1.0E+39, 1.0E+39 - Long_Float'Machine (1.0E+39)], + 40 => [1.0E+40, 1.0E+40 - Long_Float'Machine (1.0E+40)], + 41 => [1.0E+41, 1.0E+41 - Long_Float'Machine (1.0E+41)], + 42 => [1.0E+42, 1.0E+42 - Long_Float'Machine (1.0E+42)], + 43 => [1.0E+43, 1.0E+43 - Long_Float'Machine (1.0E+43)], + 44 => [1.0E+44, 1.0E+44 - Long_Float'Machine (1.0E+44)]]; end System.Powten_LFlt; diff --git a/gcc/ada/libgnat/s-powllf.ads b/gcc/ada/libgnat/s-powllf.ads index b1f8ae9..0640ea4 100644 --- a/gcc/ada/libgnat/s-powllf.ads +++ b/gcc/ada/libgnat/s-powllf.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -44,60 +44,60 @@ package System.Powten_LLF is -- Largest power of ten exactly representable with a double Long_Long_Float Powten : constant array (0 .. 54, 1 .. 2) of Long_Long_Float := - (00 => (1.0E+00, 0.0), - 01 => (1.0E+01, 0.0), - 02 => (1.0E+02, 0.0), - 03 => (1.0E+03, 0.0), - 04 => (1.0E+04, 0.0), - 05 => (1.0E+05, 0.0), - 06 => (1.0E+06, 0.0), - 07 => (1.0E+07, 0.0), - 08 => (1.0E+08, 0.0), - 09 => (1.0E+09, 0.0), - 10 => (1.0E+10, 0.0), - 11 => (1.0E+11, 0.0), - 12 => (1.0E+12, 0.0), - 13 => (1.0E+13, 0.0), - 14 => (1.0E+14, 0.0), - 15 => (1.0E+15, 0.0), - 16 => (1.0E+16, 0.0), - 17 => (1.0E+17, 0.0), - 18 => (1.0E+18, 0.0), - 19 => (1.0E+19, 0.0), - 20 => (1.0E+20, 0.0), - 21 => (1.0E+21, 0.0), - 22 => (1.0E+22, 0.0), - 23 => (1.0E+23, 1.0E+23 - Long_Long_Float'Machine (1.0E+23)), - 24 => (1.0E+24, 1.0E+24 - Long_Long_Float'Machine (1.0E+24)), - 25 => (1.0E+25, 1.0E+25 - Long_Long_Float'Machine (1.0E+25)), - 26 => (1.0E+26, 1.0E+26 - Long_Long_Float'Machine (1.0E+26)), - 27 => (1.0E+27, 1.0E+27 - Long_Long_Float'Machine (1.0E+27)), - 28 => (1.0E+28, 1.0E+28 - Long_Long_Float'Machine (1.0E+28)), - 29 => (1.0E+29, 1.0E+29 - Long_Long_Float'Machine (1.0E+29)), - 30 => (1.0E+30, 1.0E+30 - Long_Long_Float'Machine (1.0E+30)), - 31 => (1.0E+31, 1.0E+31 - Long_Long_Float'Machine (1.0E+31)), - 32 => (1.0E+32, 1.0E+32 - Long_Long_Float'Machine (1.0E+32)), - 33 => (1.0E+33, 1.0E+33 - Long_Long_Float'Machine (1.0E+33)), - 34 => (1.0E+34, 1.0E+34 - Long_Long_Float'Machine (1.0E+34)), - 35 => (1.0E+35, 1.0E+35 - Long_Long_Float'Machine (1.0E+35)), - 36 => (1.0E+36, 1.0E+36 - Long_Long_Float'Machine (1.0E+36)), - 37 => (1.0E+37, 1.0E+37 - Long_Long_Float'Machine (1.0E+37)), - 38 => (1.0E+38, 1.0E+38 - Long_Long_Float'Machine (1.0E+38)), - 39 => (1.0E+39, 1.0E+39 - Long_Long_Float'Machine (1.0E+39)), - 40 => (1.0E+40, 1.0E+40 - Long_Long_Float'Machine (1.0E+40)), - 41 => (1.0E+41, 1.0E+41 - Long_Long_Float'Machine (1.0E+41)), - 42 => (1.0E+42, 1.0E+42 - Long_Long_Float'Machine (1.0E+42)), - 43 => (1.0E+43, 1.0E+43 - Long_Long_Float'Machine (1.0E+43)), - 44 => (1.0E+44, 1.0E+44 - Long_Long_Float'Machine (1.0E+44)), - 45 => (1.0E+45, 1.0E+45 - Long_Long_Float'Machine (1.0E+45)), - 46 => (1.0E+46, 1.0E+46 - Long_Long_Float'Machine (1.0E+46)), - 47 => (1.0E+47, 1.0E+47 - Long_Long_Float'Machine (1.0E+47)), - 48 => (1.0E+48, 1.0E+48 - Long_Long_Float'Machine (1.0E+48)), - 49 => (1.0E+49, 1.0E+49 - Long_Long_Float'Machine (1.0E+49)), - 50 => (1.0E+50, 1.0E+50 - Long_Long_Float'Machine (1.0E+50)), - 51 => (1.0E+51, 1.0E+51 - Long_Long_Float'Machine (1.0E+51)), - 52 => (1.0E+52, 1.0E+52 - Long_Long_Float'Machine (1.0E+52)), - 53 => (1.0E+53, 1.0E+53 - Long_Long_Float'Machine (1.0E+53)), - 54 => (1.0E+54, 1.0E+54 - Long_Long_Float'Machine (1.0E+54))); + [00 => [1.0E+00, 0.0], + 01 => [1.0E+01, 0.0], + 02 => [1.0E+02, 0.0], + 03 => [1.0E+03, 0.0], + 04 => [1.0E+04, 0.0], + 05 => [1.0E+05, 0.0], + 06 => [1.0E+06, 0.0], + 07 => [1.0E+07, 0.0], + 08 => [1.0E+08, 0.0], + 09 => [1.0E+09, 0.0], + 10 => [1.0E+10, 0.0], + 11 => [1.0E+11, 0.0], + 12 => [1.0E+12, 0.0], + 13 => [1.0E+13, 0.0], + 14 => [1.0E+14, 0.0], + 15 => [1.0E+15, 0.0], + 16 => [1.0E+16, 0.0], + 17 => [1.0E+17, 0.0], + 18 => [1.0E+18, 0.0], + 19 => [1.0E+19, 0.0], + 20 => [1.0E+20, 0.0], + 21 => [1.0E+21, 0.0], + 22 => [1.0E+22, 0.0], + 23 => [1.0E+23, 1.0E+23 - Long_Long_Float'Machine (1.0E+23)], + 24 => [1.0E+24, 1.0E+24 - Long_Long_Float'Machine (1.0E+24)], + 25 => [1.0E+25, 1.0E+25 - Long_Long_Float'Machine (1.0E+25)], + 26 => [1.0E+26, 1.0E+26 - Long_Long_Float'Machine (1.0E+26)], + 27 => [1.0E+27, 1.0E+27 - Long_Long_Float'Machine (1.0E+27)], + 28 => [1.0E+28, 1.0E+28 - Long_Long_Float'Machine (1.0E+28)], + 29 => [1.0E+29, 1.0E+29 - Long_Long_Float'Machine (1.0E+29)], + 30 => [1.0E+30, 1.0E+30 - Long_Long_Float'Machine (1.0E+30)], + 31 => [1.0E+31, 1.0E+31 - Long_Long_Float'Machine (1.0E+31)], + 32 => [1.0E+32, 1.0E+32 - Long_Long_Float'Machine (1.0E+32)], + 33 => [1.0E+33, 1.0E+33 - Long_Long_Float'Machine (1.0E+33)], + 34 => [1.0E+34, 1.0E+34 - Long_Long_Float'Machine (1.0E+34)], + 35 => [1.0E+35, 1.0E+35 - Long_Long_Float'Machine (1.0E+35)], + 36 => [1.0E+36, 1.0E+36 - Long_Long_Float'Machine (1.0E+36)], + 37 => [1.0E+37, 1.0E+37 - Long_Long_Float'Machine (1.0E+37)], + 38 => [1.0E+38, 1.0E+38 - Long_Long_Float'Machine (1.0E+38)], + 39 => [1.0E+39, 1.0E+39 - Long_Long_Float'Machine (1.0E+39)], + 40 => [1.0E+40, 1.0E+40 - Long_Long_Float'Machine (1.0E+40)], + 41 => [1.0E+41, 1.0E+41 - Long_Long_Float'Machine (1.0E+41)], + 42 => [1.0E+42, 1.0E+42 - Long_Long_Float'Machine (1.0E+42)], + 43 => [1.0E+43, 1.0E+43 - Long_Long_Float'Machine (1.0E+43)], + 44 => [1.0E+44, 1.0E+44 - Long_Long_Float'Machine (1.0E+44)], + 45 => [1.0E+45, 1.0E+45 - Long_Long_Float'Machine (1.0E+45)], + 46 => [1.0E+46, 1.0E+46 - Long_Long_Float'Machine (1.0E+46)], + 47 => [1.0E+47, 1.0E+47 - Long_Long_Float'Machine (1.0E+47)], + 48 => [1.0E+48, 1.0E+48 - Long_Long_Float'Machine (1.0E+48)], + 49 => [1.0E+49, 1.0E+49 - Long_Long_Float'Machine (1.0E+49)], + 50 => [1.0E+50, 1.0E+50 - Long_Long_Float'Machine (1.0E+50)], + 51 => [1.0E+51, 1.0E+51 - Long_Long_Float'Machine (1.0E+51)], + 52 => [1.0E+52, 1.0E+52 - Long_Long_Float'Machine (1.0E+52)], + 53 => [1.0E+53, 1.0E+53 - Long_Long_Float'Machine (1.0E+53)], + 54 => [1.0E+54, 1.0E+54 - Long_Long_Float'Machine (1.0E+54)]]; end System.Powten_LLF; diff --git a/gcc/ada/libgnat/s-purexc.ads b/gcc/ada/libgnat/s-purexc.ads index 6346f4f..cfff560 100644 --- a/gcc/ada/libgnat/s-purexc.ads +++ b/gcc/ada/libgnat/s-purexc.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -33,8 +33,6 @@ -- an exception message. It can be used from Pure units. This unit is for -- internal use only, it is not generally available to applications. -pragma Compiler_Unit_Warning; - package System.Pure_Exceptions is pragma Pure; diff --git a/gcc/ada/libgnat/s-putima.adb b/gcc/ada/libgnat/s-putima.adb index 33960a4..cc36fce 100644 --- a/gcc/ada/libgnat/s-putima.adb +++ b/gcc/ada/libgnat/s-putima.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-putima.ads b/gcc/ada/libgnat/s-putima.ads index 4a33e79..b51e6a9 100644 --- a/gcc/ada/libgnat/s-putima.ads +++ b/gcc/ada/libgnat/s-putima.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-rannum.adb b/gcc/ada/libgnat/s-rannum.adb index 92a91a6..c89ae96 100644 --- a/gcc/ada/libgnat/s-rannum.adb +++ b/gcc/ada/libgnat/s-rannum.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -109,7 +109,7 @@ is Upper_Mask : constant := 2**31; Matrix_A : constant array (State_Val range 0 .. 1) of State_Val - := (0, 16#9908b0df#); + := [0, 16#9908b0df#]; -- The twist transformation is represented by a matrix of the form -- -- [ 0 I(31) ] @@ -275,16 +275,16 @@ is Trailing_Ones : constant array (Unsigned_32 range 0 .. 15) of Bit_Count := - (2#00000# => 0, 2#00001# => 1, 2#00010# => 0, 2#00011# => 2, + [2#00000# => 0, 2#00001# => 1, 2#00010# => 0, 2#00011# => 2, 2#00100# => 0, 2#00101# => 1, 2#00110# => 0, 2#00111# => 3, 2#01000# => 0, 2#01001# => 1, 2#01010# => 0, 2#01011# => 2, - 2#01100# => 0, 2#01101# => 1, 2#01110# => 0, 2#01111# => 4); + 2#01100# => 0, 2#01101# => 1, 2#01110# => 0, 2#01111# => 4]; Pow_Tab : constant array (Bit_Count range 0 .. 3) of Real - := (0 => 2.0**(0 - T'Machine_Mantissa), + := [0 => 2.0**(0 - T'Machine_Mantissa), 1 => 2.0**(-1 - T'Machine_Mantissa), 2 => 2.0**(-2 - T'Machine_Mantissa), - 3 => 2.0**(-3 - T'Machine_Mantissa)); + 3 => 2.0**(-3 - T'Machine_Mantissa)]; Extra_Bits : constant Natural := (Unsigned'Size - T'Machine_Mantissa + 1); @@ -662,7 +662,7 @@ is Result : Image_String; begin - Result := (others => ' '); + Result := [others => ' ']; for J in Of_State'Range loop Insert_Image (Result, J, Of_State (J)); @@ -675,7 +675,7 @@ is Result : Image_String; begin - Result := (others => ' '); + Result := [others => ' ']; for J in 0 .. N - 1 loop Insert_Image (Result, J, Gen.S ((J + Gen.I) mod N)); end loop; diff --git a/gcc/ada/libgnat/s-rannum.ads b/gcc/ada/libgnat/s-rannum.ads index 99ed57d..4914c02 100644 --- a/gcc/ada/libgnat/s-rannum.ads +++ b/gcc/ada/libgnat/s-rannum.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -157,7 +157,7 @@ private Writable : Writable_Access (Generator'Access); -- This self reference allows functions to modify Generator arguments - S : State := (others => 0); + S : State := [others => 0]; -- The shift register, a circular buffer I : Integer := N; diff --git a/gcc/ada/libgnat/s-ransee.adb b/gcc/ada/libgnat/s-ransee.adb index b12ed0b..eb646e224 100644 --- a/gcc/ada/libgnat/s-ransee.adb +++ b/gcc/ada/libgnat/s-ransee.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-ransee.ads b/gcc/ada/libgnat/s-ransee.ads index 9deef1a..c31bf67 100644 --- a/gcc/ada/libgnat/s-ransee.ads +++ b/gcc/ada/libgnat/s-ransee.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-regexp.adb b/gcc/ada/libgnat/s-regexp.adb index 51ff39c..7a2d9bb 100644 --- a/gcc/ada/libgnat/s-regexp.adb +++ b/gcc/ada/libgnat/s-regexp.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -122,9 +122,9 @@ package body System.Regexp is is S : String := Pattern; -- The pattern which is really compiled (when the pattern is case - -- insensitive, we convert this string to lower-cases + -- insensitive, we convert this string to lower-cases). - Map : Mapping := (others => 0); + Map : Mapping := [others => 0]; -- Mapping between characters and columns in the tables Alphabet_Size : Column_Index := 0; @@ -209,8 +209,59 @@ package body System.Regexp is -- The last occurrence of an opening parenthesis, if Glob=False, -- or the last occurrence of an opening curly brace, if Glob=True. + procedure Find_Close_Bracket; + -- Go through the pattern to find a closing bracket. Raise an + -- exception if none is found. + procedure Raise_Exception_If_No_More_Chars (K : Integer := 0); - -- If no more characters are raised, call Raise_Exception + -- If J + K > S'Last then call Raise_Exception + + ------------------------ + -- Find_Close_Bracket -- + ------------------------ + + procedure Find_Close_Bracket is + Possible_Range_Start : Boolean := True; + -- Set True everywhere a range character '-' can occur + + begin + loop + exit when S (J) = Close_Bracket; + + Raise_Exception_If_No_More_Chars (1); + -- The current character is not a close_bracket, thus it should + -- be followed by at least one more char. If not, no close + -- bracket is present and the pattern is ill-formed. + + if S (J) = '-' and then S (J + 1) /= Close_Bracket then + if not Possible_Range_Start then + Raise_Exception + ("No mix of ranges is allowed in " + & "regular expression", J); + end if; + + J := J + 1; + Raise_Exception_If_No_More_Chars (1); + + Possible_Range_Start := False; + -- Range cannot be followed by '-' character, + -- except as last character in the set. + + else + Possible_Range_Start := True; + end if; + + if S (J) = '\' then + J := J + 1; + Raise_Exception_If_No_More_Chars (1); + -- We ignore the next character and need to check we have + -- one more available character. This is necessary for + -- the erroneous [\] pattern which stands for [\]] or [\\]. + end if; + + J := J + 1; + end loop; + end Find_Close_Bracket; -------------------------------------- -- Raise_Exception_If_No_More_Chars -- @@ -240,63 +291,23 @@ package body System.Regexp is end if; end if; - -- The first character never has a special meaning - + -- Characters ']' and '-' are meant as literals when first + -- in the list. As such, they have no special meaning and + -- we pass them. if S (J) = ']' or else S (J) = '-' then J := J + 1; Raise_Exception_If_No_More_Chars; end if; - -- The set of characters cannot be empty - if S (J) = ']' then + -- ??? This message is misleading since the check forbids + -- the sets []] and [-] but not the empty set []. Raise_Exception ("Set of characters cannot be empty in regular " & "expression", J); end if; - declare - Possible_Range_Start : Boolean := True; - -- Set True everywhere a range character '-' can occur - - begin - loop - exit when S (J) = Close_Bracket; - - -- The current character should be followed by a - -- closing bracket. - - Raise_Exception_If_No_More_Chars (1); - - if S (J) = '-' - and then S (J + 1) /= Close_Bracket - then - if not Possible_Range_Start then - Raise_Exception - ("No mix of ranges is allowed in " - & "regular expression", J); - end if; - - J := J + 1; - Raise_Exception_If_No_More_Chars; - - -- Range cannot be followed by '-' character, - -- except as last character in the set. - - Possible_Range_Start := False; - - else - Possible_Range_Start := True; - end if; - - if S (J) = '\' then - J := J + 1; - Raise_Exception_If_No_More_Chars; - end if; - - J := J + 1; - end loop; - end; + Find_Close_Bracket; -- A closing bracket can end an elmt or term @@ -431,6 +442,9 @@ package body System.Regexp is & "applied to a term in regular expression", J); end if; + -- A second term must follow + Raise_Exception_If_No_More_Chars (K => 1); + Past_Elmt := False; Past_Term := False; end if; @@ -1089,7 +1103,7 @@ package body System.Regexp is -- Start of processing for Create_Primary_Table begin - Table.all := (others => (others => 0)); + Table.all := [others => [others => 0]]; Create_Simple (S'First, S'Last, Start_State, End_State); Num_States := Current_State; end Create_Primary_Table; @@ -1358,7 +1372,7 @@ package body System.Regexp is -- Start of processing for Create_Primary_Table_Glob begin - Table.all := (others => (others => 0)); + Table.all := [others => [others => 0]]; Create_Simple (S'First, S'Last, Start_State, End_State); Num_States := Current_State; end Create_Primary_Table_Glob; @@ -1378,7 +1392,7 @@ package body System.Regexp is pragma Pack (Meta_State); -- Whether a state from first_table belongs to a metastate. - No_States : constant Meta_State := (others => False); + No_States : constant Meta_State := [others => False]; type Meta_States_Array is array (State_Index range <>) of Meta_State; type Meta_States_List is access all Meta_States_Array; @@ -1430,25 +1444,25 @@ package body System.Regexp is if Meta_States = null then Meta_States := new Meta_States_Array (1 .. State_Index'Max (Last_Index, Meta) + 1); - Meta_States (Meta_States'Range) := (others => No_States); + Meta_States (Meta_States'Range) := [others => No_States]; Table := new Meta_States_Transition_Arr (1 .. State_Index'Max (Last_Index, Meta) + 1); - Table.all := (others => (others => 0)); + Table.all := [others => [others => 0]]; elsif Meta > Meta_States'Last then Meta_States := new Meta_States_Array (1 .. State_Index'Max (2 * Tmp'Last, Meta)); Meta_States (Tmp'Range) := Tmp.all; Meta_States (Tmp'Last + 1 .. Meta_States'Last) := - (others => No_States); + [others => No_States]; Unchecked_Free (Tmp); Table := new Meta_States_Transition_Arr (1 .. State_Index'Max (2 * Tmp2'Last, Meta) + 1); Table (Tmp2'Range) := Tmp2.all; Table (Tmp2'Last + 1 .. Table'Last) := - (others => (others => 0)); + [others => [others => 0]]; Unchecked_Free (Tmp2); end if; end Ensure_Meta_State; @@ -1581,9 +1595,9 @@ package body System.Regexp is R => new Regexp_Value' (Alphabet_Size => 0, Num_States => 1, - Map => (others => 0), - States => (others => (others => 1)), - Is_Final => (others => True), + Map => [others => 0], + States => [others => [others => 1]], + Is_Final => [others => True], Case_Sensitive => True)); end if; @@ -1712,7 +1726,7 @@ package body System.Regexp is New_Columns := Table'Last (2) * (Column / Table'Last (2) + 1); New_Table := new Regexp_Array (Table'First (1) .. New_Lines, Table'First (2) .. New_Columns); - New_Table.all := (others => (others => 0)); + New_Table.all := [others => [others => 0]]; for J in Table'Range (1) loop for K in Table'Range (2) loop diff --git a/gcc/ada/libgnat/s-regexp.ads b/gcc/ada/libgnat/s-regexp.ads index 3c57d99..2a138df 100644 --- a/gcc/ada/libgnat/s-regexp.ads +++ b/gcc/ada/libgnat/s-regexp.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-regpat.adb b/gcc/ada/libgnat/s-regpat.adb index b40f682..4f758f9 100644 --- a/gcc/ada/libgnat/s-regpat.adb +++ b/gcc/ada/libgnat/s-regpat.adb @@ -7,7 +7,7 @@ -- B o d y -- -- -- -- Copyright (C) 1986 by University of Toronto. -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -199,7 +199,7 @@ package body System.Regpat is type Bit_Conversion_Array is array (Class_Byte range 0 .. 7) of Class_Byte; Bit_Conversion : constant Bit_Conversion_Array := - (1, 2, 4, 8, 16, 32, 64, 128); + [1, 2, 4, 8, 16, 32, 64, 128]; type Std_Class is (ANYOF_NONE, ANYOF_ALNUM, -- Alphanumeric class [a-zA-Z0-9] @@ -664,7 +664,7 @@ package body System.Regpat is Operand : Pointer; Greedy : Boolean := True) is - Old : Pointer; + Old : Pointer; begin Old := Insert_Operator_Before (Op, Operand, Greedy, Opsize => 7); Emit_Natural (Old + Next_Pointer_Bytes, Min); @@ -1974,7 +1974,6 @@ package body System.Regpat is Result : Pointer; Expr_Flags : Expression_Flags; - pragma Unreferenced (Expr_Flags); -- Start of processing for Compile @@ -2109,11 +2108,11 @@ package body System.Regpat is if Do_Print then declare - Point : constant String := Pointer'Image (Index); + Point : constant String := Pointer'Image (Index); begin - Put ((1 .. 4 - Point'Length => ' ') + Put ([1 .. 4 - Point'Length => ' '] & Point & ":" - & (1 .. Local_Indent * 2 => ' ') & Opcode'Image (Op)); + & [1 .. Local_Indent * 2 => ' '] & Opcode'Image (Op)); end; -- Print the parenthesis number @@ -2506,11 +2505,11 @@ package body System.Regpat is begin if Prefix then - Put ((1 .. 5 - Pos'Length => ' ')); + Put ([1 .. 5 - Pos'Length => ' ']); Put (Pos & " <" & Data (Input_Pos .. Integer'Min (Last_In_Data, Input_Pos + Length - 1))); - Put ((1 .. Length - 1 - Last_In_Data + Input_Pos => ' ')); + Put ([1 .. Length - 1 - Last_In_Data + Input_Pos => ' ']); Put ("> |"); else @@ -2527,7 +2526,7 @@ package body System.Regpat is procedure Dump_Error (Msg : String) is begin Put (" | "); - Put ((1 .. Dump_Indent * 2 => ' ')); + Put ([1 .. Dump_Indent * 2 => ' ']); Put_Line (Msg); end Dump_Error; @@ -3381,7 +3380,7 @@ package body System.Regpat is begin Input_Pos := Pos; Last_Paren := 0; - Matches_Full := (others => No_Match); + Matches_Full := [others => No_Match]; if Match (Program_First) then Matches_Full (0) := (Pos, Input_Pos - 1); @@ -3397,7 +3396,7 @@ package body System.Regpat is -- Do we have the regexp Never_Match? if Self.Size = 0 then - Matches := (others => No_Match); + Matches := [others => No_Match]; return; end if; @@ -3420,7 +3419,7 @@ package body System.Regpat is end loop; if Next_Try = 0 then - Matches := (others => No_Match); + Matches := [others => No_Match]; return; -- Not present end if; end; @@ -3582,7 +3581,6 @@ package body System.Regpat is is PM : Pattern_Matcher (Size); Finalize_Size : Program_Size; - pragma Unreferenced (Finalize_Size); begin if Size = 0 then Match (Compile (Expression), Data, Matches, Data_First, Data_Last); @@ -3605,7 +3603,6 @@ package body System.Regpat is is PM : Pattern_Matcher (Size); Final_Size : Program_Size; - pragma Unreferenced (Final_Size); begin if Size = 0 then return Match (Compile (Expression), Data, Data_First, Data_Last); @@ -3629,7 +3626,6 @@ package body System.Regpat is Matches : Match_Array (0 .. 0); PM : Pattern_Matcher (Size); Final_Size : Program_Size; - pragma Unreferenced (Final_Size); begin if Size = 0 then Match (Compile (Expression), Data, Matches, Data_First, Data_Last); @@ -3740,7 +3736,7 @@ package body System.Regpat is procedure Reset_Class (Bitmap : out Character_Class) is begin - Bitmap := (others => 0); + Bitmap := [others => 0]; end Reset_Class; ------------------ diff --git a/gcc/ada/libgnat/s-regpat.ads b/gcc/ada/libgnat/s-regpat.ads index 8fac30a..baa91be 100644 --- a/gcc/ada/libgnat/s-regpat.ads +++ b/gcc/ada/libgnat/s-regpat.ads @@ -7,7 +7,7 @@ -- S p e c -- -- -- -- Copyright (C) 1986 by University of Toronto. -- --- Copyright (C) 1996-2021, AdaCore -- +-- Copyright (C) 1996-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -639,10 +639,10 @@ private Paren_Count : Natural := 0; -- # paren groups Flags : Regexp_Flags := No_Flags; Program : Program_Data (Program_First .. Size) := - (others => ASCII.NUL); + [others => ASCII.NUL]; end record; Never_Match : constant Pattern_Matcher := - (0, ASCII.NUL, False, 0, 0, 0, No_Flags, (others => ASCII.NUL)); + (0, ASCII.NUL, False, 0, 0, 0, No_Flags, [others => ASCII.NUL]); end System.Regpat; diff --git a/gcc/ada/libgnat/s-resfil.adb b/gcc/ada/libgnat/s-resfil.adb index e37db4a..3817e6f 100644 --- a/gcc/ada/libgnat/s-resfil.adb +++ b/gcc/ada/libgnat/s-resfil.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with Ada.Unchecked_Deallocation; with System.OS_Lib; use System.OS_Lib; diff --git a/gcc/ada/libgnat/s-resfil.ads b/gcc/ada/libgnat/s-resfil.ads index 63437ae..47519d4 100644 --- a/gcc/ada/libgnat/s-resfil.ads +++ b/gcc/ada/libgnat/s-resfil.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2007-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -35,7 +35,8 @@ -- Using a response file allow passing a set of arguments to an executable -- longer than the maximum allowed by the system on the command line. -pragma Compiler_Unit_Warning; +-- Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in +-- gcc-interface/Make-lang.in for details on the constraints. with System.Strings; diff --git a/gcc/ada/libgnat/s-restri.adb b/gcc/ada/libgnat/s-restri.adb index d1f261b..4f9a02b 100644 --- a/gcc/ada/libgnat/s-restri.adb +++ b/gcc/ada/libgnat/s-restri.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package body System.Restrictions is use Rident; diff --git a/gcc/ada/libgnat/s-restri.ads b/gcc/ada/libgnat/s-restri.ads index b46ae46..509037d 100644 --- a/gcc/ada/libgnat/s-restri.ads +++ b/gcc/ada/libgnat/s-restri.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -38,8 +38,6 @@ -- with names discarded, so that we do not have image tables for the -- large restriction enumeration types at run time. -pragma Compiler_Unit_Warning; - with System.Rident; package System.Restrictions is diff --git a/gcc/ada/libgnat/s-rident.ads b/gcc/ada/libgnat/s-rident.ads index 10d374e..d3a84e3 100644 --- a/gcc/ada/libgnat/s-rident.ads +++ b/gcc/ada/libgnat/s-rident.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -41,6 +41,9 @@ -- so we can do the instantiation under control of Discard_Names to remove -- the tables. +-- Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in +-- gcc-interface/Make-lang.in for details on the constraints. + --------------------------------------------------- -- Note On Compile/Run-Time Consistency Checking -- --------------------------------------------------- @@ -69,8 +72,6 @@ -- restrictions are ignored, and the consistency checking for restrictions -- might be incomplete, which is no big deal. -pragma Compiler_Unit_Warning; - generic package System.Rident is pragma Preelaborate; @@ -144,6 +145,7 @@ package System.Rident is No_Standard_Storage_Pools, -- GNAT No_Stream_Optimizations, -- GNAT No_Streams, -- GNAT + No_Tagged_Type_Registration, -- GNAT No_Task_Allocators, -- (RM D.7(7)) No_Task_Attributes_Package, -- GNAT No_Task_At_Interrupt_Priority, -- GNAT diff --git a/gcc/ada/libgnat/s-rpc.adb b/gcc/ada/libgnat/s-rpc.adb index 1f501fe..4eec30d 100644 --- a/gcc/ada/libgnat/s-rpc.adb +++ b/gcc/ada/libgnat/s-rpc.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-rpc.ads b/gcc/ada/libgnat/s-rpc.ads index e8927bd..b7fc1dc 100644 --- a/gcc/ada/libgnat/s-rpc.ads +++ b/gcc/ada/libgnat/s-rpc.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/s-scaval.adb b/gcc/ada/libgnat/s-scaval.adb index 81394af..8fcb7ef 100644 --- a/gcc/ada/libgnat/s-scaval.adb +++ b/gcc/ada/libgnat/s-scaval.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-scaval.ads b/gcc/ada/libgnat/s-scaval.ads index 47de115..5473ab7 100644 --- a/gcc/ada/libgnat/s-scaval.ads +++ b/gcc/ada/libgnat/s-scaval.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-scaval__128.adb b/gcc/ada/libgnat/s-scaval__128.adb index 7bb5696..5ca8287 100644 --- a/gcc/ada/libgnat/s-scaval__128.adb +++ b/gcc/ada/libgnat/s-scaval__128.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -180,7 +180,7 @@ package body System.Scalar_Values is IV_Ilf := To_ByteLF (IS_Iu8); if EFloat then - IV_Ill := (0, 0, 0, 0, 0, 0, 0, 16#C0#, 16#FF#, 16#FF#, 0, 0); + IV_Ill := [0, 0, 0, 0, 0, 0, 0, 16#C0#, 16#FF#, 16#FF#, 0, 0]; end if; -- LO (Low values) @@ -209,7 +209,7 @@ package body System.Scalar_Values is IV_Ilf := To_ByteLF (16#FFF0_0000_0000_0000#); if EFloat then - IV_Ill := (0, 0, 0, 0, 0, 0, 0, 16#80#, 16#FF#, 16#FF#, 0, 0); + IV_Ill := [0, 0, 0, 0, 0, 0, 0, 16#80#, 16#FF#, 16#FF#, 0, 0]; end if; -- HI (High values) @@ -238,7 +238,7 @@ package body System.Scalar_Values is IV_Ilf := To_ByteLF (16#7FF0_0000_0000_0000#); if EFloat then - IV_Ill := (0, 0, 0, 0, 0, 0, 0, 16#80#, 16#FF#, 16#7F#, 0, 0); + IV_Ill := [0, 0, 0, 0, 0, 0, 0, 16#80#, 16#FF#, 16#7F#, 0, 0]; end if; -- -Shh (hex byte) @@ -281,7 +281,7 @@ package body System.Scalar_Values is IV_Ilf := To_ByteLF (IS_Is8); if EFloat then - IV_Ill := (B, B, B, B, B, B, B, B, B, B, B, B); + IV_Ill := [B, B, B, B, B, B, B, B, B, B, B, B]; end if; end if; diff --git a/gcc/ada/libgnat/s-scaval__128.ads b/gcc/ada/libgnat/s-scaval__128.ads index e96122b..d2fa9d1 100644 --- a/gcc/ada/libgnat/s-scaval__128.ads +++ b/gcc/ada/libgnat/s-scaval__128.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-secsta.adb b/gcc/ada/libgnat/s-secsta.adb index db64c52..c2ab922 100644 --- a/gcc/ada/libgnat/s-secsta.adb +++ b/gcc/ada/libgnat/s-secsta.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,12 +29,9 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; -with System; use System; with System.Parameters; use System.Parameters; with System.Soft_Links; use System.Soft_Links; with System.Storage_Elements; use System.Storage_Elements; diff --git a/gcc/ada/libgnat/s-secsta.ads b/gcc/ada/libgnat/s-secsta.ads index 6648c23..b75f1a3 100644 --- a/gcc/ada/libgnat/s-secsta.ads +++ b/gcc/ada/libgnat/s-secsta.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with System.Parameters; with System.Storage_Elements; @@ -440,9 +438,4 @@ private function Get_Stack_Info (Stack : SS_Stack_Ptr) return Stack_Info; -- Obtain the information attributes of secondary stack Stack - pragma Machine_Attribute (SS_Allocate, "strub", "callable"); - pragma Machine_Attribute (SS_Mark, "strub", "callable"); - pragma Machine_Attribute (SS_Release, "strub", "callable"); - -- Enable these to be called from within strub contexts. - end System.Secondary_Stack; diff --git a/gcc/ada/libgnat/s-sequio.adb b/gcc/ada/libgnat/s-sequio.adb index e314db4..67a7e5b 100644 --- a/gcc/ada/libgnat/s-sequio.adb +++ b/gcc/ada/libgnat/s-sequio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-sequio.ads b/gcc/ada/libgnat/s-sequio.ads index e497760..cd08b9a 100644 --- a/gcc/ada/libgnat/s-sequio.ads +++ b/gcc/ada/libgnat/s-sequio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-shabig.ads b/gcc/ada/libgnat/s-shabig.ads index c1a7a3f..853187c 100644 --- a/gcc/ada/libgnat/s-shabig.ads +++ b/gcc/ada/libgnat/s-shabig.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2012-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-shasto.adb b/gcc/ada/libgnat/s-shasto.adb index a1f5a95..c383878 100644 --- a/gcc/ada/libgnat/s-shasto.adb +++ b/gcc/ada/libgnat/s-shasto.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -36,7 +36,6 @@ with Ada.Streams.Stream_IO; with System.Global_Locks; with System.Soft_Links; -with System; with System.CRTL; with System.File_Control_Block; with System.File_IO; @@ -441,7 +440,7 @@ package body System.Shared_Storage is if SFE = null then declare - S : aliased constant String := Dir.all & Var; + S : aliased constant String := Dir.all & Var; begin SFE := new Shared_Var_File_Entry; @@ -522,7 +521,7 @@ package body System.Shared_Storage is if SFE = null then declare - S : aliased constant String := Dir.all & Var; + S : aliased constant String := Dir.all & Var; begin SFE := new Shared_Var_File_Entry; diff --git a/gcc/ada/libgnat/s-shasto.ads b/gcc/ada/libgnat/s-shasto.ads index a76d3d9..58408f3 100644 --- a/gcc/ada/libgnat/s-shasto.ads +++ b/gcc/ada/libgnat/s-shasto.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-soflin.adb b/gcc/ada/libgnat/s-soflin.adb index 119bea1..e6a366e 100644 --- a/gcc/ada/libgnat/s-soflin.adb +++ b/gcc/ada/libgnat/s-soflin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - pragma Warnings (Off); -- Disable warnings as System.Soft_Links.Initialize is not Preelaborate. It is -- safe to with this unit as its elaboration routine will only be initializing diff --git a/gcc/ada/libgnat/s-soflin.ads b/gcc/ada/libgnat/s-soflin.ads index 4786262..423af3f 100644 --- a/gcc/ada/libgnat/s-soflin.ads +++ b/gcc/ada/libgnat/s-soflin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -37,8 +37,6 @@ -- initialized to non-tasking versions, and then if the tasking support is -- initialized, they are set to the real tasking versions. -pragma Compiler_Unit_Warning; - with Ada.Exceptions; with System.Parameters; with System.Secondary_Stack; diff --git a/gcc/ada/libgnat/s-soliin.adb b/gcc/ada/libgnat/s-soliin.adb index 4fd335f..14ef4e1 100644 --- a/gcc/ada/libgnat/s-soliin.adb +++ b/gcc/ada/libgnat/s-soliin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2017-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2017-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-soliin.ads b/gcc/ada/libgnat/s-soliin.ads index 4159a3a..c81ff6f 100644 --- a/gcc/ada/libgnat/s-soliin.ads +++ b/gcc/ada/libgnat/s-soliin.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2017-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2017-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-sopco3.adb b/gcc/ada/libgnat/s-sopco3.adb deleted file mode 100644 index 94e2d38..0000000 --- a/gcc/ada/libgnat/s-sopco3.adb +++ /dev/null @@ -1,64 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M . S T R I N G _ O P S _ C O N C A T _ 3 -- --- -- --- B o d y -- --- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- NOTE: This package is obsolescent. It is no longer used by the compiler --- which now generates concatenation inline. It is retained only because --- it may be used during bootstrapping using old versions of the compiler. - -pragma Compiler_Unit_Warning; - -package body System.String_Ops_Concat_3 is - - ------------------ - -- Str_Concat_3 -- - ------------------ - - function Str_Concat_3 (S1, S2, S3 : String) return String is - begin - if S1'Length = 0 then - return S2 & S3; - - else - declare - L12 : constant Natural := S1'Length + S2'Length; - L13 : constant Natural := L12 + S3'Length; - R : String (S1'First .. S1'First + L13 - 1); - - begin - R (S1'First .. S1'Last) := S1; - R (S1'Last + 1 .. S1'First + L12 - 1) := S2; - R (S1'First + L12 .. R'Last) := S3; - return R; - end; - end if; - end Str_Concat_3; - -end System.String_Ops_Concat_3; diff --git a/gcc/ada/libgnat/s-sopco3.ads b/gcc/ada/libgnat/s-sopco3.ads deleted file mode 100644 index 92cdffb..0000000 --- a/gcc/ada/libgnat/s-sopco3.ads +++ /dev/null @@ -1,46 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M . S T R I N G _ O P S _ C O N C A T _ 3 -- --- -- --- S p e c -- --- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This package contains the function for concatenating three strings - --- NOTE: This package is obsolescent. It is no longer used by the compiler --- which now generates concatenation inline. It is retained only because --- it may be used during bootstrapping using old versions of the compiler. - -pragma Compiler_Unit_Warning; - -package System.String_Ops_Concat_3 is - pragma Pure; - - function Str_Concat_3 (S1, S2, S3 : String) return String; - -- Concatenate three strings and return resulting string - -end System.String_Ops_Concat_3; diff --git a/gcc/ada/libgnat/s-sopco4.adb b/gcc/ada/libgnat/s-sopco4.adb deleted file mode 100644 index a8d0dd8..0000000 --- a/gcc/ada/libgnat/s-sopco4.adb +++ /dev/null @@ -1,66 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M . S T R I N G _ O P S _ C O N C A T _ 4 -- --- -- --- B o d y -- --- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- NOTE: This package is obsolescent. It is no longer used by the compiler --- which now generates concatenation inline. It is retained only because --- it may be used during bootstrapping using old versions of the compiler. - -pragma Compiler_Unit_Warning; - -package body System.String_Ops_Concat_4 is - - ------------------ - -- Str_Concat_4 -- - ------------------ - - function Str_Concat_4 (S1, S2, S3, S4 : String) return String is - begin - if S1'Length = 0 then - return S2 & S3 & S4; - - else - declare - L12 : constant Natural := S1'Length + S2'Length; - L13 : constant Natural := L12 + S3'Length; - L14 : constant Natural := L13 + S4'Length; - R : String (S1'First .. S1'First + L14 - 1); - - begin - R (S1'First .. S1'Last) := S1; - R (S1'Last + 1 .. S1'First + L12 - 1) := S2; - R (S1'First + L12 .. S1'First + L13 - 1) := S3; - R (S1'First + L13 .. R'Last) := S4; - return R; - end; - end if; - end Str_Concat_4; - -end System.String_Ops_Concat_4; diff --git a/gcc/ada/libgnat/s-sopco4.ads b/gcc/ada/libgnat/s-sopco4.ads deleted file mode 100644 index 899c9f7..0000000 --- a/gcc/ada/libgnat/s-sopco4.ads +++ /dev/null @@ -1,46 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M . S T R I N G _ O P S _ C O N C A T _ 4 -- --- -- --- S p e c -- --- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This package contains the function for concatenating four strings - --- NOTE: This package is obsolescent. It is no longer used by the compiler --- which now generates concatenation inline. It is retained only because --- it may be used during bootstrapping using old versions of the compiler. - -pragma Compiler_Unit_Warning; - -package System.String_Ops_Concat_4 is - pragma Pure; - - function Str_Concat_4 (S1, S2, S3, S4 : String) return String; - -- Concatenate four strings and return resulting string - -end System.String_Ops_Concat_4; diff --git a/gcc/ada/libgnat/s-sopco5.adb b/gcc/ada/libgnat/s-sopco5.adb deleted file mode 100644 index e3ee0dc..0000000 --- a/gcc/ada/libgnat/s-sopco5.adb +++ /dev/null @@ -1,68 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M . S T R I N G _ O P S _ C O N C A T _ 5 -- --- -- --- B o d y -- --- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- NOTE: This package is obsolescent. It is no longer used by the compiler --- which now generates concatenation inline. It is retained only because --- it may be used during bootstrapping using old versions of the compiler. - -pragma Compiler_Unit_Warning; - -package body System.String_Ops_Concat_5 is - - ------------------ - -- Str_Concat_5 -- - ------------------ - - function Str_Concat_5 (S1, S2, S3, S4, S5 : String) return String is - begin - if S1'Length = 0 then - return S2 & S3 & S4 & S5; - - else - declare - L12 : constant Natural := S1'Length + S2'Length; - L13 : constant Natural := L12 + S3'Length; - L14 : constant Natural := L13 + S4'Length; - L15 : constant Natural := L14 + S5'Length; - R : String (S1'First .. S1'First + L15 - 1); - - begin - R (S1'First .. S1'Last) := S1; - R (S1'Last + 1 .. S1'First + L12 - 1) := S2; - R (S1'First + L12 .. S1'First + L13 - 1) := S3; - R (S1'First + L13 .. S1'First + L14 - 1) := S4; - R (S1'First + L14 .. R'Last) := S5; - return R; - end; - end if; - end Str_Concat_5; - -end System.String_Ops_Concat_5; diff --git a/gcc/ada/libgnat/s-sopco5.ads b/gcc/ada/libgnat/s-sopco5.ads deleted file mode 100644 index 5b032d1..0000000 --- a/gcc/ada/libgnat/s-sopco5.ads +++ /dev/null @@ -1,46 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M . S T R I N G _ O P S _ C O N C A T _ 5 -- --- -- --- S p e c -- --- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This package contains the function for concatenating five strings - --- NOTE: This package is obsolescent. It is no longer used by the compiler --- which now generates concatenation inline. It is retained only because --- it may be used during bootstrapping using old versions of the compiler. - -pragma Compiler_Unit_Warning; - -package System.String_Ops_Concat_5 is - pragma Pure; - - function Str_Concat_5 (S1, S2, S3, S4, S5 : String) return String; - -- Concatenate five strings and return resulting string - -end System.String_Ops_Concat_5; diff --git a/gcc/ada/libgnat/s-spsufi.adb b/gcc/ada/libgnat/s-spsufi.adb index ad34ff2..0844db2 100644 --- a/gcc/ada/libgnat/s-spsufi.adb +++ b/gcc/ada/libgnat/s-spsufi.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-spsufi.ads b/gcc/ada/libgnat/s-spsufi.ads index 03d9639..3d5aef6 100644 --- a/gcc/ada/libgnat/s-spsufi.ads +++ b/gcc/ada/libgnat/s-spsufi.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package System.Storage_Pools.Subpools.Finalization is -- The pragma is needed because package System.Storage_Pools.Subpools which diff --git a/gcc/ada/libgnat/s-stache.adb b/gcc/ada/libgnat/s-stache.adb index e3ac368..9194790 100644 --- a/gcc/ada/libgnat/s-stache.adb +++ b/gcc/ada/libgnat/s-stache.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - -- As noted in the spec, this dummy body is present because otherwise we -- have bootstrapping path problems (there used to be a real body). diff --git a/gcc/ada/libgnat/s-stache.ads b/gcc/ada/libgnat/s-stache.ads index 3e0662e..7631d21 100644 --- a/gcc/ada/libgnat/s-stache.ads +++ b/gcc/ada/libgnat/s-stache.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -35,8 +35,6 @@ -- This package defines basic types and objects. Operations related to -- stack checking can be found in package System.Stack_Checking.Operations. -pragma Compiler_Unit_Warning; - with System.Storage_Elements; package System.Stack_Checking is diff --git a/gcc/ada/libgnat/s-stalib.adb b/gcc/ada/libgnat/s-stalib.adb index ae62377..1742250 100644 --- a/gcc/ada/libgnat/s-stalib.adb +++ b/gcc/ada/libgnat/s-stalib.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - -- The purpose of this body is simply to ensure that the two with'ed units -- are properly included in the link. They are not with'ed from the spec -- of System.Standard_Library, since this would cause order of elaboration diff --git a/gcc/ada/libgnat/s-stalib.ads b/gcc/ada/libgnat/s-stalib.ads index fb6e992..9182c67 100644 --- a/gcc/ada/libgnat/s-stalib.ads +++ b/gcc/ada/libgnat/s-stalib.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -44,8 +44,6 @@ -- package and the packages it references are included in all Ada programs, -- together with the included data. -pragma Compiler_Unit_Warning; - with Ada.Unchecked_Conversion; package System.Standard_Library is diff --git a/gcc/ada/libgnat/s-statxd.adb b/gcc/ada/libgnat/s-statxd.adb index af88f7d..e34bef1 100644 --- a/gcc/ada/libgnat/s-statxd.adb +++ b/gcc/ada/libgnat/s-statxd.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1996-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2022, Free Software Foundation, Inc. -- -- -- -- GARLIC is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -72,40 +72,40 @@ package body System.Stream_Attributes.XDR is type Precision is (Single, Double, Quadruple); - Fields : constant array (Precision) of Field_Type := ( + Fields : constant array (Precision) of Field_Type := [ -- Single precision - (E_Size => 8, + [E_Size => 8, E_Bias => 127, F_Size => 23, E_Last => 2 ** 8 - 1, F_Mask => 16#7F#, -- 2 ** 7 - 1, E_Bytes => 2, F_Bytes => 3, - F_Bits => 23 mod US), + F_Bits => 23 mod US], -- Double precision - (E_Size => 11, + [E_Size => 11, E_Bias => 1023, F_Size => 52, E_Last => 2 ** 11 - 1, F_Mask => 16#0F#, -- 2 ** 4 - 1, E_Bytes => 2, F_Bytes => 7, - F_Bits => 52 mod US), + F_Bits => 52 mod US], -- Quadruple precision - (E_Size => 15, + [E_Size => 15, E_Bias => 16383, F_Size => 112, E_Last => 2 ** 8 - 1, F_Mask => 16#FF#, -- 2 ** 8 - 1, E_Bytes => 2, F_Bytes => 14, - F_Bits => 112 mod US)); + F_Bits => 112 mod US]]; -- The representation of all items requires a multiple of four bytes -- (or 32 bits) of data. The bytes are numbered 0 through n-1. The bytes @@ -1244,7 +1244,7 @@ package body System.Stream_Attributes.XDR is Is_Positive : Boolean; E : Integer; F : Float; - S : SEA (1 .. F_L) := (others => 0); + S : SEA (1 .. F_L) := [others => 0]; begin if not Item'Valid then @@ -1390,7 +1390,7 @@ package body System.Stream_Attributes.XDR is Is_Positive : Boolean; E : Integer; F : Long_Float; - S : SEA (1 .. LF_L) := (others => 0); + S : SEA (1 .. LF_L) := [others => 0]; begin if not Item'Valid then @@ -1519,7 +1519,7 @@ package body System.Stream_Attributes.XDR is Is_Positive : Boolean; E : Integer; F : Long_Long_Float := Item; - S : SEA (1 .. LLF_L) := (others => 0); + S : SEA (1 .. LLF_L) := [others => 0]; begin if not Item'Valid then @@ -1737,7 +1737,7 @@ package body System.Stream_Attributes.XDR is Is_Positive : Boolean; E : Integer; F : Short_Float; - S : SEA (1 .. SF_L) := (others => 0); + S : SEA (1 .. SF_L) := [others => 0]; begin if not Item'Valid then diff --git a/gcc/ada/libgnat/s-statxd.ads b/gcc/ada/libgnat/s-statxd.ads index e47eec1..86db98a 100644 --- a/gcc/ada/libgnat/s-statxd.ads +++ b/gcc/ada/libgnat/s-statxd.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-stausa.adb b/gcc/ada/libgnat/s-stausa.adb index 8bd6c5b..8c0acc4 100644 --- a/gcc/ada/libgnat/s-stausa.adb +++ b/gcc/ada/libgnat/s-stausa.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -127,10 +127,10 @@ package body System.Stack_Usage is Result_Array := new Result_Array_Type (1 .. Buffer_Size); Result_Array.all := - (others => - (Task_Name => (others => ASCII.NUL), + [others => + [Task_Name => [others => ASCII.NUL], Value => 0, - Stack_Size => 0)); + Stack_Size => 0]]; -- Set the Is_Enabled flag to true, so that the task wrapper knows that -- it has to handle dynamic stack analysis @@ -282,7 +282,7 @@ package body System.Stack_Usage is Analyzer.Pattern_Size := Pattern_Size; Analyzer.Pattern := Pattern; Analyzer.Result_Id := Next_Id; - Analyzer.Task_Name := (others => ' '); + Analyzer.Task_Name := [others => ' ']; -- Compute the task name, and truncate if bigger than Task_Name_Length @@ -455,12 +455,12 @@ package body System.Stack_Usage is Stack_Size_Blanks : constant String (1 .. Max_Stack_Size_Len - Stack_Size_Str'Length) := - (others => ' '); + [others => ' ']; Stack_Usage_Blanks : constant String (1 .. Max_Actual_Use_Len - Actual_Size_Str'Length) := - (others => ' '); + [others => ' ']; begin if Stack_Size_Str'Length > Max_Stack_Size_Len then diff --git a/gcc/ada/libgnat/s-stausa.ads b/gcc/ada/libgnat/s-stausa.ads index 2d7feee..00714b2 100644 --- a/gcc/ada/libgnat/s-stausa.ads +++ b/gcc/ada/libgnat/s-stausa.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,6 @@ -- -- ------------------------------------------------------------------------------ -with System; with System.Storage_Elements; with System.Address_To_Access_Conversions; with Interfaces; diff --git a/gcc/ada/libgnat/s-stchop.adb b/gcc/ada/libgnat/s-stchop.adb index 16b8d26..99afb29 100644 --- a/gcc/ada/libgnat/s-stchop.adb +++ b/gcc/ada/libgnat/s-stchop.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-stchop.ads b/gcc/ada/libgnat/s-stchop.ads index 2b8acee..f4d1a5b 100644 --- a/gcc/ada/libgnat/s-stchop.ads +++ b/gcc/ada/libgnat/s-stchop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-stchop__limit.ads b/gcc/ada/libgnat/s-stchop__limit.ads index 28d6802..6af38de 100644 --- a/gcc/ada/libgnat/s-stchop__limit.ads +++ b/gcc/ada/libgnat/s-stchop__limit.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-stchop__vxworks.adb b/gcc/ada/libgnat/s-stchop__vxworks.adb index 4146522..4334bd1 100644 --- a/gcc/ada/libgnat/s-stchop__vxworks.adb +++ b/gcc/ada/libgnat/s-stchop__vxworks.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-stoele.adb b/gcc/ada/libgnat/s-stoele.adb index 87c6d49..f804e6d 100644 --- a/gcc/ada/libgnat/s-stoele.adb +++ b/gcc/ada/libgnat/s-stoele.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with Ada.Unchecked_Conversion; package body System.Storage_Elements is diff --git a/gcc/ada/libgnat/s-stoele.ads b/gcc/ada/libgnat/s-stoele.ads index 62e9ca8..48af71b 100644 --- a/gcc/ada/libgnat/s-stoele.ads +++ b/gcc/ada/libgnat/s-stoele.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -37,8 +37,6 @@ -- extra declarations that can be introduced into System using Extend_System. -- It is a good idea to avoid use clauses for this package. -pragma Compiler_Unit_Warning; - package System.Storage_Elements is pragma Pure; -- Note that we take advantage of the implementation permission to make diff --git a/gcc/ada/libgnat/s-stopoo.adb b/gcc/ada/libgnat/s-stopoo.adb index 0e38413..af8bc55 100644 --- a/gcc/ada/libgnat/s-stopoo.adb +++ b/gcc/ada/libgnat/s-stopoo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-stopoo.ads b/gcc/ada/libgnat/s-stopoo.ads index 5bfdca2..ad7cf55 100644 --- a/gcc/ada/libgnat/s-stopoo.ads +++ b/gcc/ada/libgnat/s-stopoo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/s-stposu.adb b/gcc/ada/libgnat/s-stposu.adb index 141d32b..ca45a3a 100644 --- a/gcc/ada/libgnat/s-stposu.adb +++ b/gcc/ada/libgnat/s-stposu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-stposu.ads b/gcc/ada/libgnat/s-stposu.ads index 1441b24..b952e01 100644 --- a/gcc/ada/libgnat/s-stposu.ads +++ b/gcc/ada/libgnat/s-stposu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/s-stratt.adb b/gcc/ada/libgnat/s-stratt.adb index d7f572e..d9c2d46 100644 --- a/gcc/ada/libgnat/s-stratt.adb +++ b/gcc/ada/libgnat/s-stratt.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-stratt.ads b/gcc/ada/libgnat/s-stratt.ads index 9e6d001..08b0d78 100644 --- a/gcc/ada/libgnat/s-stratt.ads +++ b/gcc/ada/libgnat/s-stratt.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -37,7 +37,6 @@ -- defined types, the subprogram for the corresponding root type is called -- with an appropriate conversion. -with System; with System.Unsigned_Types; with Ada.Streams; diff --git a/gcc/ada/libgnat/s-strcom.adb b/gcc/ada/libgnat/s-strcom.adb index 5f0f9d2..1ff036e 100644 --- a/gcc/ada/libgnat/s-strcom.adb +++ b/gcc/ada/libgnat/s-strcom.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with Ada.Unchecked_Conversion; package body System.String_Compare is diff --git a/gcc/ada/libgnat/s-strcom.ads b/gcc/ada/libgnat/s-strcom.ads index d4271ec..36befa5 100644 --- a/gcc/ada/libgnat/s-strcom.ads +++ b/gcc/ada/libgnat/s-strcom.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,8 +31,6 @@ -- This package contains functions for runtime comparisons on strings -pragma Compiler_Unit_Warning; - package System.String_Compare is function Str_Compare diff --git a/gcc/ada/libgnat/s-strhas.adb b/gcc/ada/libgnat/s-strhas.adb index 7974b02..db860c3 100644 --- a/gcc/ada/libgnat/s-strhas.adb +++ b/gcc/ada/libgnat/s-strhas.adb @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package body System.String_Hash is -- Compute a hash value for a key. The approach here follows the algorithm diff --git a/gcc/ada/libgnat/s-strhas.ads b/gcc/ada/libgnat/s-strhas.ads index d81ce50..974945e 100644 --- a/gcc/ada/libgnat/s-strhas.ads +++ b/gcc/ada/libgnat/s-strhas.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-string.adb b/gcc/ada/libgnat/s-string.adb index 13a7d08..951f78c 100644 --- a/gcc/ada/libgnat/s-string.adb +++ b/gcc/ada/libgnat/s-string.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package body System.Strings is ---------- diff --git a/gcc/ada/libgnat/s-string.ads b/gcc/ada/libgnat/s-string.ads index 3f5ebf4..1e70377 100644 --- a/gcc/ada/libgnat/s-string.ads +++ b/gcc/ada/libgnat/s-string.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1995-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -35,8 +35,6 @@ -- be used by other predefined packages. User access to this package is via -- a renaming of this package in GNAT.String (file g-string.ads). -pragma Compiler_Unit_Warning; - with Ada.Unchecked_Deallocation; package System.Strings is diff --git a/gcc/ada/libgnat/s-strops.adb b/gcc/ada/libgnat/s-strops.adb deleted file mode 100644 index 1644d85..0000000 --- a/gcc/ada/libgnat/s-strops.adb +++ /dev/null @@ -1,109 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- --- -- --- S Y S T E M . S T R I N G _ O P S -- --- -- --- B o d y -- --- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- NOTE: This package is obsolescent. It is no longer used by the compiler --- which now generates concatenation inline. It is retained only because --- it may be used during bootstrapping using old versions of the compiler. - -pragma Compiler_Unit_Warning; - -package body System.String_Ops is - - ---------------- - -- Str_Concat -- - ---------------- - - function Str_Concat (X, Y : String) return String is - begin - if X'Length = 0 then - return Y; - - else - declare - L : constant Natural := X'Length + Y'Length; - R : String (X'First .. X'First + L - 1); - - begin - R (X'Range) := X; - R (X'First + X'Length .. R'Last) := Y; - return R; - end; - end if; - end Str_Concat; - - ------------------- - -- Str_Concat_CC -- - ------------------- - - function Str_Concat_CC (X, Y : Character) return String is - R : String (1 .. 2); - - begin - R (1) := X; - R (2) := Y; - return R; - end Str_Concat_CC; - - ------------------- - -- Str_Concat_CS -- - ------------------- - - function Str_Concat_CS (X : Character; Y : String) return String is - R : String (1 .. Y'Length + 1); - - begin - R (1) := X; - R (2 .. R'Last) := Y; - return R; - end Str_Concat_CS; - - ------------------- - -- Str_Concat_SC -- - ------------------- - - function Str_Concat_SC (X : String; Y : Character) return String is - begin - if X'Length = 0 then - return (1 => Y); - - else - declare - R : String (X'First .. X'Last + 1); - - begin - R (X'Range) := X; - R (R'Last) := Y; - return R; - end; - end if; - end Str_Concat_SC; - -end System.String_Ops; diff --git a/gcc/ada/libgnat/s-strops.ads b/gcc/ada/libgnat/s-strops.ads deleted file mode 100644 index f72baff..0000000 --- a/gcc/ada/libgnat/s-strops.ads +++ /dev/null @@ -1,56 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- --- -- --- S Y S T E M . S T R I N G _ O P S -- --- -- --- S p e c -- --- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- <http://www.gnu.org/licenses/>. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This package contains functions for runtime operations on strings --- (other than runtime comparison, found in s-strcom.ads). - --- NOTE: This package is obsolescent. It is no longer used by the compiler --- which now generates concatenation inline. It is retained only because --- it may be used during bootstrapping using old versions of the compiler. - -pragma Compiler_Unit_Warning; - -package System.String_Ops is - pragma Pure; - - function Str_Concat (X, Y : String) return String; - -- Concatenate two strings and return resulting string - - function Str_Concat_SC (X : String; Y : Character) return String; - -- Concatenate string and character - - function Str_Concat_CS (X : Character; Y : String) return String; - -- Concatenate character and string - - function Str_Concat_CC (X, Y : Character) return String; - -- Concatenate two characters - -end System.String_Ops; diff --git a/gcc/ada/libgnat/s-ststop.adb b/gcc/ada/libgnat/s-ststop.adb index c1f832a..bffe65e 100644 --- a/gcc/ada/libgnat/s-ststop.adb +++ b/gcc/ada/libgnat/s-ststop.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,13 +29,10 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with Ada.IO_Exceptions; use Ada.IO_Exceptions; with Ada.Streams; use Ada.Streams; with Ada.Unchecked_Conversion; -with System; use System; with System.Storage_Elements; use System.Storage_Elements; with System.Stream_Attributes; diff --git a/gcc/ada/libgnat/s-ststop.ads b/gcc/ada/libgnat/s-ststop.ads index a19cdc8..1320037 100644 --- a/gcc/ada/libgnat/s-ststop.ads +++ b/gcc/ada/libgnat/s-ststop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -63,8 +63,6 @@ -- handles the XDR implementation of System.Stream_Attributes in particular -- which does not permit block io optimization. -pragma Compiler_Unit_Warning; - with Ada.Streams; with System.Storage_Elements; diff --git a/gcc/ada/libgnat/s-tasloc.adb b/gcc/ada/libgnat/s-tasloc.adb index b451d2c..4c5b813 100644 --- a/gcc/ada/libgnat/s-tasloc.adb +++ b/gcc/ada/libgnat/s-tasloc.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2021, AdaCore -- +-- Copyright (C) 1997-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-tasloc.ads b/gcc/ada/libgnat/s-tasloc.ads index d9a7de5..207f7dd 100644 --- a/gcc/ada/libgnat/s-tasloc.ads +++ b/gcc/ada/libgnat/s-tasloc.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2021, AdaCore -- +-- Copyright (C) 1998-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-traceb.adb b/gcc/ada/libgnat/s-traceb.adb index d43d757..64aca62 100644 --- a/gcc/ada/libgnat/s-traceb.adb +++ b/gcc/ada/libgnat/s-traceb.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -34,8 +34,6 @@ -- Note: this unit must be compiled using -fno-optimize-sibling-calls. -- See comment below in body of Call_Chain for details on the reason. -pragma Compiler_Unit_Warning; - package body System.Traceback is procedure Call_Chain diff --git a/gcc/ada/libgnat/s-traceb.ads b/gcc/ada/libgnat/s-traceb.ads index 21e8af2..5eba979 100644 --- a/gcc/ada/libgnat/s-traceb.ads +++ b/gcc/ada/libgnat/s-traceb.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -33,8 +33,6 @@ -- execution location. The traceback shows the locations of calls in the call -- chain, up to either the top or a designated number of levels. -pragma Compiler_Unit_Warning; - with System.Traceback_Entries; package System.Traceback is diff --git a/gcc/ada/libgnat/s-traceb__hpux.adb b/gcc/ada/libgnat/s-traceb__hpux.adb index e5af76d..d95a039 100644 --- a/gcc/ada/libgnat/s-traceb__hpux.adb +++ b/gcc/ada/libgnat/s-traceb__hpux.adb @@ -7,7 +7,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-traceb__mastop.adb b/gcc/ada/libgnat/s-traceb__mastop.adb index e50bfdc..0c7c4ed 100644 --- a/gcc/ada/libgnat/s-traceb__mastop.adb +++ b/gcc/ada/libgnat/s-traceb__mastop.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-traent.adb b/gcc/ada/libgnat/s-traent.adb index a471ede..6f615b0 100644 --- a/gcc/ada/libgnat/s-traent.adb +++ b/gcc/ada/libgnat/s-traent.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package body System.Traceback_Entries is ------------ diff --git a/gcc/ada/libgnat/s-traent.ads b/gcc/ada/libgnat/s-traent.ads index a534dd8..23e327c 100644 --- a/gcc/ada/libgnat/s-traent.ads +++ b/gcc/ada/libgnat/s-traent.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2003-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -38,8 +38,6 @@ -- version of the package, an entry is a mere code location representing the -- address of a call instruction part of the call-chain. -pragma Compiler_Unit_Warning; - package System.Traceback_Entries is pragma Preelaborate; diff --git a/gcc/ada/libgnat/s-trasym.adb b/gcc/ada/libgnat/s-trasym.adb index 5ed1816..6182b76 100644 --- a/gcc/ada/libgnat/s-trasym.adb +++ b/gcc/ada/libgnat/s-trasym.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-trasym.ads b/gcc/ada/libgnat/s-trasym.ads index e24d109..6de8903 100644 --- a/gcc/ada/libgnat/s-trasym.ads +++ b/gcc/ada/libgnat/s-trasym.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-trasym__dwarf.adb b/gcc/ada/libgnat/s-trasym__dwarf.adb index fb26d77..a528471 100644 --- a/gcc/ada/libgnat/s-trasym__dwarf.adb +++ b/gcc/ada/libgnat/s-trasym__dwarf.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2021, AdaCore -- +-- Copyright (C) 1999-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-tsmona.adb b/gcc/ada/libgnat/s-tsmona.adb index f8134ff..2ae7fcb 100644 --- a/gcc/ada/libgnat/s-tsmona.adb +++ b/gcc/ada/libgnat/s-tsmona.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2012-2021, AdaCore -- +-- Copyright (C) 2012-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-tsmona__linux.adb b/gcc/ada/libgnat/s-tsmona__linux.adb index 400b7ad..19b7b8f 100644 --- a/gcc/ada/libgnat/s-tsmona__linux.adb +++ b/gcc/ada/libgnat/s-tsmona__linux.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2012-2021, AdaCore -- +-- Copyright (C) 2012-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-tsmona__mingw.adb b/gcc/ada/libgnat/s-tsmona__mingw.adb index 42ec175..396e5f7 100644 --- a/gcc/ada/libgnat/s-tsmona__mingw.adb +++ b/gcc/ada/libgnat/s-tsmona__mingw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2012-2021, AdaCore -- +-- Copyright (C) 2012-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-unstyp.ads b/gcc/ada/libgnat/s-unstyp.ads index 197fd24..2a700a0 100644 --- a/gcc/ada/libgnat/s-unstyp.ads +++ b/gcc/ada/libgnat/s-unstyp.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -35,8 +35,6 @@ -- also contains some related definitions for other specialized types -- used by the compiler in connection with packed array types. -pragma Compiler_Unit_Warning; - package System.Unsigned_Types is pragma Pure; pragma No_Elaboration_Code_All; diff --git a/gcc/ada/libgnat/s-utf_32.adb b/gcc/ada/libgnat/s-utf_32.adb index 4f5c749..eb44ace 100644 --- a/gcc/ada/libgnat/s-utf_32.adb +++ b/gcc/ada/libgnat/s-utf_32.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,18 +29,13 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; +pragma Style_Checks ("M512"); +-- Allow long lines in this unit -pragma Style_Checks (Off); --- Allow long lines in this unit. Note this could be more specific, but we --- keep this simple form because of bootstrap constraints ??? - --- pragma Warnings (Off, "non-static constant in preelaborated unit"); --- We need this to be pure, and the three constants in question are not a --- real problem, they are completely known at compile time. This pragma --- is commented out for now, because we still want to be able to bootstrap --- with old versions of the compiler that did not support this form. We --- have added additional pragma Warnings (Off/On) for now ??? +pragma Warnings (Off, "non-static constant in preelaborated unit"); +-- We need package to be pure, and multiple constants in this unit will +-- trigger the "non-static" warning - so ignore this since they are known at +-- compile time and not a real problem for us. package body System.UTF_32 is @@ -1858,9 +1853,6 @@ package body System.UTF_32 is (16#F0000#, 16#FFFFD#), -- (Co) <Plane 15 Private Use, First> .. <Plane 15 Private Use, Last> (16#100000#, 16#10FFFD#)); -- (Co) <Plane 16 Private Use, First> .. <Plane 16 Private Use, Last> - pragma Warnings (Off); - -- Temporary, until pragma at start can be activated ??? - -- The following array is parallel to the Unicode_Ranges table above. For -- each entry in the Unicode_Ranges table, there is a corresponding entry -- in the following table indicating the corresponding unicode category. @@ -6508,9 +6500,6 @@ package body System.UTF_32 is (16#1FBF0#, 16#1FBF9#), -- SEGMENTED DIGIT ZERO..SEGMENTED DIGIT NINE (16#2F800#, 16#2FA1D#)); -- CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D - pragma Warnings (On); - -- Temporary until pragma Warnings at start can be activated ??? - type Decomposition_Mapping is record Item : UTF_32; First_Char_Mapping : UTF_32; @@ -12314,7 +12303,7 @@ package body System.UTF_32 is return C = Nd; end Is_UTF_32_Digit; - ---------------------- + ---------------------- -- Is_UTF_32_Letter -- ---------------------- diff --git a/gcc/ada/libgnat/s-utf_32.ads b/gcc/ada/libgnat/s-utf_32.ads index def16be..9fd183b 100644 --- a/gcc/ada/libgnat/s-utf_32.ads +++ b/gcc/ada/libgnat/s-utf_32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -41,7 +41,8 @@ -- the same services. The reason this package is in System is so that it can -- with'ed by other packages in the Ada and System hierarchies. -pragma Compiler_Unit_Warning; +-- Note: this unit is used during bootstrap, see ADA_GENERATED_FILES in +-- gcc-interface/Make-lang.in for details on the constraints. package System.UTF_32 is pragma Pure; diff --git a/gcc/ada/libgnat/s-vade128.ads b/gcc/ada/libgnat/s-vade128.ads index e96fa0d..5556c09 100644 --- a/gcc/ada/libgnat/s-vade128.ads +++ b/gcc/ada/libgnat/s-vade128.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-vade32.ads b/gcc/ada/libgnat/s-vade32.ads index 22888ad..ea71fa4 100644 --- a/gcc/ada/libgnat/s-vade32.ads +++ b/gcc/ada/libgnat/s-vade32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-vade64.ads b/gcc/ada/libgnat/s-vade64.ads index d52c139..e5726a9 100644 --- a/gcc/ada/libgnat/s-vade64.ads +++ b/gcc/ada/libgnat/s-vade64.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-vaen16.ads b/gcc/ada/libgnat/s-vaen16.ads index 6ea6071..3407803 100644 --- a/gcc/ada/libgnat/s-vaen16.ads +++ b/gcc/ada/libgnat/s-vaen16.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-vaen32.ads b/gcc/ada/libgnat/s-vaen32.ads index e1a7644..672351e 100644 --- a/gcc/ada/libgnat/s-vaen32.ads +++ b/gcc/ada/libgnat/s-vaen32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-vaenu8.ads b/gcc/ada/libgnat/s-vaenu8.ads index 395a969..7d9995b 100644 --- a/gcc/ada/libgnat/s-vaenu8.ads +++ b/gcc/ada/libgnat/s-vaenu8.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-vafi128.ads b/gcc/ada/libgnat/s-vafi128.ads index 4961b96..900bdae 100644 --- a/gcc/ada/libgnat/s-vafi128.ads +++ b/gcc/ada/libgnat/s-vafi128.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-vafi32.ads b/gcc/ada/libgnat/s-vafi32.ads index 3a9c4ff..a352d3d 100644 --- a/gcc/ada/libgnat/s-vafi32.ads +++ b/gcc/ada/libgnat/s-vafi32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-vafi64.ads b/gcc/ada/libgnat/s-vafi64.ads index c5250db..a67f9f5 100644 --- a/gcc/ada/libgnat/s-vafi64.ads +++ b/gcc/ada/libgnat/s-vafi64.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valboo.adb b/gcc/ada/libgnat/s-valboo.adb index 4ec1e19..54b1265 100644 --- a/gcc/ada/libgnat/s-valboo.adb +++ b/gcc/ada/libgnat/s-valboo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,22 +29,35 @@ -- -- ------------------------------------------------------------------------------ +-- Ghost code, loop invariants and assertions in this unit are meant for +-- analysis only, not for run-time checking, as it would be too costly +-- otherwise. This is enforced by setting the assertion policy to Ignore. + +pragma Assertion_Policy (Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + with System.Val_Util; use System.Val_Util; -package body System.Val_Bool is +package body System.Val_Bool + with SPARK_Mode +is ------------------- -- Value_Boolean -- ------------------- function Value_Boolean (Str : String) return Boolean is - F : Natural; - L : Natural; + F : Integer; + L : Integer; S : String (Str'Range) := Str; begin Normalize_String (S, F, L); + pragma Assert (F = System.Val_Util.First_Non_Space_Ghost + (S, Str'First, Str'Last)); + if S (F .. L) = "TRUE" then return True; diff --git a/gcc/ada/libgnat/s-valboo.ads b/gcc/ada/libgnat/s-valboo.ads index 2129c5ac..a9afc45 100644 --- a/gcc/ada/libgnat/s-valboo.ads +++ b/gcc/ada/libgnat/s-valboo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,10 +29,62 @@ -- -- ------------------------------------------------------------------------------ -package System.Val_Bool is +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + +with System.Val_Util; + +package System.Val_Bool + with SPARK_Mode +is pragma Preelaborate; - function Value_Boolean (Str : String) return Boolean; + function Is_Boolean_Image_Ghost (Str : String) return Boolean is + (not System.Val_Util.Only_Space_Ghost (Str, Str'First, Str'Last) + and then + (declare + F : constant Positive := System.Val_Util.First_Non_Space_Ghost + (Str, Str'First, Str'Last); + begin + (F <= Str'Last - 3 + and then Str (F) in 't' | 'T' + and then Str (F + 1) in 'r' | 'R' + and then Str (F + 2) in 'u' | 'U' + and then Str (F + 3) in 'e' | 'E' + and then + (if F + 3 < Str'Last then + System.Val_Util.Only_Space_Ghost (Str, F + 4, Str'Last))) + or else + (F <= Str'Last - 4 + and then Str (F) in 'f' | 'F' + and then Str (F + 1) in 'a' | 'A' + and then Str (F + 2) in 'l' | 'L' + and then Str (F + 3) in 's' | 'S' + and then Str (F + 4) in 'e' | 'E' + and then + (if F + 4 < Str'Last then + System.Val_Util.Only_Space_Ghost (Str, F + 5, Str'Last))))) + with + Ghost; + -- Ghost function that returns True iff Str is the image of a boolean, that + -- is "true" or "false" in any capitalization, possibly surounded by space + -- characters. + + function Value_Boolean (Str : String) return Boolean + with + Pre => Is_Boolean_Image_Ghost (Str), + Post => + Value_Boolean'Result = + (Str (System.Val_Util.First_Non_Space_Ghost + (Str, Str'First, Str'Last)) in 't' | 'T'); -- Computes Boolean'Value (Str) end System.Val_Bool; diff --git a/gcc/ada/libgnat/s-valcha.adb b/gcc/ada/libgnat/s-valcha.adb index 587cdbb..4a39309 100644 --- a/gcc/ada/libgnat/s-valcha.adb +++ b/gcc/ada/libgnat/s-valcha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valcha.ads b/gcc/ada/libgnat/s-valcha.ads index ee3b037..265fa1f 100644 --- a/gcc/ada/libgnat/s-valcha.ads +++ b/gcc/ada/libgnat/s-valcha.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valflt.ads b/gcc/ada/libgnat/s-valflt.ads index 04ffb71..788dd8a 100644 --- a/gcc/ada/libgnat/s-valflt.ads +++ b/gcc/ada/libgnat/s-valflt.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valint.adb b/gcc/ada/libgnat/s-valint.adb index b3f0e29..71782ee 100644 --- a/gcc/ada/libgnat/s-valint.adb +++ b/gcc/ada/libgnat/s-valint.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valint.ads b/gcc/ada/libgnat/s-valint.ads index 702f7442..4fef265 100644 --- a/gcc/ada/libgnat/s-valint.ads +++ b/gcc/ada/libgnat/s-valint.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -43,10 +43,11 @@ package System.Val_Int is package Impl is new Value_I (Integer, Unsigned, Val_Uns.Scan_Raw_Unsigned); - function Scan_Integer + procedure Scan_Integer (Str : String; Ptr : not null access Integer; - Max : Integer) return Integer + Max : Integer; + Res : out Integer) renames Impl.Scan_Integer; function Value_Integer (Str : String) return Integer diff --git a/gcc/ada/libgnat/s-vallfl.ads b/gcc/ada/libgnat/s-vallfl.ads index 71da12a..cd894cd 100644 --- a/gcc/ada/libgnat/s-vallfl.ads +++ b/gcc/ada/libgnat/s-vallfl.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valllf.ads b/gcc/ada/libgnat/s-valllf.ads index 477ed4e..959a27d 100644 --- a/gcc/ada/libgnat/s-valllf.ads +++ b/gcc/ada/libgnat/s-valllf.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-vallli.adb b/gcc/ada/libgnat/s-vallli.adb index 4963c11..4535c5d 100644 --- a/gcc/ada/libgnat/s-vallli.adb +++ b/gcc/ada/libgnat/s-vallli.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-vallli.ads b/gcc/ada/libgnat/s-vallli.ads index f6527c2..ce1d9ee 100644 --- a/gcc/ada/libgnat/s-vallli.ads +++ b/gcc/ada/libgnat/s-vallli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -46,10 +46,11 @@ package System.Val_LLI is Long_Long_Unsigned, Val_LLU.Scan_Raw_Long_Long_Unsigned); - function Scan_Long_Long_Integer + procedure Scan_Long_Long_Integer (Str : String; Ptr : not null access Integer; - Max : Integer) return Long_Long_Integer + Max : Integer; + Res : out Long_Long_Integer) renames Impl.Scan_Integer; function Value_Long_Long_Integer (Str : String) return Long_Long_Integer diff --git a/gcc/ada/libgnat/s-valllli.ads b/gcc/ada/libgnat/s-valllli.ads index 88aedaf..176000a 100644 --- a/gcc/ada/libgnat/s-valllli.ads +++ b/gcc/ada/libgnat/s-valllli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -46,10 +46,11 @@ package System.Val_LLLI is Long_Long_Long_Unsigned, Val_LLLU.Scan_Raw_Long_Long_Long_Unsigned); - function Scan_Long_Long_Long_Integer + procedure Scan_Long_Long_Long_Integer (Str : String; Ptr : not null access Integer; - Max : Integer) return Long_Long_Long_Integer + Max : Integer; + Res : out Long_Long_Long_Integer) renames Impl.Scan_Integer; function Value_Long_Long_Long_Integer diff --git a/gcc/ada/libgnat/s-vallllu.ads b/gcc/ada/libgnat/s-vallllu.ads index 2a1957a..c6c9ece 100644 --- a/gcc/ada/libgnat/s-vallllu.ads +++ b/gcc/ada/libgnat/s-vallllu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,26 +32,40 @@ -- This package contains routines for scanning modular Long_Long_Unsigned -- values for use in Text_IO.Modular_IO, and the Value attribute. +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore, + Subprogram_Variant => Ignore); + with System.Unsigned_Types; with System.Value_U; -package System.Val_LLLU is +package System.Val_LLLU with SPARK_Mode is pragma Preelaborate; subtype Long_Long_Long_Unsigned is Unsigned_Types.Long_Long_Long_Unsigned; package Impl is new Value_U (Long_Long_Long_Unsigned); - function Scan_Raw_Long_Long_Long_Unsigned + procedure Scan_Raw_Long_Long_Long_Unsigned (Str : String; Ptr : not null access Integer; - Max : Integer) return Long_Long_Long_Unsigned + Max : Integer; + Res : out Long_Long_Long_Unsigned) renames Impl.Scan_Raw_Unsigned; - function Scan_Long_Long_Long_Unsigned + procedure Scan_Long_Long_Long_Unsigned (Str : String; Ptr : not null access Integer; - Max : Integer) return Long_Long_Long_Unsigned + Max : Integer; + Res : out Long_Long_Long_Unsigned) renames Impl.Scan_Unsigned; function Value_Long_Long_Long_Unsigned diff --git a/gcc/ada/libgnat/s-valllu.adb b/gcc/ada/libgnat/s-valllu.adb index 67b6258..f46b1bd 100644 --- a/gcc/ada/libgnat/s-valllu.adb +++ b/gcc/ada/libgnat/s-valllu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valllu.ads b/gcc/ada/libgnat/s-valllu.ads index c282bc3..0a5cb34 100644 --- a/gcc/ada/libgnat/s-valllu.ads +++ b/gcc/ada/libgnat/s-valllu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,26 +32,40 @@ -- This package contains routines for scanning modular Long_Long_Unsigned -- values for use in Text_IO.Modular_IO, and the Value attribute. +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore, + Subprogram_Variant => Ignore); + with System.Unsigned_Types; with System.Value_U; -package System.Val_LLU is +package System.Val_LLU with SPARK_Mode is pragma Preelaborate; subtype Long_Long_Unsigned is Unsigned_Types.Long_Long_Unsigned; package Impl is new Value_U (Long_Long_Unsigned); - function Scan_Raw_Long_Long_Unsigned + procedure Scan_Raw_Long_Long_Unsigned (Str : String; Ptr : not null access Integer; - Max : Integer) return Long_Long_Unsigned + Max : Integer; + Res : out Long_Long_Unsigned) renames Impl.Scan_Raw_Unsigned; - function Scan_Long_Long_Unsigned + procedure Scan_Long_Long_Unsigned (Str : String; Ptr : not null access Integer; - Max : Integer) return Long_Long_Unsigned + Max : Integer; + Res : out Long_Long_Unsigned) renames Impl.Scan_Unsigned; function Value_Long_Long_Unsigned diff --git a/gcc/ada/libgnat/s-valrea.adb b/gcc/ada/libgnat/s-valrea.adb index bc5465c..c9e5505 100644 --- a/gcc/ada/libgnat/s-valrea.adb +++ b/gcc/ada/libgnat/s-valrea.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -63,19 +63,19 @@ package body System.Val_Real is -- index N is the largest K such that N**K <= Num'Last. Maxexp32 : constant array (Base_T) of Positive := - (2 => 127, 3 => 80, 4 => 63, 5 => 55, 6 => 49, + [2 => 127, 3 => 80, 4 => 63, 5 => 55, 6 => 49, 7 => 45, 8 => 42, 9 => 40, 10 => 38, 11 => 37, - 12 => 35, 13 => 34, 14 => 33, 15 => 32, 16 => 31); + 12 => 35, 13 => 34, 14 => 33, 15 => 32, 16 => 31]; Maxexp64 : constant array (Base_T) of Positive := - (2 => 1023, 3 => 646, 4 => 511, 5 => 441, 6 => 396, + [2 => 1023, 3 => 646, 4 => 511, 5 => 441, 6 => 396, 7 => 364, 8 => 341, 9 => 323, 10 => 308, 11 => 296, - 12 => 285, 13 => 276, 14 => 268, 15 => 262, 16 => 255); + 12 => 285, 13 => 276, 14 => 268, 15 => 262, 16 => 255]; Maxexp80 : constant array (Base_T) of Positive := - (2 => 16383, 3 => 10337, 4 => 8191, 5 => 7056, 6 => 6338, + [2 => 16383, 3 => 10337, 4 => 8191, 5 => 7056, 6 => 6338, 7 => 5836, 8 => 5461, 9 => 5168, 10 => 4932, 11 => 4736, - 12 => 4570, 13 => 4427, 14 => 4303, 15 => 4193, 16 => 4095); + 12 => 4570, 13 => 4427, 14 => 4303, 15 => 4193, 16 => 4095]; package Double_Real is new System.Double_Real (Num); use type Double_Real.Double_T; diff --git a/gcc/ada/libgnat/s-valrea.ads b/gcc/ada/libgnat/s-valrea.ads index e2613e0..1d55fc9 100644 --- a/gcc/ada/libgnat/s-valrea.ads +++ b/gcc/ada/libgnat/s-valrea.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valued.adb b/gcc/ada/libgnat/s-valued.adb index 100d870..c4a78a2 100644 --- a/gcc/ada/libgnat/s-valued.adb +++ b/gcc/ada/libgnat/s-valued.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -186,7 +186,7 @@ package body System.Value_D is elsif S > 0 then declare - LS : Integer := S; + LS : Integer := S; begin Y := Safe_Expont (B, LS, 10 ** Integer'Max (0, Scale)); @@ -232,7 +232,6 @@ package body System.Value_D is Base : Unsigned; ScaleB : Integer; Extra : Unsigned; - pragma Unreferenced (Extra); Minus : Boolean; Val : Uns; @@ -250,7 +249,6 @@ package body System.Value_D is Base : Unsigned; ScaleB : Integer; Extra : Unsigned; - pragma Unreferenced (Extra); Minus : Boolean; Val : Uns; diff --git a/gcc/ada/libgnat/s-valued.ads b/gcc/ada/libgnat/s-valued.ads index 54c34d1..6cc998a 100644 --- a/gcc/ada/libgnat/s-valued.ads +++ b/gcc/ada/libgnat/s-valued.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valuef.adb b/gcc/ada/libgnat/s-valuef.adb index 5ac5ff6..e252a28 100644 --- a/gcc/ada/libgnat/s-valuef.adb +++ b/gcc/ada/libgnat/s-valuef.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -255,7 +255,7 @@ package body System.Value_F is elsif ScaleB > 0 then declare - LS : Integer := ScaleB; + LS : Integer := ScaleB; begin Y := Safe_Expont (B, LS, Den); diff --git a/gcc/ada/libgnat/s-valuef.ads b/gcc/ada/libgnat/s-valuef.ads index 968d0cd..1c21ac2 100644 --- a/gcc/ada/libgnat/s-valuef.ads +++ b/gcc/ada/libgnat/s-valuef.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valuei.adb b/gcc/ada/libgnat/s-valuei.adb index 0ad66de..83828d3 100644 --- a/gcc/ada/libgnat/s-valuei.adb +++ b/gcc/ada/libgnat/s-valuei.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -37,10 +37,11 @@ package body System.Value_I is -- Scan_Integer -- ------------------ - function Scan_Integer + procedure Scan_Integer (Str : String; Ptr : not null access Integer; - Max : Integer) return Int + Max : Integer; + Res : out Int) is Uval : Uns; -- Unsigned result @@ -59,13 +60,13 @@ package body System.Value_I is Bad_Value (Str); end if; - Uval := Scan_Raw_Unsigned (Str, Ptr, Max); + Scan_Raw_Unsigned (Str, Ptr, Max, Uval); -- Deal with overflow cases, and also with largest negative number if Uval > Uns (Int'Last) then if Minus and then Uval = Uns (-(Int'First)) then - return Int'First; + Res := Int'First; else Bad_Value (Str); end if; @@ -73,12 +74,12 @@ package body System.Value_I is -- Negative values elsif Minus then - return -(Int (Uval)); + Res := -(Int (Uval)); -- Positive values else - return Int (Uval); + Res := Int (Uval); end if; end Scan_Integer; @@ -106,7 +107,7 @@ package body System.Value_I is V : Int; P : aliased Integer := Str'First; begin - V := Scan_Integer (Str, P'Access, Str'Last); + Scan_Integer (Str, P'Access, Str'Last, V); Scan_Trailing_Blanks (Str, P); return V; end; diff --git a/gcc/ada/libgnat/s-valuei.ads b/gcc/ada/libgnat/s-valuei.ads index 23dc8a8..e0a34d9 100644 --- a/gcc/ada/libgnat/s-valuei.ads +++ b/gcc/ada/libgnat/s-valuei.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -38,19 +38,21 @@ generic type Uns is mod <>; - with function Scan_Raw_Unsigned + with procedure Scan_Raw_Unsigned (Str : String; Ptr : not null access Integer; - Max : Integer) return Uns; + Max : Integer; + Res : out Uns); package System.Value_I is pragma Preelaborate; - function Scan_Integer + procedure Scan_Integer (Str : String; Ptr : not null access Integer; - Max : Integer) return Int; - -- This function scans the string starting at Str (Ptr.all) for a valid + Max : Integer; + Res : out Int); + -- This procedure scans the string starting at Str (Ptr.all) for a valid -- integer according to the syntax described in (RM 3.5(43)). The substring -- scanned extends no further than Str (Max). There are three cases for the -- return: diff --git a/gcc/ada/libgnat/s-valuen.adb b/gcc/ada/libgnat/s-valuen.adb index ef613a2..6c40f36 100644 --- a/gcc/ada/libgnat/s-valuen.adb +++ b/gcc/ada/libgnat/s-valuen.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valuen.ads b/gcc/ada/libgnat/s-valuen.ads index db8ad1d..49eaa29 100644 --- a/gcc/ada/libgnat/s-valuen.ads +++ b/gcc/ada/libgnat/s-valuen.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2021-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valuer.adb b/gcc/ada/libgnat/s-valuer.adb index ff78c4b..4b4e887 100644 --- a/gcc/ada/libgnat/s-valuer.adb +++ b/gcc/ada/libgnat/s-valuer.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -506,11 +506,12 @@ package body System.Value_R is -- Local copy of string pointer Start : Positive; - pragma Unreferenced (Start); Value : Uns; -- Mantissa as an Integer + Expon : Integer; + begin -- The default base is 10 @@ -643,7 +644,8 @@ package body System.Value_R is -- Update pointer and scan exponent Ptr.all := Index; - Scale := Scale + Scan_Exponent (Str, Ptr, Max, Real => True); + Scan_Exponent (Str, Ptr, Max, Expon, Real => True); + Scale := Scale + Expon; -- Here is where we check for a bad based number diff --git a/gcc/ada/libgnat/s-valuer.ads b/gcc/ada/libgnat/s-valuer.ads index a0103b8..3279090 100644 --- a/gcc/ada/libgnat/s-valuer.ads +++ b/gcc/ada/libgnat/s-valuer.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2020-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valueu.adb b/gcc/ada/libgnat/s-valueu.adb index b385a9b..991d4a5 100644 --- a/gcc/ada/libgnat/s-valueu.adb +++ b/gcc/ada/libgnat/s-valueu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,18 +29,220 @@ -- -- ------------------------------------------------------------------------------ -with System.Val_Util; use System.Val_Util; - package body System.Value_U is + -- Ghost code, loop invariants and assertions in this unit are meant for + -- analysis only, not for run-time checking, as it would be too costly + -- otherwise. This is enforced by setting the assertion policy to Ignore. + + pragma Assertion_Policy (Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore, + Assert_And_Cut => Ignore, + Subprogram_Variant => Ignore); + + -- Local lemmas + + procedure Lemma_Digit_Is_Before_Last + (Str : String; + P : Integer; + From : Integer; + To : Integer) + with Ghost, + Pre => Str'Last /= Positive'Last + and then From in Str'Range + and then To in From .. Str'Last + and then Str (From) in '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' + and then P in From .. To + and then Str (P) in '0' .. '9' | 'a' .. 'f' | 'A' .. 'F', + Post => P /= Last_Hexa_Ghost (Str (From .. To)) + 1; + -- If the character at position P is a digit, P cannot be the position of + -- of the first non-digit in Str. + + procedure Lemma_End_Of_Scan + (Str : String; + From : Integer; + To : Integer; + Base : Uns; + Acc : Uns) + with Ghost, + Pre => Str'Last /= Positive'Last and then From > To, + Post => Scan_Based_Number_Ghost (Str, From, To, Base, Acc) = + (False, Acc); + -- Unfold the definition of Scan_Based_Number_Ghost on an empty string + + procedure Lemma_Scan_Digit + (Str : String; + P : Integer; + Lst : Integer; + Digit : Uns; + Base : Uns; + Old_Acc : Uns; + Acc : Uns; + Scan_Val : Uns_Option; + Old_Overflow : Boolean; + Overflow : Boolean) + with Ghost, + Pre => Str'Last /= Positive'Last + and then Lst in Str'Range + and then P in Str'First .. Lst + and then Str (P) in '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' + and then Digit = Hexa_To_Unsigned_Ghost (Str (P)) + and then Only_Hexa_Ghost (Str, P, Lst) + and then Base in 2 .. 16 + and then (if Digit < Base and then Old_Acc <= Uns'Last / Base + then Acc = Base * Old_Acc + Digit) + and then (if Digit >= Base + or else Old_Acc > Uns'Last / Base + or else (Old_Acc > (Uns'Last - Base + 1) / Base + and then Acc < Uns'Last / Base) + then Overflow + else Overflow = Old_Overflow) + and then + (if not Old_Overflow then + Scan_Val = Scan_Based_Number_Ghost + (Str, P, Lst, Base, Old_Acc)), + Post => + (if not Overflow then + Scan_Val = Scan_Based_Number_Ghost + (Str, P + 1, Lst, Base, Acc)) + and then + (if Overflow then Old_Overflow or else Scan_Val.Overflow); + -- Unfold the definition of Scan_Based_Number_Ghost when the string starts + -- with a digit. + + procedure Lemma_Scan_Underscore + (Str : String; + P : Integer; + From : Integer; + To : Integer; + Lst : Integer; + Base : Uns; + Acc : Uns; + Scan_Val : Uns_Option; + Overflow : Boolean; + Ext : Boolean) + with Ghost, + Pre => Str'Last /= Positive'Last + and then From in Str'Range + and then To in From .. Str'Last + and then Lst <= To + and then P in From .. Lst + 1 + and then P <= To + and then + (if Ext then + Is_Based_Format_Ghost (Str (From .. To)) + and then Lst = Last_Hexa_Ghost (Str (From .. To)) + else Is_Natural_Format_Ghost (Str (From .. To)) + and then Lst = Last_Number_Ghost (Str (From .. To))) + and then Str (P) = '_' + and then + (if not Overflow then + Scan_Val = Scan_Based_Number_Ghost (Str, P, Lst, Base, Acc)), + Post => P + 1 <= Lst + and then + (if Ext then Str (P + 1) in '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' + else Str (P + 1) in '0' .. '9') + and then + (if not Overflow then + Scan_Val = Scan_Based_Number_Ghost (Str, P + 1, Lst, Base, Acc)); + -- Unfold the definition of Scan_Based_Number_Ghost when the string starts + -- with an underscore. + + ----------------------------- + -- Local lemma null bodies -- + ----------------------------- + + procedure Lemma_Digit_Is_Before_Last + (Str : String; + P : Integer; + From : Integer; + To : Integer) + is null; + + procedure Lemma_End_Of_Scan + (Str : String; + From : Integer; + To : Integer; + Base : Uns; + Acc : Uns) + is null; + + procedure Lemma_Scan_Underscore + (Str : String; + P : Integer; + From : Integer; + To : Integer; + Lst : Integer; + Base : Uns; + Acc : Uns; + Scan_Val : Uns_Option; + Overflow : Boolean; + Ext : Boolean) + is null; + + --------------------- + -- Last_Hexa_Ghost -- + --------------------- + + function Last_Hexa_Ghost (Str : String) return Positive is + begin + for J in Str'Range loop + if Str (J) not in '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' | '_' then + return J - 1; + end if; + + pragma Loop_Invariant + (for all K in Str'First .. J => + Str (K) in '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' | '_'); + end loop; + + return Str'Last; + end Last_Hexa_Ghost; + + ---------------------- + -- Lemma_Scan_Digit -- + ---------------------- + + procedure Lemma_Scan_Digit + (Str : String; + P : Integer; + Lst : Integer; + Digit : Uns; + Base : Uns; + Old_Acc : Uns; + Acc : Uns; + Scan_Val : Uns_Option; + Old_Overflow : Boolean; + Overflow : Boolean) + is + pragma Unreferenced (Str, P, Lst, Scan_Val, Overflow, Old_Overflow); + begin + if Digit >= Base then + null; + + elsif Old_Acc <= (Uns'Last - Base + 1) / Base then + pragma Assert (not Scan_Overflows_Ghost (Digit, Base, Old_Acc)); + + elsif Old_Acc > Uns'Last / Base then + null; + + else + pragma Assert + ((Acc < Uns'Last / Base) = + Scan_Overflows_Ghost (Digit, Base, Old_Acc)); + end if; + end Lemma_Scan_Digit; + ----------------------- -- Scan_Raw_Unsigned -- ----------------------- - function Scan_Raw_Unsigned + procedure Scan_Raw_Unsigned (Str : String; Ptr : not null access Integer; - Max : Integer) return Uns + Max : Integer; + Res : out Uns) is P : Integer; -- Local copy of the pointer @@ -63,6 +265,40 @@ package body System.Value_U is Digit : Uns; -- Digit value + Ptr_Old : constant Integer := Ptr.all + with Ghost; + Last_Num_Init : constant Integer := + Last_Number_Ghost (Str (Ptr.all .. Max)) + with Ghost; + Init_Val : constant Uns_Option := + Scan_Based_Number_Ghost (Str, Ptr.all, Last_Num_Init) + with Ghost; + Starts_As_Based : constant Boolean := + Last_Num_Init < Max - 1 + and then Str (Last_Num_Init + 1) in '#' | ':' + and then Str (Last_Num_Init + 2) in + '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' + with Ghost; + Last_Num_Based : constant Integer := + (if Starts_As_Based + then Last_Hexa_Ghost (Str (Last_Num_Init + 2 .. Max)) + else Last_Num_Init) + with Ghost; + Is_Based : constant Boolean := + Starts_As_Based + and then Last_Num_Based < Max + and then Str (Last_Num_Based + 1) = Str (Last_Num_Init + 1) + with Ghost; + Based_Val : constant Uns_Option := + (if Starts_As_Based and then not Init_Val.Overflow + then Scan_Based_Number_Ghost + (Str, Last_Num_Init + 2, Last_Num_Based, Init_Val.Value) + else Init_Val) + with Ghost; + First_Exp : constant Integer := + (if Is_Based then Last_Num_Based + 2 else Last_Num_Init + 1) + with Ghost; + begin -- We do not tolerate strings with Str'Last = Positive'Last @@ -85,9 +321,20 @@ package body System.Value_U is Umax10 : constant Uns := Uns'Last / 10; -- Numbers bigger than Umax10 overflow if multiplied by 10 + Old_Uval : Uns with Ghost; + Old_Overflow : Boolean with Ghost; + begin -- Loop through decimal digits loop + pragma Loop_Invariant (P in P'Loop_Entry .. Last_Num_Init + 1); + pragma Loop_Invariant + (if Overflow then Init_Val.Overflow); + pragma Loop_Invariant + (if not Overflow + then Init_Val = Scan_Based_Number_Ghost + (Str, P, Last_Num_Init, Acc => Uval)); + exit when P > Max; Digit := Character'Pos (Str (P)) - Character'Pos ('0'); @@ -96,6 +343,9 @@ package body System.Value_U is if Digit > 9 then if Str (P) = '_' then + Lemma_Scan_Underscore + (Str, P, Ptr_Old, Max, Last_Num_Init, 10, Uval, + Init_Val, Overflow, False); Scan_Underscore (Str, P, Ptr, Max, False); else exit; @@ -104,6 +354,9 @@ package body System.Value_U is -- Accumulate result, checking for overflow else + Old_Uval := Uval; + Old_Overflow := Overflow; + if Uval <= Umax then Uval := 10 * Uval + Digit; @@ -118,11 +371,22 @@ package body System.Value_U is end if; end if; + Lemma_Scan_Digit + (Str, P, Last_Num_Init, Digit, 10, Old_Uval, Uval, Init_Val, + Old_Overflow, Overflow); + P := P + 1; end if; end loop; + pragma Assert (P = Last_Num_Init + 1); + pragma Assert (Init_Val.Overflow = Overflow); end; + pragma Assert_And_Cut + (P = Last_Num_Init + 1 + and then Overflow = Init_Val.Overflow + and then (if not Overflow then Init_Val.Value = Uval)); + Ptr.all := P; -- Deal with based case. We recognize either the standard '#' or the @@ -153,10 +417,18 @@ package body System.Value_U is UmaxB : constant Uns := Uns'Last / Base; -- Numbers bigger than UmaxB overflow if multiplied by base + Old_Uval : Uns with Ghost; + Old_Overflow : Boolean with Ghost; + begin + pragma Assert + (if Str (P) in '0' .. '9' | 'A' .. 'F' | 'a' .. 'f' + then Is_Based_Format_Ghost (Str (P .. Max))); + -- Loop to scan out based integer value loop + -- We require a digit at this stage if Str (P) in '0' .. '9' then @@ -177,9 +449,32 @@ package body System.Value_U is else Uval := Base; + Base := 10; + pragma Assert (Ptr.all = Last_Num_Init + 1); + pragma Assert (if not Overflow then Uval = Init_Val.Value); exit; end if; + Lemma_Digit_Is_Before_Last (Str, P, Last_Num_Init + 2, Max); + + pragma Loop_Invariant (P in P'Loop_Entry .. Last_Num_Based); + pragma Loop_Invariant + (Str (P) in '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' + and then Digit = Hexa_To_Unsigned_Ghost (Str (P))); + pragma Loop_Invariant + (if Overflow'Loop_Entry then Overflow); + pragma Loop_Invariant + (if Overflow then + Overflow'Loop_Entry or else Based_Val.Overflow); + pragma Loop_Invariant + (if not Overflow + then Based_Val = Scan_Based_Number_Ghost + (Str, P, Last_Num_Based, Base, Uval)); + pragma Loop_Invariant (Ptr.all = Last_Num_Init + 1); + + Old_Uval := Uval; + Old_Overflow := Overflow; + -- If digit is too large, just signal overflow and continue. -- The idea here is to keep scanning as long as the input is -- syntactically valid, even if we have detected overflow @@ -203,6 +498,10 @@ package body System.Value_U is end if; end if; + Lemma_Scan_Digit + (Str, P, Last_Num_Based, Digit, Base, Old_Uval, Uval, + Based_Val, Old_Overflow, Overflow); + -- If at end of string with no base char, not a based number -- but we signal Constraint_Error and set the pointer past -- the end of the field, since this is what the ACVC tests @@ -219,22 +518,61 @@ package body System.Value_U is if Str (P) = Base_Char then Ptr.all := P + 1; + pragma Assert (Ptr.all = Last_Num_Based + 2); + Lemma_End_Of_Scan (Str, P, Last_Num_Based, Base, Uval); + pragma Assert (if not Overflow then Uval = Based_Val.Value); exit; -- Deal with underscore elsif Str (P) = '_' then + Lemma_Scan_Underscore + (Str, P, Last_Num_Init + 2, Max, Last_Num_Based, Base, + Uval, Based_Val, Overflow, True); Scan_Underscore (Str, P, Ptr, Max, True); + pragma Assert + (if not Overflow + then Based_Val = Scan_Based_Number_Ghost + (Str, P, Last_Num_Based, Base, Uval)); end if; - end loop; end; + pragma Assert + (if Starts_As_Based then P = Last_Num_Based + 1 + else P = Last_Num_Init + 2); + pragma Assert + (Overflow = + (Init_Val.Overflow + or else Init_Val.Value not in 2 .. 16 + or else (Starts_As_Based and then Based_Val.Overflow))); end if; + pragma Assert_And_Cut + (Overflow = + (Init_Val.Overflow + or else + (Last_Num_Init < Max - 1 + and then Str (Last_Num_Init + 1) in '#' | ':' + and then Init_Val.Value not in 2 .. 16) + or else (Starts_As_Based and then Based_Val.Overflow)) + and then + (if not Overflow then + (if Is_Based then Uval = Based_Val.Value + else Uval = Init_Val.Value)) + and then Ptr.all = First_Exp + and then Base in 2 .. 16 + and then + (if not Overflow then + (if Is_Based then Base = Init_Val.Value else Base = 10))); + -- Come here with scanned unsigned value in Uval. The only remaining -- required step is to deal with exponent if one is present. - Expon := Scan_Exponent (Str, Ptr, Max); + Scan_Exponent (Str, Ptr, Max, Expon); + + pragma Assert + (if Starts_As_Exponent_Format_Ghost (Str (First_Exp .. Max)) + then Expon = Scan_Exponent_Ghost (Str (First_Exp .. Max))); if Expon /= 0 and then Uval /= 0 then @@ -246,8 +584,24 @@ package body System.Value_U is UmaxB : constant Uns := Uns'Last / Base; -- Numbers bigger than UmaxB overflow if multiplied by base + Res_Val : constant Uns_Option := + Exponent_Unsigned_Ghost (Uval, Expon, Base) + with Ghost; begin for J in 1 .. Expon loop + pragma Loop_Invariant + (if Overflow'Loop_Entry then Overflow); + pragma Loop_Invariant + (if Overflow + then Overflow'Loop_Entry or else Res_Val.Overflow); + pragma Loop_Invariant + (if not Overflow + then Res_Val = Exponent_Unsigned_Ghost + (Uval, Expon - J + 1, Base)); + + pragma Assert + ((Uval > UmaxB) = Scan_Overflows_Ghost (0, Base, Uval)); + if Uval > UmaxB then Overflow := True; exit; @@ -255,15 +609,45 @@ package body System.Value_U is Uval := Uval * Base; end loop; + pragma Assert + (Overflow = (Init_Val.Overflow + or else + (Last_Num_Init < Max - 1 + and then Str (Last_Num_Init + 1) in '#' | ':' + and then Init_Val.Value not in 2 .. 16) + or else (Starts_As_Based and then Based_Val.Overflow) + or else Res_Val.Overflow)); + pragma Assert + (Overflow = Raw_Unsigned_Overflows_Ghost (Str, Ptr_Old, Max)); + pragma Assert + (Exponent_Unsigned_Ghost (Uval, 0, Base) = (False, Uval)); + pragma Assert + (if not Overflow then Uval = Res_Val.Value); + pragma Assert + (if not Overflow then + Uval = Scan_Raw_Unsigned_Ghost (Str, Ptr_Old, Max)); end; end if; + pragma Assert + (if Expon = 0 or else Uval = 0 then + Exponent_Unsigned_Ghost (Uval, Expon, Base) = (False, Uval)); + pragma Assert + (Overflow = Raw_Unsigned_Overflows_Ghost (Str, Ptr_Old, Max)); + pragma Assert + (if not Overflow then + Uval = Scan_Raw_Unsigned_Ghost (Str, Ptr_Old, Max)); - -- Return result, dealing with sign and overflow + -- Return result, dealing with overflow if Overflow then Bad_Value (Str); + pragma Annotate + (GNATprove, Intentional, + "call to nonreturning subprogram might be executed", + "it is expected that Constraint_Error is raised in case of" + & " overflow"); else - return Uval; + Res := Uval; end if; end Scan_Raw_Unsigned; @@ -271,23 +655,30 @@ package body System.Value_U is -- Scan_Unsigned -- ------------------- - function Scan_Unsigned + procedure Scan_Unsigned (Str : String; Ptr : not null access Integer; - Max : Integer) return Uns + Max : Integer; + Res : out Uns) is Start : Positive; -- Save location of first non-blank character begin + pragma Warnings + (Off, + """Start"" is set by ""Scan_Plus_Sign"" but not used after the call"); Scan_Plus_Sign (Str, Ptr, Max, Start); + pragma Warnings + (On, + """Start"" is set by ""Scan_Plus_Sign"" but not used after the call"); if Str (Ptr.all) not in '0' .. '9' then Ptr.all := Start; Bad_Value (Str); end if; - return Scan_Raw_Unsigned (Str, Ptr, Max); + Scan_Raw_Unsigned (Str, Ptr, Max, Res); end Scan_Unsigned; -------------------- @@ -313,9 +704,32 @@ package body System.Value_U is declare V : Uns; P : aliased Integer := Str'First; + + Non_Blank : constant Positive := First_Non_Space_Ghost + (Str, Str'First, Str'Last) + with Ghost; + Fst_Num : constant Positive := + (if Str (Non_Blank) = '+' then Non_Blank + 1 else Non_Blank) + with Ghost; begin - V := Scan_Unsigned (Str, P'Access, Str'Last); + pragma Assert + (Is_Raw_Unsigned_Format_Ghost (Str (Fst_Num .. Str'Last))); + + declare + P_Acc : constant not null access Integer := P'Access; + begin + Scan_Unsigned (Str, P_Acc, Str'Last, V); + end; + + pragma Assert + (P = Raw_Unsigned_Last_Ghost (Str, Fst_Num, Str'Last)); + pragma Assert + (V = Scan_Raw_Unsigned_Ghost (Str, Fst_Num, Str'Last)); + Scan_Trailing_Blanks (Str, P); + + pragma Assert + (Is_Value_Unsigned_Ghost (Slide_If_Necessary (Str), V)); return V; end; end if; diff --git a/gcc/ada/libgnat/s-valueu.ads b/gcc/ada/libgnat/s-valueu.ads index 5dd8cd4..b0e3b1e 100644 --- a/gcc/ada/libgnat/s-valueu.ads +++ b/gcc/ada/libgnat/s-valueu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,6 +32,22 @@ -- This package contains routines for scanning modular Unsigned -- values for use in Text_IO.Modular_IO, and the Value attribute. +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore, + Subprogram_Variant => Ignore); +pragma Warnings (Off, "postcondition does not mention function result"); +-- True postconditions are used to avoid inlining for GNATprove + +with System.Val_Util; use System.Val_Util; + generic type Uns is mod <>; @@ -39,10 +55,314 @@ generic package System.Value_U is pragma Preelaborate; - function Scan_Raw_Unsigned + type Uns_Option (Overflow : Boolean := False) is record + case Overflow is + when True => + null; + when False => + Value : Uns := 0; + end case; + end record with Ghost; + + function Only_Hexa_Ghost (Str : String; From, To : Integer) return Boolean + is + (for all J in From .. To => + Str (J) in '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' | '_') + with + Ghost, + Pre => From > To or else (From >= Str'First and then To <= Str'Last); + -- Ghost function that returns True if S has only hexadecimal characters + -- from index From to index To. + + function Last_Hexa_Ghost (Str : String) return Positive + with + Ghost, + Pre => Str /= "" + and then Str (Str'First) in '0' .. '9' | 'a' .. 'f' | 'A' .. 'F', + Post => Last_Hexa_Ghost'Result in Str'Range + and then (if Last_Hexa_Ghost'Result < Str'Last then + Str (Last_Hexa_Ghost'Result + 1) not in + '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' | '_') + and then Only_Hexa_Ghost (Str, Str'First, Last_Hexa_Ghost'Result); + -- Ghost function that returns the index of the last character in S that + -- is either an hexadecimal digit or an underscore, which necessarily + -- exists given the precondition on Str. + + function Is_Based_Format_Ghost (Str : String) return Boolean + is + (Str /= "" + and then Str (Str'First) in '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' + and then + (declare + L : constant Positive := Last_Hexa_Ghost (Str); + begin + Str (L) /= '_' + and then (for all J in Str'First .. L => + (if Str (J) = '_' then Str (J + 1) /= '_')))) + with + Ghost; + -- Ghost function that determines if Str has the correct format for a + -- based number, consisting in a sequence of hexadecimal digits possibly + -- separated by single underscores. It may be followed by other characters. + + function Hexa_To_Unsigned_Ghost (X : Character) return Uns is + (case X is + when '0' .. '9' => Character'Pos (X) - Character'Pos ('0'), + when 'a' .. 'f' => Character'Pos (X) - Character'Pos ('a') + 10, + when 'A' .. 'F' => Character'Pos (X) - Character'Pos ('A') + 10, + when others => raise Program_Error) + with + Ghost, + Pre => X in '0' .. '9' | 'a' .. 'f' | 'A' .. 'F'; + -- Ghost function that computes the value corresponding to an hexadecimal + -- digit. + + function Scan_Overflows_Ghost + (Digit : Uns; + Base : Uns; + Acc : Uns) return Boolean + is + (Digit >= Base + or else Acc > Uns'Last / Base + or else Uns'Last - Digit < Base * Acc) + with Ghost; + -- Ghost function which returns True if Digit + Base * Acc overflows or + -- Digit is greater than Base, as this is used by the algorithm for the + -- test of overflow. + + function Scan_Based_Number_Ghost + (Str : String; + From, To : Integer; + Base : Uns := 10; + Acc : Uns := 0) return Uns_Option + with + Ghost, + Subprogram_Variant => (Increases => From), + Pre => Str'Last /= Positive'Last + and then + (From > To or else (From >= Str'First and then To <= Str'Last)) + and then Only_Hexa_Ghost (Str, From, To); + -- Ghost function that recursively computes the based number in Str, + -- assuming Acc has been scanned already and scanning continues at index + -- From. + + function Exponent_Unsigned_Ghost + (Value : Uns; + Exp : Natural; + Base : Uns := 10) return Uns_Option + with + Ghost, + Subprogram_Variant => (Decreases => Exp); + -- Ghost function that recursively computes Value * Base ** Exp + + function Is_Raw_Unsigned_Format_Ghost (Str : String) return Boolean is + (Is_Natural_Format_Ghost (Str) + and then + (declare + Last_Num_Init : constant Integer := Last_Number_Ghost (Str); + Starts_As_Based : constant Boolean := + Last_Num_Init < Str'Last - 1 + and then Str (Last_Num_Init + 1) in '#' | ':' + and then Str (Last_Num_Init + 2) in + '0' .. '9' | 'a' .. 'f' | 'A' .. 'F'; + Last_Num_Based : constant Integer := + (if Starts_As_Based + then Last_Hexa_Ghost (Str (Last_Num_Init + 2 .. Str'Last)) + else Last_Num_Init); + Is_Based : constant Boolean := + Starts_As_Based + and then Last_Num_Based < Str'Last + and then Str (Last_Num_Based + 1) = Str (Last_Num_Init + 1); + First_Exp : constant Integer := + (if Is_Based then Last_Num_Based + 2 else Last_Num_Init + 1); + begin + (if Starts_As_Based then + Is_Based_Format_Ghost (Str (Last_Num_Init + 2 .. Str'Last)) + and then Last_Num_Based < Str'Last) + and then Is_Opt_Exponent_Format_Ghost + (Str (First_Exp .. Str'Last)))) + with + Ghost, + Pre => Str'Last /= Positive'Last, + Post => True; + -- Ghost function that determines if Str has the correct format for an + -- unsigned number without a sign character. + -- It is a natural number in base 10, optionally followed by a based + -- number surrounded by delimiters # or :, optionally followed by an + -- exponent part. + + function Raw_Unsigned_Overflows_Ghost + (Str : String; + From, To : Integer) + return Boolean + is + (declare + Last_Num_Init : constant Integer := + Last_Number_Ghost (Str (From .. To)); + Init_Val : constant Uns_Option := + Scan_Based_Number_Ghost (Str, From, Last_Num_Init); + Starts_As_Based : constant Boolean := + Last_Num_Init < To - 1 + and then Str (Last_Num_Init + 1) in '#' | ':' + and then Str (Last_Num_Init + 2) in + '0' .. '9' | 'a' .. 'f' | 'A' .. 'F'; + Last_Num_Based : constant Integer := + (if Starts_As_Based + then Last_Hexa_Ghost (Str (Last_Num_Init + 2 .. To)) + else Last_Num_Init); + Is_Based : constant Boolean := + Starts_As_Based + and then Last_Num_Based < To + and then Str (Last_Num_Based + 1) = Str (Last_Num_Init + 1); + Based_Val : constant Uns_Option := + (if Starts_As_Based and then not Init_Val.Overflow + then Scan_Based_Number_Ghost + (Str, Last_Num_Init + 2, Last_Num_Based, Init_Val.Value) + else Init_Val); + First_Exp : constant Integer := + (if Is_Based then Last_Num_Based + 2 else Last_Num_Init + 1); + Expon : constant Natural := + (if Starts_As_Exponent_Format_Ghost (Str (First_Exp .. To)) + then Scan_Exponent_Ghost (Str (First_Exp .. To)) + else 0); + begin + Init_Val.Overflow + or else + (Last_Num_Init < To - 1 + and then Str (Last_Num_Init + 1) in '#' | ':' + and then Init_Val.Value not in 2 .. 16) + or else + (Starts_As_Based + and then Based_Val.Overflow) + or else + (Starts_As_Exponent_Format_Ghost (Str (First_Exp .. To)) + and then + (declare + Base : constant Uns := + (if Is_Based then Init_Val.Value else 10); + Value : constant Uns := + (if Is_Based then Based_Val.Value else Init_Val.Value); + begin + Exponent_Unsigned_Ghost + (Value, Expon, Base).Overflow))) + with + Ghost, + Pre => Str'Last /= Positive'Last + and then From in Str'Range + and then To in From .. Str'Last + and then Str (From) in '0' .. '9', + Post => True; + -- Ghost function that determines if the computation of the unsigned number + -- represented by Str will overflow. The computation overflows if either: + -- * The computation of the decimal part overflows, + -- * The decimal part is followed by a valid delimiter for a based + -- part, and the number corresponding to the base is not a valid base, + -- * The computation of the based part overflows, or + -- * There is an exponent and the computation of the exponentiation + -- overflows. + + function Scan_Raw_Unsigned_Ghost + (Str : String; + From, To : Integer) + return Uns + is + (declare + Last_Num_Init : constant Integer := + Last_Number_Ghost (Str (From .. To)); + Init_Val : constant Uns_Option := + Scan_Based_Number_Ghost (Str, From, Last_Num_Init); + Starts_As_Based : constant Boolean := + Last_Num_Init < To - 1 + and then Str (Last_Num_Init + 1) in '#' | ':' + and then Str (Last_Num_Init + 2) in + '0' .. '9' | 'a' .. 'f' | 'A' .. 'F'; + Last_Num_Based : constant Integer := + (if Starts_As_Based + then Last_Hexa_Ghost (Str (Last_Num_Init + 2 .. To)) + else Last_Num_Init); + Is_Based : constant Boolean := + Starts_As_Based + and then Last_Num_Based < To + and then Str (Last_Num_Based + 1) = Str (Last_Num_Init + 1); + Based_Val : constant Uns_Option := + (if Starts_As_Based and then not Init_Val.Overflow + then Scan_Based_Number_Ghost + (Str, Last_Num_Init + 2, Last_Num_Based, Init_Val.Value) + else Init_Val); + First_Exp : constant Integer := + (if Is_Based then Last_Num_Based + 2 else Last_Num_Init + 1); + Expon : constant Natural := + (if Starts_As_Exponent_Format_Ghost (Str (First_Exp .. To)) + then Scan_Exponent_Ghost (Str (First_Exp .. To)) + else 0); + Base : constant Uns := + (if Is_Based then Init_Val.Value else 10); + Value : constant Uns := + (if Is_Based then Based_Val.Value else Init_Val.Value); + begin + Exponent_Unsigned_Ghost (Value, Expon, Base).Value) + with + Ghost, + Pre => Str'Last /= Positive'Last + and then From in Str'Range + and then To in From .. Str'Last + and then Str (From) in '0' .. '9' + and then not Raw_Unsigned_Overflows_Ghost (Str, From, To), + Post => True; + -- Ghost function that scans an unsigned number without a sign character + + function Raw_Unsigned_Last_Ghost + (Str : String; + From, To : Integer) + return Positive + is + (declare + Last_Num_Init : constant Integer := + Last_Number_Ghost (Str (From .. To)); + Starts_As_Based : constant Boolean := + Last_Num_Init < To - 1 + and then Str (Last_Num_Init + 1) in '#' | ':' + and then Str (Last_Num_Init + 2) in + '0' .. '9' | 'a' .. 'f' | 'A' .. 'F'; + Last_Num_Based : constant Integer := + (if Starts_As_Based + then Last_Hexa_Ghost (Str (Last_Num_Init + 2 .. To)) + else Last_Num_Init); + Is_Based : constant Boolean := + Starts_As_Based + and then Last_Num_Based < To + and then Str (Last_Num_Based + 1) = Str (Last_Num_Init + 1); + First_Exp : constant Integer := + (if Is_Based then Last_Num_Based + 2 else Last_Num_Init + 1); + begin + (if not Starts_As_Exponent_Format_Ghost (Str (First_Exp .. To)) + then First_Exp + elsif Str (First_Exp + 1) in '-' | '+' then + Last_Number_Ghost (Str (First_Exp + 2 .. To)) + 1 + else Last_Number_Ghost (Str (First_Exp + 1 .. To)) + 1)) + with + Ghost, + Pre => Str'Last /= Positive'Last + and then From in Str'Range + and then To in From .. Str'Last + and then Str (From) in '0' .. '9', + Post => Raw_Unsigned_Last_Ghost'Result in From .. To + 1; + -- Ghost function that returns the position of the cursor once an unsigned + -- number has been seen. + + procedure Scan_Raw_Unsigned (Str : String; Ptr : not null access Integer; - Max : Integer) return Uns; + Max : Integer; + Res : out Uns) + with Pre => Str'Last /= Positive'Last + and then Ptr.all in Str'Range + and then Max in Ptr.all .. Str'Last + and then Is_Raw_Unsigned_Format_Ghost (Str (Ptr.all .. Max)), + Post => not Raw_Unsigned_Overflows_Ghost (Str, Ptr.all'Old, Max) + and Res = Scan_Raw_Unsigned_Ghost (Str, Ptr.all'Old, Max) + and Ptr.all = Raw_Unsigned_Last_Ghost (Str, Ptr.all'Old, Max); + -- This function scans the string starting at Str (Ptr.all) for a valid -- integer according to the syntax described in (RM 3.5(43)). The substring -- scanned extends no further than Str (Max). Note: this does not scan @@ -106,26 +426,158 @@ package System.Value_U is -- Note: if Str is empty, i.e. if Max is less than Ptr, then this is a -- special case of an all-blank string, and Ptr is unchanged, and hence -- is greater than Max as required in this case. + -- ??? This is not the case. We will read Str (Ptr.all) without checking + -- and increase Ptr.all by one. -- -- Note: this routine should not be called with Str'Last = Positive'Last. -- If this occurs Program_Error is raised with a message noting that this -- case is not supported. Most such cases are eliminated by the caller. - function Scan_Unsigned + procedure Scan_Unsigned (Str : String; Ptr : not null access Integer; - Max : Integer) return Uns; + Max : Integer; + Res : out Uns) + with Pre => Str'Last /= Positive'Last + and then Ptr.all in Str'Range + and then Max in Ptr.all .. Str'Last + and then not Only_Space_Ghost (Str, Ptr.all, Max) + and then + (declare + Non_Blank : constant Positive := + First_Non_Space_Ghost (Str, Ptr.all, Max); + Fst_Num : constant Positive := + (if Str (Non_Blank) = '+' then Non_Blank + 1 else Non_Blank); + begin + Is_Raw_Unsigned_Format_Ghost (Str (Fst_Num .. Max))), + Post => + (declare + Non_Blank : constant Positive := + First_Non_Space_Ghost (Str, Ptr.all'Old, Max); + Fst_Num : constant Positive := + (if Str (Non_Blank) = '+' then Non_Blank + 1 else Non_Blank); + begin + not Raw_Unsigned_Overflows_Ghost (Str, Fst_Num, Max) + and then Res = Scan_Raw_Unsigned_Ghost (Str, Fst_Num, Max) + and then Ptr.all = Raw_Unsigned_Last_Ghost (Str, Fst_Num, Max)); + -- Same as Scan_Raw_Unsigned, except scans optional leading -- blanks, and an optional leading plus sign. -- -- Note: if a minus sign is present, Constraint_Error will be raised. -- Note: trailing blanks are not scanned. + function Slide_To_1 (Str : String) return String + with Ghost, + Post => + Only_Space_Ghost (Str, Str'First, Str'Last) = + (for all J in Str'First .. Str'Last => + Slide_To_1'Result (J - Str'First + 1) = ' '); + -- Slides Str so that it starts at 1 + + function Slide_If_Necessary (Str : String) return String is + (if Str'Last = Positive'Last then Slide_To_1 (Str) else Str) + with Ghost, + Post => + Only_Space_Ghost (Str, Str'First, Str'Last) = + Only_Space_Ghost (Slide_If_Necessary'Result, + Slide_If_Necessary'Result'First, + Slide_If_Necessary'Result'Last); + -- If Str'Last = Positive'Last then slides Str so that it starts at 1 + + function Is_Unsigned_Ghost (Str : String) return Boolean is + (declare + Non_Blank : constant Positive := First_Non_Space_Ghost + (Str, Str'First, Str'Last); + Fst_Num : constant Positive := + (if Str (Non_Blank) = '+' then Non_Blank + 1 else Non_Blank); + begin + Is_Raw_Unsigned_Format_Ghost (Str (Fst_Num .. Str'Last)) + and then not Raw_Unsigned_Overflows_Ghost (Str, Fst_Num, Str'Last) + and then Only_Space_Ghost + (Str, Raw_Unsigned_Last_Ghost (Str, Fst_Num, Str'Last), Str'Last)) + with Ghost, + Pre => not Only_Space_Ghost (Str, Str'First, Str'Last) + and then Str'Last /= Positive'Last, + Post => True; + -- Ghost function that determines if Str has the correct format for an + -- unsigned number, consisting in some blank characters, an optional + -- + sign, a raw unsigned number which does not overflow and then some + -- more blank characters. + + function Is_Value_Unsigned_Ghost (Str : String; Val : Uns) return Boolean is + (declare + Non_Blank : constant Positive := First_Non_Space_Ghost + (Str, Str'First, Str'Last); + Fst_Num : constant Positive := + (if Str (Non_Blank) = '+' then Non_Blank + 1 else Non_Blank); + begin + Val = Scan_Raw_Unsigned_Ghost (Str, Fst_Num, Str'Last)) + with Ghost, + Pre => not Only_Space_Ghost (Str, Str'First, Str'Last) + and then Str'Last /= Positive'Last + and then Is_Unsigned_Ghost (Str), + Post => True; + -- Ghost function that returns True if Val is the value corresponding to + -- the unsigned number represented by Str. + function Value_Unsigned - (Str : String) return Uns; + (Str : String) return Uns + with Pre => not Only_Space_Ghost (Str, Str'First, Str'Last) + and then Str'Length /= Positive'Last + and then Is_Unsigned_Ghost (Slide_If_Necessary (Str)), + Post => + Is_Value_Unsigned_Ghost + (Slide_If_Necessary (Str), Value_Unsigned'Result), + Subprogram_Variant => (Decreases => Str'First); -- Used in computing X'Value (Str) where X is a modular integer type whose -- modulus does not exceed the range of System.Unsigned_Types.Unsigned. Str -- is the string argument of the attribute. Constraint_Error is raised if -- the string is malformed, or if the value is out of range. +private + + ----------------------------- + -- Exponent_Unsigned_Ghost -- + ----------------------------- + + function Exponent_Unsigned_Ghost + (Value : Uns; + Exp : Natural; + Base : Uns := 10) return Uns_Option + is + (if Exp = 0 or Value = 0 then (Overflow => False, Value => Value) + elsif Scan_Overflows_Ghost (0, Base, Value) then (Overflow => True) + else Exponent_Unsigned_Ghost (Value * Base, Exp - 1, Base)); + + ----------------------------- + -- Scan_Based_Number_Ghost -- + ----------------------------- + + function Scan_Based_Number_Ghost + (Str : String; + From, To : Integer; + Base : Uns := 10; + Acc : Uns := 0) return Uns_Option + is + (if From > To then (Overflow => False, Value => Acc) + elsif Str (From) = '_' + then Scan_Based_Number_Ghost (Str, From + 1, To, Base, Acc) + elsif Scan_Overflows_Ghost + (Hexa_To_Unsigned_Ghost (Str (From)), Base, Acc) + then (Overflow => True) + else Scan_Based_Number_Ghost + (Str, From + 1, To, Base, + Base * Acc + Hexa_To_Unsigned_Ghost (Str (From)))); + + ---------------- + -- Slide_To_1 -- + ---------------- + + function Slide_To_1 (Str : String) return String is + (declare + Res : constant String (1 .. Str'Length) := Str; + begin + Res); + end System.Value_U; diff --git a/gcc/ada/libgnat/s-valuns.adb b/gcc/ada/libgnat/s-valuns.adb index 0d96d7b..4b6dc77 100644 --- a/gcc/ada/libgnat/s-valuns.adb +++ b/gcc/ada/libgnat/s-valuns.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valuns.ads b/gcc/ada/libgnat/s-valuns.ads index fb20913..23f73ed 100644 --- a/gcc/ada/libgnat/s-valuns.ads +++ b/gcc/ada/libgnat/s-valuns.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,26 +32,40 @@ -- This package contains routines for scanning modular Unsigned -- values for use in Text_IO.Modular_IO, and the Value attribute. +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore, + Subprogram_Variant => Ignore); + with System.Unsigned_Types; with System.Value_U; -package System.Val_Uns is +package System.Val_Uns with SPARK_Mode is pragma Preelaborate; subtype Unsigned is Unsigned_Types.Unsigned; package Impl is new Value_U (Unsigned); - function Scan_Raw_Unsigned + procedure Scan_Raw_Unsigned (Str : String; Ptr : not null access Integer; - Max : Integer) return Unsigned + Max : Integer; + Res : out Unsigned) renames Impl.Scan_Raw_Unsigned; - function Scan_Unsigned + procedure Scan_Unsigned (Str : String; Ptr : not null access Integer; - Max : Integer) return Unsigned + Max : Integer; + Res : out Unsigned) renames Impl.Scan_Unsigned; function Value_Unsigned diff --git a/gcc/ada/libgnat/s-valuti.adb b/gcc/ada/libgnat/s-valuti.adb index 31edc40..4da585a 100644 --- a/gcc/ada/libgnat/s-valuti.adb +++ b/gcc/ada/libgnat/s-valuti.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,15 +29,27 @@ -- -- ------------------------------------------------------------------------------ +-- Ghost code, loop invariants and assertions in this unit are meant for +-- analysis only, not for run-time checking, as it would be too costly +-- otherwise. This is enforced by setting the assertion policy to Ignore. + +pragma Assertion_Policy (Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + with System.Case_Util; use System.Case_Util; -package body System.Val_Util is +package body System.Val_Util + with SPARK_Mode +is --------------- -- Bad_Value -- --------------- procedure Bad_Value (S : String) is + pragma Annotate (GNATprove, Intentional, "exception might be raised", + "Intentional exception from Bad_Value"); begin -- Bad_Value might be called with very long strings allocated on the -- heap. Limit the size of the message so that we avoid creating a @@ -50,6 +62,44 @@ package body System.Val_Util is end if; end Bad_Value; + --------------------------- + -- First_Non_Space_Ghost -- + --------------------------- + + function First_Non_Space_Ghost + (S : String; + From, To : Integer) return Positive + is + begin + for J in From .. To loop + if S (J) /= ' ' then + return J; + end if; + + pragma Loop_Invariant (for all K in From .. J => S (K) = ' '); + end loop; + + raise Program_Error; + end First_Non_Space_Ghost; + + ----------------------- + -- Last_Number_Ghost -- + ----------------------- + + function Last_Number_Ghost (Str : String) return Positive is + begin + for J in Str'Range loop + if Str (J) not in '0' .. '9' | '_' then + return J - 1; + end if; + + pragma Loop_Invariant + (for all K in Str'First .. J => Str (K) in '0' .. '9' | '_'); + end loop; + + return Str'Last; + end Last_Number_Ghost; + ---------------------- -- Normalize_String -- ---------------------- @@ -62,21 +112,33 @@ package body System.Val_Util is F := S'First; L := S'Last; + -- Case of empty string + + if F > L then + return; + end if; + -- Scan for leading spaces - while F <= L and then S (F) = ' ' loop + while F < L and then S (F) = ' ' loop + pragma Loop_Invariant (F in S'First .. L - 1); + pragma Loop_Invariant (for all J in S'First .. F => S (J) = ' '); F := F + 1; end loop; - -- Case of no nonspace characters found + -- Case of no nonspace characters found. Decrease L to ensure L < F + -- without risking an overflow if F is Integer'Last. - if F > L then + if S (F) = ' ' then + L := L - 1; return; end if; -- Scan for trailing spaces while S (L) = ' ' loop + pragma Loop_Invariant (L in F + 1 .. S'Last); + pragma Loop_Invariant (for all J in L .. S'Last => S (J) = ' '); L := L - 1; end loop; @@ -85,6 +147,8 @@ package body System.Val_Util is if S (F) /= ''' then for J in F .. L loop S (J) := To_Upper (S (J)); + pragma Loop_Invariant + (for all K in F .. J => S (K) = To_Upper (S'Loop_Entry (K))); end loop; end if; end Normalize_String; @@ -93,13 +157,14 @@ package body System.Val_Util is -- Scan_Exponent -- ------------------- - function Scan_Exponent + procedure Scan_Exponent (Str : String; Ptr : not null access Integer; Max : Integer; - Real : Boolean := False) return Integer + Exp : out Integer; + Real : Boolean := False) is - P : Natural := Ptr.all; + P : Integer := Ptr.all; M : Boolean; X : Integer; @@ -107,8 +172,12 @@ package body System.Val_Util is if P >= Max or else (Str (P) /= 'E' and then Str (P) /= 'e') then - return 0; + Exp := 0; + return; end if; + pragma Annotate + (CodePeer, False_Positive, "test always false", + "the slice might be empty or not start with an 'e'"); -- We have an E/e, see if sign follows @@ -118,7 +187,8 @@ package body System.Val_Util is P := P + 1; if P > Max then - return 0; + Exp := 0; + return; else M := False; end if; @@ -127,7 +197,8 @@ package body System.Val_Util is P := P + 1; if P > Max or else not Real then - return 0; + Exp := 0; + return; else M := True; end if; @@ -137,7 +208,8 @@ package body System.Val_Util is end if; if Str (P) not in '0' .. '9' then - return 0; + Exp := 0; + return; end if; -- Scan out the exponent value as an unsigned integer. Values larger @@ -148,28 +220,47 @@ package body System.Val_Util is X := 0; - loop - if X < (Integer'Last / 10) then - X := X * 10 + (Character'Pos (Str (P)) - Character'Pos ('0')); - end if; + declare + Rest : constant String := Str (P .. Max) with Ghost; + Last : constant Natural := Last_Number_Ghost (Rest) with Ghost; - P := P + 1; + begin + pragma Assert (Is_Natural_Format_Ghost (Rest)); - exit when P > Max; + loop + pragma Assert (Str (P) in '0' .. '9'); - if Str (P) = '_' then - Scan_Underscore (Str, P, Ptr, Max, False); - else - exit when Str (P) not in '0' .. '9'; - end if; - end loop; + if X < (Integer'Last / 10) then + X := X * 10 + (Character'Pos (Str (P)) - Character'Pos ('0')); + end if; + + pragma Loop_Invariant (X >= 0); + pragma Loop_Invariant (P in Rest'First .. Last); + pragma Loop_Invariant (Str (P) in '0' .. '9'); + pragma Loop_Invariant + (Scan_Natural_Ghost (Rest, Rest'First, 0) + = Scan_Natural_Ghost (Rest, P + 1, X)); + + P := P + 1; + + exit when P > Max; + + if Str (P) = '_' then + Scan_Underscore (Str, P, Ptr, Max, False); + else + exit when Str (P) not in '0' .. '9'; + end if; + end loop; + + pragma Assert (P = Last + 1); + end; if M then X := -X; end if; Ptr.all := P; - return X; + Exp := X; end Scan_Exponent; -------------------- @@ -182,7 +273,7 @@ package body System.Val_Util is Max : Integer; Start : out Positive) is - P : Natural := Ptr.all; + P : Integer := Ptr.all; begin if P > Max then @@ -194,6 +285,12 @@ package body System.Val_Util is while Str (P) = ' ' loop P := P + 1; + pragma Loop_Invariant (Ptr.all = Ptr.all'Loop_Entry); + pragma Loop_Invariant (P in Ptr.all .. Max); + pragma Loop_Invariant (for some J in P .. Max => Str (J) /= ' '); + pragma Loop_Invariant + (for all J in Ptr.all .. P - 1 => Str (J) = ' '); + if P > Max then Ptr.all := P; Bad_Value (Str); @@ -202,6 +299,8 @@ package body System.Val_Util is Start := P; + pragma Assert (Start = First_Non_Space_Ghost (Str, Ptr.all, Max)); + -- Skip past an initial plus sign if Str (P) = '+' then @@ -227,7 +326,7 @@ package body System.Val_Util is Minus : out Boolean; Start : out Positive) is - P : Natural := Ptr.all; + P : Integer := Ptr.all; begin -- Deal with case of null string (all blanks). As per spec, we raise @@ -242,6 +341,12 @@ package body System.Val_Util is while Str (P) = ' ' loop P := P + 1; + pragma Loop_Invariant (Ptr.all = Ptr.all'Loop_Entry); + pragma Loop_Invariant (P in Ptr.all .. Max); + pragma Loop_Invariant (for some J in P .. Max => Str (J) /= ' '); + pragma Loop_Invariant + (for all J in Ptr.all .. P - 1 => Str (J) = ' '); + if P > Max then Ptr.all := P; Bad_Value (Str); @@ -250,6 +355,8 @@ package body System.Val_Util is Start := P; + pragma Assert (Start = First_Non_Space_Ghost (Str, Ptr.all, Max)); + -- Remember an initial minus sign if Str (P) = '-' then @@ -289,6 +396,8 @@ package body System.Val_Util is if Str (J) /= ' ' then Bad_Value (Str); end if; + + pragma Loop_Invariant (for all K in P .. J => Str (K) = ' '); end loop; end Scan_Trailing_Blanks; diff --git a/gcc/ada/libgnat/s-valuti.ads b/gcc/ada/libgnat/s-valuti.ads index 3d426d9..5c0f2a5 100644 --- a/gcc/ada/libgnat/s-valuti.ads +++ b/gcc/ada/libgnat/s-valuti.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,16 +31,79 @@ -- This package provides some common utilities used by the s-valxxx files -package System.Val_Util is - pragma Pure; +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. - procedure Bad_Value (S : String); +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); +pragma Warnings (Off, "postcondition does not mention function result"); +-- True postconditions are used to avoid inlining for GNATprove + +with System.Case_Util; + +package System.Val_Util + with SPARK_Mode, Pure +is + pragma Unevaluated_Use_Of_Old (Allow); + + procedure Bad_Value (S : String) + with + Depends => (null => S); pragma No_Return (Bad_Value); -- Raises constraint error with message: bad input for 'Value: "xxx" + function Only_Space_Ghost (S : String; From, To : Integer) return Boolean is + (for all J in From .. To => S (J) = ' ') + with + Ghost, + Pre => From > To or else (From >= S'First and then To <= S'Last), + Post => True; + -- Ghost function that returns True if S has only space characters from + -- index From to index To. + + function First_Non_Space_Ghost + (S : String; + From, To : Integer) return Positive + with + Ghost, + Pre => From in S'Range + and then To in S'Range + and then not Only_Space_Ghost (S, From, To), + Post => First_Non_Space_Ghost'Result in From .. To + and then S (First_Non_Space_Ghost'Result) /= ' ' + and then Only_Space_Ghost + (S, From, First_Non_Space_Ghost'Result - 1); + -- Ghost function that returns the index of the first non-space character + -- in S, which necessarily exists given the precondition on S. + procedure Normalize_String (S : in out String; - F, L : out Integer); + F, L : out Integer) + with + Post => (if Only_Space_Ghost (S'Old, S'First, S'Last) then + F > L + else + F >= S'First + and then L <= S'Last + and then F <= L + and then Only_Space_Ghost (S'Old, S'First, F - 1) + and then S'Old (F) /= ' ' + and then S'Old (L) /= ' ' + and then + (if L < S'Last then + Only_Space_Ghost (S'Old, L + 1, S'Last)) + and then + (if S'Old (F) /= ''' then + (for all J in S'Range => + (if J in F .. L then + S (J) = System.Case_Util.To_Upper (S'Old (J)) + else + S (J) = S'Old (J))))); -- This procedure scans the string S setting F to be the index of the first -- non-blank character of S and L to be the index of the last non-blank -- character of S. Any lower case characters present in S will be folded to @@ -52,7 +115,27 @@ package System.Val_Util is Ptr : not null access Integer; Max : Integer; Minus : out Boolean; - Start : out Positive); + Start : out Positive) + with + Pre => + -- Ptr.all .. Max is either an empty range, or a valid range in Str + (Ptr.all > Max or else (Ptr.all >= Str'First and then Max <= Str'Last)) + and then not Only_Space_Ghost (Str, Ptr.all, Max) + and then + (declare + F : constant Positive := + First_Non_Space_Ghost (Str, Ptr.all, Max); + begin + (if Str (F) in '+' | '-' then + F <= Max - 1 and then Str (F + 1) /= ' ')), + Post => + (declare + F : constant Positive := + First_Non_Space_Ghost (Str, Ptr.all'Old, Max); + begin + Minus = (Str (F) = '-') + and then Ptr.all = (if Str (F) in '+' | '-' then F + 1 else F) + and then Start = F); -- The Str, Ptr, Max parameters are as for the scan routines (Str is the -- string to be scanned starting at Ptr.all, and Max is the index of the -- last character in the string). Scan_Sign first scans out any initial @@ -77,15 +160,167 @@ package System.Val_Util is (Str : String; Ptr : not null access Integer; Max : Integer; - Start : out Positive); + Start : out Positive) + with + Pre => + -- Ptr.all .. Max is either an empty range, or a valid range in Str + (Ptr.all > Max or else (Ptr.all >= Str'First and then Max <= Str'Last)) + and then not Only_Space_Ghost (Str, Ptr.all, Max) + and then + (declare + F : constant Positive := + First_Non_Space_Ghost (Str, Ptr.all, Max); + begin + (if Str (F) = '+' then + F <= Max - 1 and then Str (F + 1) /= ' ')), + Post => + (declare + F : constant Positive := + First_Non_Space_Ghost (Str, Ptr.all'Old, Max); + begin + Ptr.all = (if Str (F) = '+' then F + 1 else F) + and then Start = F); -- Same as Scan_Sign, but allows only plus, not minus. This is used for -- modular types. - function Scan_Exponent + function Only_Number_Ghost (Str : String; From, To : Integer) return Boolean + is + (for all J in From .. To => Str (J) in '0' .. '9' | '_') + with + Ghost, + Pre => From > To or else (From >= Str'First and then To <= Str'Last); + -- Ghost function that returns True if S has only number characters from + -- index From to index To. + + function Last_Number_Ghost (Str : String) return Positive + with + Ghost, + Pre => Str /= "" and then Str (Str'First) in '0' .. '9', + Post => Last_Number_Ghost'Result in Str'Range + and then (if Last_Number_Ghost'Result < Str'Last then + Str (Last_Number_Ghost'Result + 1) not in '0' .. '9' | '_') + and then Only_Number_Ghost (Str, Str'First, Last_Number_Ghost'Result); + -- Ghost function that returns the index of the last character in S that + -- is either a figure or underscore, which necessarily exists given the + -- precondition on Str. + + function Is_Natural_Format_Ghost (Str : String) return Boolean is + (Str /= "" + and then Str (Str'First) in '0' .. '9' + and then + (declare + L : constant Positive := Last_Number_Ghost (Str); + begin + Str (L) in '0' .. '9' + and then (for all J in Str'First .. L => + (if Str (J) = '_' then Str (J + 1) /= '_')))) + with + Ghost; + -- Ghost function that determines if Str has the correct format for a + -- natural number, consisting in a sequence of figures possibly separated + -- by single underscores. It may be followed by other characters. + + function Starts_As_Exponent_Format_Ghost + (Str : String; + Real : Boolean := False) return Boolean + is + (Str'Length > 1 + and then Str (Str'First) in 'E' | 'e' + and then + (declare + Plus_Sign : constant Boolean := Str (Str'First + 1) = '+'; + Minus_Sign : constant Boolean := Str (Str'First + 1) = '-'; + Sign : constant Boolean := Plus_Sign or Minus_Sign; + begin + (if Minus_Sign then Real) + and then (if Sign then Str'Length > 2) + and then + (declare + Start : constant Natural := + (if Sign then Str'First + 2 else Str'First + 1); + begin + Str (Start) in '0' .. '9'))) + with + Ghost; + -- Ghost function that determines if Str is recognized as something which + -- might be an exponent, ie. it starts with an 'e', capitalized or not, + -- followed by an optional sign which can only be '-' if we are working on + -- real numbers (Real is True), and then a digit in decimal notation. + + function Is_Opt_Exponent_Format_Ghost + (Str : String; + Real : Boolean := False) return Boolean + is + (not Starts_As_Exponent_Format_Ghost (Str, Real) + or else + (declare + Start : constant Natural := + (if Str (Str'First + 1) in '+' | '-' then Str'First + 2 + else Str'First + 1); + begin Is_Natural_Format_Ghost (Str (Start .. Str'Last)))) + with + Ghost; + -- Ghost function that determines if Str has the correct format for an + -- optional exponent, that is, either it does not start as an exponent, or + -- it is in a correct format for a natural number. + + function Scan_Natural_Ghost + (Str : String; + P : Natural; + Acc : Natural) + return Natural + with + Ghost, + Subprogram_Variant => (Increases => P), + Pre => Str /= "" and then Str (Str'First) in '0' .. '9' + and then Str'Last < Natural'Last + and then P in Str'First .. Last_Number_Ghost (Str) + 1; + -- Ghost function that recursively computes the natural number in Str, up + -- to the first number greater or equal to Natural'Last / 10, assuming Acc + -- has been scanned already and scanning continues at index P. + + function Scan_Exponent_Ghost + (Str : String; + Real : Boolean := False) + return Integer + is + (declare + Plus_Sign : constant Boolean := Str (Str'First + 1) = '+'; + Minus_Sign : constant Boolean := Str (Str'First + 1) = '-'; + Sign : constant Boolean := Plus_Sign or Minus_Sign; + Start : constant Natural := + (if Sign then Str'First + 2 else Str'First + 1); + Value : constant Natural := + Scan_Natural_Ghost (Str (Start .. Str'Last), Start, 0); + begin + (if Minus_Sign then -Value else Value)) + with + Ghost, + Pre => Str'Last < Natural'Last + and then Starts_As_Exponent_Format_Ghost (Str, Real), + Post => (if not Real then Scan_Exponent_Ghost'Result >= 0); + -- Ghost function that scans an exponent + + procedure Scan_Exponent (Str : String; Ptr : not null access Integer; Max : Integer; - Real : Boolean := False) return Integer; + Exp : out Integer; + Real : Boolean := False) + with + Pre => + -- Ptr.all .. Max is either an empty range, or a valid range in Str + (Ptr.all > Max or else (Ptr.all >= Str'First and then Max <= Str'Last)) + and then Max < Natural'Last + and then Is_Opt_Exponent_Format_Ghost (Str (Ptr.all .. Max), Real), + Post => + (if Starts_As_Exponent_Format_Ghost (Str (Ptr.all'Old .. Max), Real) + then Exp = Scan_Exponent_Ghost (Str (Ptr.all'Old .. Max), Real) + and then + (if Str (Ptr.all'Old + 1) in '-' | '+' then + Ptr.all = Last_Number_Ghost (Str (Ptr.all'Old + 2 .. Max)) + 1 + else Ptr.all = Last_Number_Ghost (Str (Ptr.all'Old + 1 .. Max)) + 1) + else Exp = 0 and Ptr.all = Ptr.all'Old); -- Called to scan a possible exponent. Str, Ptr, Max are as described above -- for Scan_Sign. If Ptr.all < Max and Str (Ptr.all) = 'E' or 'e', then an -- exponent is scanned out, with the exponent value returned in Exp, and @@ -100,18 +335,37 @@ package System.Val_Util is -- This routine must not be called with Str'Last = Positive'Last. There is -- no check for this case, the caller must ensure this condition is met. - procedure Scan_Trailing_Blanks (Str : String; P : Positive); + procedure Scan_Trailing_Blanks (Str : String; P : Positive) + with + Pre => P >= Str'First + and then Only_Space_Ghost (Str, P, Str'Last); -- Checks that the remainder of the field Str (P .. Str'Last) is all -- blanks. Raises Constraint_Error if a non-blank character is found. + pragma Warnings + (GNATprove, Off, """Ptr"" is not modified", + Reason => "Ptr is actually modified when raising an exception"); procedure Scan_Underscore (Str : String; P : in out Natural; Ptr : not null access Integer; Max : Integer; - Ext : Boolean); + Ext : Boolean) + with + Pre => P in Str'Range + and then Str (P) = '_' + and then Max in Str'Range + and then P < Max + and then + (if Ext then + Str (P + 1) in '0' .. '9' | 'A' .. 'F' | 'a' .. 'f' + else + Str (P + 1) in '0' .. '9'), + Post => + P = P'Old + 1 + and then Ptr.all'Old = Ptr.all; -- Called if an underscore is encountered while scanning digits. Str (P) - -- contains the underscore. Ptr it the pointer to be returned to the + -- contains the underscore. Ptr is the pointer to be returned to the -- ultimate caller of the scan routine, Max is the maximum subscript in -- Str, and Ext indicates if extended digits are allowed. In the case -- where the underscore is invalid, Constraint_Error is raised with Ptr @@ -120,5 +374,34 @@ package System.Val_Util is -- -- This routine must not be called with Str'Last = Positive'Last. There is -- no check for this case, the caller must ensure this condition is met. + pragma Warnings (GNATprove, On, """Ptr"" is not modified"); + +private + + ------------------------ + -- Scan_Natural_Ghost -- + ------------------------ + + function Scan_Natural_Ghost + (Str : String; + P : Natural; + Acc : Natural) + return Natural + is + (if P > Str'Last + or else Str (P) not in '0' .. '9' | '_' + or else Acc >= Integer'Last / 10 + then + Acc + elsif Str (P) = '_' then + Scan_Natural_Ghost (Str, P + 1, Acc) + else + (declare + Shift_Acc : constant Natural := + Acc * 10 + + (Integer'(Character'Pos (Str (P))) - + Integer'(Character'Pos ('0'))); + begin + Scan_Natural_Ghost (Str, P + 1, Shift_Acc))); end System.Val_Util; diff --git a/gcc/ada/libgnat/s-valwch.adb b/gcc/ada/libgnat/s-valwch.adb index dd8e8ed..d4ba3f5 100644 --- a/gcc/ada/libgnat/s-valwch.adb +++ b/gcc/ada/libgnat/s-valwch.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-valwch.ads b/gcc/ada/libgnat/s-valwch.ads index 7a625e0..428d3aa 100644 --- a/gcc/ada/libgnat/s-valwch.ads +++ b/gcc/ada/libgnat/s-valwch.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-veboop.adb b/gcc/ada/libgnat/s-veboop.adb index da71bd2..7bb0b5e 100644 --- a/gcc/ada/libgnat/s-veboop.adb +++ b/gcc/ada/libgnat/s-veboop.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,7 +29,17 @@ -- -- ------------------------------------------------------------------------------ -package body System.Vectors.Boolean_Operations is +-- Ghost code, loop invariants and assertions in this unit are meant for +-- analysis only, not for run-time checking, as it would be too costly +-- otherwise. This is enforced by setting the assertion policy to Ignore. + +pragma Assertion_Policy (Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + +package body System.Vectors.Boolean_Operations + with SPARK_Mode +is SU : constant := Storage_Unit; -- Convenient short hand, used throughout @@ -76,7 +86,26 @@ package body System.Vectors.Boolean_Operations is ----------- function "not" (Item : Vectors.Vector) return Vectors.Vector is + + procedure Prove_Not (Result : Vectors.Vector) + with + Ghost, + Pre => Valid (Item) + and then Result = (Item xor True_Val), + Post => Valid (Result) + and then (for all J in 1 .. Vector_Boolean_Size => + Model (Result) (J) = not Model (Item) (J)); + + procedure Prove_Not (Result : Vectors.Vector) is + begin + for J in 1 .. Vector_Boolean_Size loop + pragma Assert + (Element (Result, J) = 1 - Element (Item, J)); + end loop; + end Prove_Not; + begin + Prove_Not (Item xor True_Val); return Item xor True_Val; end "not"; @@ -90,7 +119,32 @@ package body System.Vectors.Boolean_Operations is end Nand; function Nand (Left, Right : Vectors.Vector) return Vectors.Vector is + + procedure Prove_And (Result : Vectors.Vector) + with + Ghost, + Pre => Valid (Left) + and then Valid (Right) + and then Result = (Left and Right), + Post => Valid (Result) + and then (for all J in 1 .. Vector_Boolean_Size => + Model (Result) (J) = + (Model (Left) (J) and Model (Right) (J))); + + procedure Prove_And (Result : Vectors.Vector) is + begin + for J in 1 .. Vector_Boolean_Size loop + pragma Assert + (Element (Result, J) = + (if Element (Left, J) = 1 + and Element (Right, J) = 1 + then 1 + else 0)); + end loop; + end Prove_And; + begin + Prove_And (Left and Right); return not (Left and Right); end Nand; @@ -104,7 +158,32 @@ package body System.Vectors.Boolean_Operations is end Nor; function Nor (Left, Right : Vectors.Vector) return Vectors.Vector is + + procedure Prove_Or (Result : Vectors.Vector) + with + Ghost, + Pre => Valid (Left) + and then Valid (Right) + and then Result = (Left or Right), + Post => Valid (Result) + and then (for all J in 1 .. Vector_Boolean_Size => + Model (Result) (J) = + (Model (Left) (J) or Model (Right) (J))); + + procedure Prove_Or (Result : Vectors.Vector) is + begin + for J in 1 .. Vector_Boolean_Size loop + pragma Assert + (Element (Result, J) = + (if Element (Left, J) = 1 + or Element (Right, J) = 1 + then 1 + else 0)); + end loop; + end Prove_Or; + begin + Prove_Or (Left or Right); return not (Left or Right); end Nor; @@ -118,7 +197,32 @@ package body System.Vectors.Boolean_Operations is end Nxor; function Nxor (Left, Right : Vectors.Vector) return Vectors.Vector is + + procedure Prove_Xor (Result : Vectors.Vector) + with + Ghost, + Pre => Valid (Left) + and then Valid (Right) + and then Result = (Left xor Right), + Post => Valid (Result) + and then (for all J in 1 .. Vector_Boolean_Size => + Model (Result) (J) = + (Model (Left) (J) xor Model (Right) (J))); + + procedure Prove_Xor (Result : Vectors.Vector) is + begin + for J in 1 .. Vector_Boolean_Size loop + pragma Assert + (Element (Result, J) = + (if Element (Left, J) = 1 + xor Element (Right, J) = 1 + then 1 + else 0)); + end loop; + end Prove_Xor; + begin + Prove_Xor (Left xor Right); return not (Left xor Right); end Nxor; diff --git a/gcc/ada/libgnat/s-veboop.ads b/gcc/ada/libgnat/s-veboop.ads index 6b41307..4614759 100644 --- a/gcc/ada/libgnat/s-veboop.ads +++ b/gcc/ada/libgnat/s-veboop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,15 +31,77 @@ -- This package contains functions for runtime operations on boolean vectors -package System.Vectors.Boolean_Operations is - pragma Pure; +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + +package System.Vectors.Boolean_Operations + with Pure, SPARK_Mode +is + pragma Warnings (Off, "aspect ""Pre"" not enforced on inlined subprogram", + Reason => "Pre only used in proof"); + pragma Warnings (Off, "aspect ""Post"" not enforced on inlined subprogram", + Reason => "Post only used in proof"); + + -- Type Vectors.Vector represents an array of Boolean, each of which + -- takes 8 bits of the representation, with the 7 msb set to zero. Express + -- in contracts the constraint on valid vectors and the model that they + -- represent, and the relationship between input models and output model. + + Vector_Boolean_Size : constant Positive := + System.Word_Size / System.Storage_Unit + with Ghost; + + type Vector_Element is mod 2 ** System.Storage_Unit with Ghost; + + type Vector_Boolean_Array is array (1 .. Vector_Boolean_Size) of Boolean + with Ghost; + + function Shift_Right (V : Vectors.Vector; N : Natural) return Vectors.Vector + with Ghost, Import, Convention => Intrinsic; + + function Element (V : Vectors.Vector; N : Positive) return Vector_Element is + (Vector_Element (Shift_Right (V, (N - 1) * System.Storage_Unit) + and (2 ** System.Storage_Unit - 1))) + with + Ghost, + Pre => N <= Vector_Boolean_Size; + -- Return the Nth element represented by the vector + + function Valid (V : Vectors.Vector) return Boolean is + (for all J in 1 .. Vector_Boolean_Size => + Element (V, J) in 0 .. 1) + with Ghost; + -- A valid vector is one for which all elements are 0 (representing False) + -- or 1 (representing True). + + function Model (V : Vectors.Vector) return Vector_Boolean_Array + with + Ghost, + Pre => Valid (V); + + function Model (V : Vectors.Vector) return Vector_Boolean_Array is + (for J in 1 .. Vector_Boolean_Size => Element (V, J) = 1); + -- The model of a valid vector is the corresponding array of Boolean values -- Although in general the boolean operations on arrays of booleans are -- identical to operations on arrays of unsigned words of the same size, -- for the "not" operator this is not the case as False is typically -- represented by 0 and true by 1. - function "not" (Item : Vectors.Vector) return Vectors.Vector; + function "not" (Item : Vectors.Vector) return Vectors.Vector + with + Pre => Valid (Item), + Post => Valid ("not"'Result) + and then (for all J in 1 .. Vector_Boolean_Size => + Model ("not"'Result) (J) = not Model (Item) (J)); -- The three boolean operations "nand", "nor" and "nxor" are needed -- for cases where the compiler moves boolean array operations into @@ -51,13 +113,44 @@ package System.Vectors.Boolean_Operations is -- (not X) xor (not Y) = X xor Y -- X xor (not Y) = not (X xor Y) = Nxor (X, Y) - function Nand (Left, Right : Boolean) return Boolean; - function Nor (Left, Right : Boolean) return Boolean; - function Nxor (Left, Right : Boolean) return Boolean; + function Nand (Left, Right : Boolean) return Boolean + with + Post => Nand'Result = not (Left and Right); + + function Nor (Left, Right : Boolean) return Boolean + with + Post => Nor'Result = not (Left or Right); + + function Nxor (Left, Right : Boolean) return Boolean + with + Post => Nxor'Result = not (Left xor Right); + + function Nand (Left, Right : Vectors.Vector) return Vectors.Vector + with + Pre => Valid (Left) + and then Valid (Right), + Post => Valid (Nand'Result) + and then (for all J in 1 .. Vector_Boolean_Size => + Model (Nand'Result) (J) = + Nand (Model (Left) (J), Model (Right) (J))); + + function Nor (Left, Right : Vectors.Vector) return Vectors.Vector + with + Pre => Valid (Left) + and then Valid (Right), + Post => Valid (Nor'Result) + and then (for all J in 1 .. Vector_Boolean_Size => + Model (Nor'Result) (J) = + Nor (Model (Left) (J), Model (Right) (J))); - function Nand (Left, Right : Vectors.Vector) return Vectors.Vector; - function Nor (Left, Right : Vectors.Vector) return Vectors.Vector; - function Nxor (Left, Right : Vectors.Vector) return Vectors.Vector; + function Nxor (Left, Right : Vectors.Vector) return Vectors.Vector + with + Pre => Valid (Left) + and then Valid (Right), + Post => Valid (Nxor'Result) + and then (for all J in 1 .. Vector_Boolean_Size => + Model (Nxor'Result) (J) = + Nxor (Model (Left) (J), Model (Right) (J))); pragma Inline_Always ("not"); pragma Inline_Always (Nand); diff --git a/gcc/ada/libgnat/s-vector.ads b/gcc/ada/libgnat/s-vector.ads index 0e19651..0ae3e6f 100644 --- a/gcc/ada/libgnat/s-vector.ads +++ b/gcc/ada/libgnat/s-vector.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-vercon.adb b/gcc/ada/libgnat/s-vercon.adb index 1de56a7..5d81876 100644 --- a/gcc/ada/libgnat/s-vercon.adb +++ b/gcc/ada/libgnat/s-vercon.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-vercon.ads b/gcc/ada/libgnat/s-vercon.ads index e454d55..5fefaaf 100644 --- a/gcc/ada/libgnat/s-vercon.ads +++ b/gcc/ada/libgnat/s-vercon.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-wchcnv.adb b/gcc/ada/libgnat/s-wchcnv.adb index 8d95c6f..b0b6ea4 100644 --- a/gcc/ada/libgnat/s-wchcnv.adb +++ b/gcc/ada/libgnat/s-wchcnv.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - with Interfaces; use Interfaces; with System.WCh_Con; use System.WCh_Con; with System.WCh_JIS; use System.WCh_JIS; diff --git a/gcc/ada/libgnat/s-wchcnv.ads b/gcc/ada/libgnat/s-wchcnv.ads index 1521692..7e7ba90 100644 --- a/gcc/ada/libgnat/s-wchcnv.ads +++ b/gcc/ada/libgnat/s-wchcnv.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -43,8 +43,6 @@ -- This unit may be used directly from an application program by providing -- an appropriate WITH, and the interface can be expected to remain stable. -pragma Compiler_Unit_Warning; - with System.WCh_Con; package System.WCh_Cnv is diff --git a/gcc/ada/libgnat/s-wchcon.adb b/gcc/ada/libgnat/s-wchcon.adb index e16b8b5..f9c83b8 100644 --- a/gcc/ada/libgnat/s-wchcon.adb +++ b/gcc/ada/libgnat/s-wchcon.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2005-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package body System.WCh_Con is ---------------------------- diff --git a/gcc/ada/libgnat/s-wchcon.ads b/gcc/ada/libgnat/s-wchcon.ads index 3e82260..645469b 100644 --- a/gcc/ada/libgnat/s-wchcon.ads +++ b/gcc/ada/libgnat/s-wchcon.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -36,8 +36,6 @@ -- This unit may be used directly from an application program by providing -- an appropriate WITH, and the interface can be expected to remain stable. -pragma Compiler_Unit_Warning; - package System.WCh_Con is pragma Pure; @@ -167,12 +165,12 @@ package System.WCh_Con is -- no ambiguity in Ada sources, since the above sequences are illegal Ada). WC_Encoding_Letters : constant array (WC_Encoding_Method) of Character := - (WCEM_Hex => 'h', + [WCEM_Hex => 'h', WCEM_Upper => 'u', WCEM_Shift_JIS => 's', WCEM_EUC => 'e', WCEM_UTF8 => '8', - WCEM_Brackets => 'b'); + WCEM_Brackets => 'b']; -- Letters used for selection of wide character encoding method in the -- compiler options (-gnatW? switch) and for Wide_Text_IO (WCEM parameter -- in the form string). @@ -191,12 +189,12 @@ package System.WCh_Con is -- or wide wide character sequence for any of the active encoding methods. WC_Longest_Sequences : constant array (WC_Encoding_Method) of Natural := - (WCEM_Hex => 5, + [WCEM_Hex => 5, WCEM_Upper => 2, WCEM_Shift_JIS => 2, WCEM_EUC => 2, WCEM_UTF8 => 6, - WCEM_Brackets => 12); + WCEM_Brackets => 12]; -- The longest number of characters that can be used for a wide character -- or wide wide character sequence using the given encoding method. diff --git a/gcc/ada/libgnat/s-wchjis.adb b/gcc/ada/libgnat/s-wchjis.adb index 3eede0a..48c98fb 100644 --- a/gcc/ada/libgnat/s-wchjis.adb +++ b/gcc/ada/libgnat/s-wchjis.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,6 @@ -- -- ------------------------------------------------------------------------------ -pragma Compiler_Unit_Warning; - package body System.WCh_JIS is type Byte is mod 256; diff --git a/gcc/ada/libgnat/s-wchjis.ads b/gcc/ada/libgnat/s-wchjis.ads index 7470181..2540fba 100644 --- a/gcc/ada/libgnat/s-wchjis.ads +++ b/gcc/ada/libgnat/s-wchjis.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,8 +32,6 @@ -- This package contains routines used for converting between internal -- JIS codes and the two external forms we support (EUC and Shift-JIS) -pragma Compiler_Unit_Warning; - package System.WCh_JIS is pragma Pure; diff --git a/gcc/ada/libgnat/s-wchstw.adb b/gcc/ada/libgnat/s-wchstw.adb index bef1040..b0112fb 100644 --- a/gcc/ada/libgnat/s-wchstw.adb +++ b/gcc/ada/libgnat/s-wchstw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-wchstw.ads b/gcc/ada/libgnat/s-wchstw.ads index 55e3c37..cd37dfd 100644 --- a/gcc/ada/libgnat/s-wchstw.ads +++ b/gcc/ada/libgnat/s-wchstw.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-wchwts.adb b/gcc/ada/libgnat/s-wchwts.adb index 6afcb3f..7c79bd0 100644 --- a/gcc/ada/libgnat/s-wchwts.adb +++ b/gcc/ada/libgnat/s-wchwts.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-wchwts.ads b/gcc/ada/libgnat/s-wchwts.ads index 4ac4657..bdc0d6c 100644 --- a/gcc/ada/libgnat/s-wchwts.ads +++ b/gcc/ada/libgnat/s-wchwts.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-widboo.adb b/gcc/ada/libgnat/s-widboo.adb index dd3bafb..461555c 100644 --- a/gcc/ada/libgnat/s-widboo.adb +++ b/gcc/ada/libgnat/s-widboo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-widboo.ads b/gcc/ada/libgnat/s-widboo.ads index bc509e1..898c3b6 100644 --- a/gcc/ada/libgnat/s-widboo.ads +++ b/gcc/ada/libgnat/s-widboo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-widcha.adb b/gcc/ada/libgnat/s-widcha.adb index d2298b9..c33cd53 100644 --- a/gcc/ada/libgnat/s-widcha.adb +++ b/gcc/ada/libgnat/s-widcha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-widcha.ads b/gcc/ada/libgnat/s-widcha.ads index d4913a9..0b271d8 100644 --- a/gcc/ada/libgnat/s-widcha.ads +++ b/gcc/ada/libgnat/s-widcha.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-widenu.adb b/gcc/ada/libgnat/s-widenu.adb index 14096f3..46a4505 100644 --- a/gcc/ada/libgnat/s-widenu.adb +++ b/gcc/ada/libgnat/s-widenu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-widenu.ads b/gcc/ada/libgnat/s-widenu.ads index d969309..5bd9bdd 100644 --- a/gcc/ada/libgnat/s-widenu.ads +++ b/gcc/ada/libgnat/s-widenu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-widint.ads b/gcc/ada/libgnat/s-widint.ads index f9b5eda..074ab29 100644 --- a/gcc/ada/libgnat/s-widint.ads +++ b/gcc/ada/libgnat/s-widint.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,9 +31,22 @@ -- Width attribute for signed integers up to Integer +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + with System.Width_I; -package System.Wid_Int is +package System.Wid_Int + with SPARK_Mode +is function Width_Integer is new Width_I (Integer); pragma Pure_Function (Width_Integer); diff --git a/gcc/ada/libgnat/s-widlli.adb b/gcc/ada/libgnat/s-widlli.adb index ea24ca5..17a754e 100644 --- a/gcc/ada/libgnat/s-widlli.adb +++ b/gcc/ada/libgnat/s-widlli.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-widlli.ads b/gcc/ada/libgnat/s-widlli.ads index 708dbdc..b1675ec 100644 --- a/gcc/ada/libgnat/s-widlli.ads +++ b/gcc/ada/libgnat/s-widlli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,9 +31,22 @@ -- Width attribute for signed integers larger than Integer +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + with System.Width_I; -package System.Wid_LLI is +package System.Wid_LLI + with SPARK_Mode +is function Width_Long_Long_Integer is new Width_I (Long_Long_Integer); pragma Pure_Function (Width_Long_Long_Integer); diff --git a/gcc/ada/libgnat/s-widllli.ads b/gcc/ada/libgnat/s-widllli.ads index 82a7e3d..27c0927 100644 --- a/gcc/ada/libgnat/s-widllli.ads +++ b/gcc/ada/libgnat/s-widllli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,9 +31,22 @@ -- Width attribute for signed integers larger than Long_Long_Integer +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + with System.Width_I; -package System.Wid_LLLI is +package System.Wid_LLLI + with SPARK_Mode +is function Width_Long_Long_Long_Integer is new Width_I (Long_Long_Long_Integer); diff --git a/gcc/ada/libgnat/s-widlllu.ads b/gcc/ada/libgnat/s-widlllu.ads index 10a0c9c..802c74a 100644 --- a/gcc/ada/libgnat/s-widlllu.ads +++ b/gcc/ada/libgnat/s-widlllu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,6 +31,17 @@ -- Width attribute for modular integers larger than Long_Long_Integer +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + with System.Width_U; with System.Unsigned_Types; diff --git a/gcc/ada/libgnat/s-widllu.adb b/gcc/ada/libgnat/s-widllu.adb index 101eff2..ce7b7e6 100644 --- a/gcc/ada/libgnat/s-widllu.adb +++ b/gcc/ada/libgnat/s-widllu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-widllu.ads b/gcc/ada/libgnat/s-widllu.ads index 7eaf966..eafb04f 100644 --- a/gcc/ada/libgnat/s-widllu.ads +++ b/gcc/ada/libgnat/s-widllu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,6 +31,17 @@ -- Width attribute for modular integers larger than Integer +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + with System.Width_U; with System.Unsigned_Types; diff --git a/gcc/ada/libgnat/s-widthi.adb b/gcc/ada/libgnat/s-widthi.adb index 2f2d5e0..dcd1b4b 100644 --- a/gcc/ada/libgnat/s-widthi.adb +++ b/gcc/ada/libgnat/s-widthi.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,10 +29,109 @@ -- -- ------------------------------------------------------------------------------ +with Ada.Numerics.Big_Numbers.Big_Integers_Ghost; +use Ada.Numerics.Big_Numbers.Big_Integers_Ghost; + function System.Width_I (Lo, Hi : Int) return Natural is + + -- Ghost code, loop invariants and assertions in this unit are meant for + -- analysis only, not for run-time checking, as it would be too costly + -- otherwise. This is enforced by setting the assertion policy to Ignore. + + pragma Assertion_Policy (Ghost => Ignore, + Loop_Invariant => Ignore, + Assert => Ignore); + + ----------------------- + -- Local Subprograms -- + ----------------------- + + package Signed_Conversion is new Signed_Conversions (Int => Int); + + function Big (Arg : Int) return Big_Integer renames + Signed_Conversion.To_Big_Integer; + + -- Maximum value of exponent for 10 that fits in Uns'Base + function Max_Log10 return Natural is + (case Int'Base'Size is + when 8 => 2, + when 16 => 4, + when 32 => 9, + when 64 => 19, + when 128 => 38, + when others => raise Program_Error) + with Ghost; + + ------------------ + -- Local Lemmas -- + ------------------ + + procedure Lemma_Lower_Mult (A, B, C : Big_Natural) + with + Ghost, + Pre => A <= B, + Post => A * C <= B * C; + + procedure Lemma_Div_Commutation (X, Y : Int) + with + Ghost, + Pre => X >= 0 and Y > 0, + Post => Big (X) / Big (Y) = Big (X / Y); + + procedure Lemma_Div_Twice (X : Big_Natural; Y, Z : Big_Positive) + with + Ghost, + Post => X / Y / Z = X / (Y * Z); + + ---------------------- + -- Lemma_Lower_Mult -- + ---------------------- + + procedure Lemma_Lower_Mult (A, B, C : Big_Natural) is null; + + --------------------------- + -- Lemma_Div_Commutation -- + --------------------------- + + procedure Lemma_Div_Commutation (X, Y : Int) is null; + + --------------------- + -- Lemma_Div_Twice -- + --------------------- + + procedure Lemma_Div_Twice (X : Big_Natural; Y, Z : Big_Positive) is + XY : constant Big_Natural := X / Y; + YZ : constant Big_Natural := Y * Z; + XYZ : constant Big_Natural := X / Y / Z; + R : constant Big_Natural := (XY rem Z) * Y + (X rem Y); + begin + pragma Assert (X = XY * Y + (X rem Y)); + pragma Assert (XY = XY / Z * Z + (XY rem Z)); + pragma Assert (X = XYZ * YZ + R); + pragma Assert ((XY rem Z) * Y <= (Z - 1) * Y); + pragma Assert (R <= YZ - 1); + pragma Assert (X / YZ = (XYZ * YZ + R) / YZ); + pragma Assert (X / YZ = XYZ + R / YZ); + end Lemma_Div_Twice; + + -- Local variables + W : Natural; T : Int; + -- Local ghost variables + + Max_W : constant Natural := Max_Log10 with Ghost; + Big_10 : constant Big_Integer := Big (10) with Ghost; + + Pow : Big_Integer := 1 with Ghost; + T_Init : constant Int := + Int'Max (abs (Int'Max (Lo, Int'First + 1)), + abs (Int'Max (Hi, Int'First + 1))) + with Ghost; + +-- Start of processing for System.Width_I + begin if Lo > Hi then return 0; @@ -52,10 +151,41 @@ begin -- Increase value if more digits required while T >= 10 loop + Lemma_Div_Commutation (T, 10); + Lemma_Div_Twice (Big (T_Init), Big_10 ** (W - 2), Big_10); + T := T / 10; W := W + 1; + Pow := Pow * 10; + + pragma Loop_Invariant (T >= 0); + pragma Loop_Invariant (W in 3 .. Max_W + 3); + pragma Loop_Invariant (Pow = Big_10 ** (W - 2)); + pragma Loop_Invariant (Big (T) = Big (T_Init) / Pow); + pragma Loop_Variant (Decreases => T); end loop; + declare + F : constant Big_Integer := Big_10 ** (W - 2) with Ghost; + Q : constant Big_Integer := Big (T_Init) / F with Ghost; + R : constant Big_Integer := Big (T_Init) rem F with Ghost; + begin + pragma Assert (Q < Big_10); + pragma Assert (Big (T_Init) = Q * F + R); + Lemma_Lower_Mult (Q, Big (9), F); + pragma Assert (Big (T_Init) <= Big (9) * F + F - 1); + pragma Assert (Big (T_Init) < Big_10 * F); + pragma Assert (Big_10 * F = Big_10 ** (W - 1)); + end; + + -- This is an expression of the functional postcondition for Width_I, + -- which cannot be expressed readily as a postcondition as this would + -- require making the instantiation Signed_Conversion and function Big + -- available from the spec. + + pragma Assert (Big (Int'Max (Lo, Int'First + 1)) < Big_10 ** (W - 1)); + pragma Assert (Big (Int'Max (Hi, Int'First + 1)) < Big_10 ** (W - 1)); + return W; end if; diff --git a/gcc/ada/libgnat/s-widthi.ads b/gcc/ada/libgnat/s-widthi.ads index 37865b89..1004233 100644 --- a/gcc/ada/libgnat/s-widthi.ads +++ b/gcc/ada/libgnat/s-widthi.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -36,4 +36,9 @@ generic type Int is range <>; -function System.Width_I (Lo, Hi : Int) return Natural; +function System.Width_I (Lo, Hi : Int) return Natural +with + Post => (if Lo > Hi then + System.Width_I'Result = 0 + else + System.Width_I'Result > 0); diff --git a/gcc/ada/libgnat/s-widthu.adb b/gcc/ada/libgnat/s-widthu.adb index fce8c7a..e23ecef 100644 --- a/gcc/ada/libgnat/s-widthu.adb +++ b/gcc/ada/libgnat/s-widthu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,8 +29,8 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Numerics.Big_Numbers.Big_Integers; -use Ada.Numerics.Big_Numbers.Big_Integers; +with Ada.Numerics.Big_Numbers.Big_Integers_Ghost; +use Ada.Numerics.Big_Numbers.Big_Integers_Ghost; function System.Width_U (Lo, Hi : Uns) return Natural is @@ -42,14 +42,14 @@ function System.Width_U (Lo, Hi : Uns) return Natural is Loop_Invariant => Ignore, Assert => Ignore); - W : Natural; - T : Uns; + ----------------------- + -- Local Subprograms -- + ----------------------- package Unsigned_Conversion is new Unsigned_Conversions (Int => Uns); - function Big (Arg : Uns) return Big_Integer is - (Unsigned_Conversion.To_Big_Integer (Arg)) - with Ghost; + function Big (Arg : Uns) return Big_Integer renames + Unsigned_Conversion.To_Big_Integer; -- Maximum value of exponent for 10 that fits in Uns'Base function Max_Log10 return Natural is @@ -62,8 +62,9 @@ function System.Width_U (Lo, Hi : Uns) return Natural is when others => raise Program_Error) with Ghost; - Max_W : constant Natural := Max_Log10 with Ghost; - Big_10 : constant Big_Integer := Big (10) with Ghost; + ------------------ + -- Local Lemmas -- + ------------------ procedure Lemma_Lower_Mult (A, B, C : Big_Natural) with @@ -82,15 +83,21 @@ function System.Width_U (Lo, Hi : Uns) return Natural is Ghost, Post => X / Y / Z = X / (Y * Z); - procedure Lemma_Lower_Mult (A, B, C : Big_Natural) is - begin - null; - end Lemma_Lower_Mult; + ---------------------- + -- Lemma_Lower_Mult -- + ---------------------- - procedure Lemma_Div_Commutation (X, Y : Uns) is - begin - null; - end Lemma_Div_Commutation; + procedure Lemma_Lower_Mult (A, B, C : Big_Natural) is null; + + --------------------------- + -- Lemma_Div_Commutation -- + --------------------------- + + procedure Lemma_Div_Commutation (X, Y : Uns) is null; + + --------------------- + -- Lemma_Div_Twice -- + --------------------- procedure Lemma_Div_Twice (X : Big_Natural; Y, Z : Big_Positive) is XY : constant Big_Natural := X / Y; @@ -107,20 +114,31 @@ function System.Width_U (Lo, Hi : Uns) return Natural is pragma Assert (X / YZ = XYZ + R / YZ); end Lemma_Div_Twice; + -- Local variables + + W : Natural; + T : Uns; + + -- Local ghost variables + + Max_W : constant Natural := Max_Log10 with Ghost; + Big_10 : constant Big_Integer := Big (10) with Ghost; + Pow : Big_Integer := 1 with Ghost; T_Init : constant Uns := Uns'Max (Lo, Hi) with Ghost; +-- Start of processing for System.Width_U + begin if Lo > Hi then return 0; else - -- Minimum value is 2, one for sign, one for digit + -- Minimum value is 2, one for space, one for digit W := 2; - -- Get max of absolute values, but avoid bomb if we have the maximum - -- negative number (note that First + 1 has same digits as First) + -- Get max of absolute values T := Uns'Max (Lo, Hi); @@ -138,9 +156,6 @@ begin pragma Loop_Invariant (Pow = Big_10 ** (W - 2)); pragma Loop_Invariant (Big (T) = Big (T_Init) / Pow); pragma Loop_Variant (Decreases => T); - pragma Annotate - (CodePeer, False_Positive, - "validity check", "confusion on generated code"); end loop; declare diff --git a/gcc/ada/libgnat/s-widthu.ads b/gcc/ada/libgnat/s-widthu.ads index 7b71119..7611e8d 100644 --- a/gcc/ada/libgnat/s-widthu.ads +++ b/gcc/ada/libgnat/s-widthu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -36,4 +36,9 @@ generic type Uns is mod <>; -function System.Width_U (Lo, Hi : Uns) return Natural; +function System.Width_U (Lo, Hi : Uns) return Natural +with + Post => (if Lo > Hi then + System.Width_U'Result = 0 + else + System.Width_U'Result > 0); diff --git a/gcc/ada/libgnat/s-widuns.ads b/gcc/ada/libgnat/s-widuns.ads index 713532e..19d3261 100644 --- a/gcc/ada/libgnat/s-widuns.ads +++ b/gcc/ada/libgnat/s-widuns.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -31,6 +31,17 @@ -- Width attribute for modular integers up to Integer +-- Preconditions in this unit are meant for analysis only, not for run-time +-- checking, so that the expected exceptions are raised. This is enforced by +-- setting the corresponding assertion policy to Ignore. Postconditions and +-- contract cases should not be executed at runtime as well, in order not to +-- slow down the execution of these functions. + +pragma Assertion_Policy (Pre => Ignore, + Post => Ignore, + Contract_Cases => Ignore, + Ghost => Ignore); + with System.Width_U; with System.Unsigned_Types; diff --git a/gcc/ada/libgnat/s-widwch.adb b/gcc/ada/libgnat/s-widwch.adb index 372650c..0ad7383 100644 --- a/gcc/ada/libgnat/s-widwch.adb +++ b/gcc/ada/libgnat/s-widwch.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-widwch.ads b/gcc/ada/libgnat/s-widwch.ads index 9db3fbf..db5050d 100644 --- a/gcc/ada/libgnat/s-widwch.ads +++ b/gcc/ada/libgnat/s-widwch.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-win32.ads b/gcc/ada/libgnat/s-win32.ads index 9d1a7ef..13b90339 100644 --- a/gcc/ada/libgnat/s-win32.ads +++ b/gcc/ada/libgnat/s-win32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-winext.ads b/gcc/ada/libgnat/s-winext.ads index bfd5f38..7adea2d 100644 --- a/gcc/ada/libgnat/s-winext.ads +++ b/gcc/ada/libgnat/s-winext.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-wwdcha.adb b/gcc/ada/libgnat/s-wwdcha.adb index e9eaaf7..846bd2e 100644 --- a/gcc/ada/libgnat/s-wwdcha.adb +++ b/gcc/ada/libgnat/s-wwdcha.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-wwdcha.ads b/gcc/ada/libgnat/s-wwdcha.ads index c01402b..a882e0f 100644 --- a/gcc/ada/libgnat/s-wwdcha.ads +++ b/gcc/ada/libgnat/s-wwdcha.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-wwdenu.adb b/gcc/ada/libgnat/s-wwdenu.adb index 6e3a458..15e8c02 100644 --- a/gcc/ada/libgnat/s-wwdenu.adb +++ b/gcc/ada/libgnat/s-wwdenu.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-wwdenu.ads b/gcc/ada/libgnat/s-wwdenu.ads index e59366e..74497eb 100644 --- a/gcc/ada/libgnat/s-wwdenu.ads +++ b/gcc/ada/libgnat/s-wwdenu.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-wwdwch.adb b/gcc/ada/libgnat/s-wwdwch.adb index 2339566..15ab268 100644 --- a/gcc/ada/libgnat/s-wwdwch.adb +++ b/gcc/ada/libgnat/s-wwdwch.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/s-wwdwch.ads b/gcc/ada/libgnat/s-wwdwch.ads index 32a2a35..dc959ec 100644 --- a/gcc/ada/libgnat/s-wwdwch.ads +++ b/gcc/ada/libgnat/s-wwdwch.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- diff --git a/gcc/ada/libgnat/system-aix.ads b/gcc/ada/libgnat/system-aix.ads index e9475c6..c016361 100644 --- a/gcc/ada/libgnat/system-aix.ads +++ b/gcc/ada/libgnat/system-aix.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (AIX/PPC Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-darwin-arm.ads b/gcc/ada/libgnat/system-darwin-arm.ads index f5b1360..be5d664 100644 --- a/gcc/ada/libgnat/system-darwin-arm.ads +++ b/gcc/ada/libgnat/system-darwin-arm.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Darwin/ARM Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-darwin-ppc.ads b/gcc/ada/libgnat/system-darwin-ppc.ads index 3a8bd13..dc3d6c4 100644 --- a/gcc/ada/libgnat/system-darwin-ppc.ads +++ b/gcc/ada/libgnat/system-darwin-ppc.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Darwin/PPC Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-darwin-x86.ads b/gcc/ada/libgnat/system-darwin-x86.ads index 527794f..378fa9b 100644 --- a/gcc/ada/libgnat/system-darwin-x86.ads +++ b/gcc/ada/libgnat/system-darwin-x86.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Darwin/x86 Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-djgpp.ads b/gcc/ada/libgnat/system-djgpp.ads index beecf72..31a5351 100644 --- a/gcc/ada/libgnat/system-djgpp.ads +++ b/gcc/ada/libgnat/system-djgpp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (DJGPP Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-dragonfly-x86_64.ads b/gcc/ada/libgnat/system-dragonfly-x86_64.ads index 14f3525..37726fe 100644 --- a/gcc/ada/libgnat/system-dragonfly-x86_64.ads +++ b/gcc/ada/libgnat/system-dragonfly-x86_64.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (DragonFly BSD/x86_64 Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-freebsd.ads b/gcc/ada/libgnat/system-freebsd.ads index e7ec01d..3604280 100644 --- a/gcc/ada/libgnat/system-freebsd.ads +++ b/gcc/ada/libgnat/system-freebsd.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (FreeBSD Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-hpux-ia64.ads b/gcc/ada/libgnat/system-hpux-ia64.ads index 160eb7e..4268ff5 100644 --- a/gcc/ada/libgnat/system-hpux-ia64.ads +++ b/gcc/ada/libgnat/system-hpux-ia64.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (HP-UX/ia64 Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-hpux.ads b/gcc/ada/libgnat/system-hpux.ads index e809334..a412645 100644 --- a/gcc/ada/libgnat/system-hpux.ads +++ b/gcc/ada/libgnat/system-hpux.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (HP-UX Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-linux-alpha.ads b/gcc/ada/libgnat/system-linux-alpha.ads index f5deb2a..b6f1550 100644 --- a/gcc/ada/libgnat/system-linux-alpha.ads +++ b/gcc/ada/libgnat/system-linux-alpha.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU-Linux/alpha Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-linux-arm.ads b/gcc/ada/libgnat/system-linux-arm.ads index 26e61d8..10fc281 100644 --- a/gcc/ada/libgnat/system-linux-arm.ads +++ b/gcc/ada/libgnat/system-linux-arm.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU-Linux/ARM Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-linux-hppa.ads b/gcc/ada/libgnat/system-linux-hppa.ads index 9a1429f..9a40009 100644 --- a/gcc/ada/libgnat/system-linux-hppa.ads +++ b/gcc/ada/libgnat/system-linux-hppa.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU/Linux-HPPA Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-linux-ia64.ads b/gcc/ada/libgnat/system-linux-ia64.ads index 4ccb45c..85e9c9e 100644 --- a/gcc/ada/libgnat/system-linux-ia64.ads +++ b/gcc/ada/libgnat/system-linux-ia64.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU-Linux/ia64 Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-linux-m68k.ads b/gcc/ada/libgnat/system-linux-m68k.ads index ade6c7c..83ac5ea 100644 --- a/gcc/ada/libgnat/system-linux-m68k.ads +++ b/gcc/ada/libgnat/system-linux-m68k.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU/Linux/m68k Version) -- -- -- --- Copyright (C) 2014-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-linux-mips.ads b/gcc/ada/libgnat/system-linux-mips.ads index 5170964..5013883 100644 --- a/gcc/ada/libgnat/system-linux-mips.ads +++ b/gcc/ada/libgnat/system-linux-mips.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU-Linux/MIPS Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-linux-ppc.ads b/gcc/ada/libgnat/system-linux-ppc.ads index 2ffab24..84cf532 100644 --- a/gcc/ada/libgnat/system-linux-ppc.ads +++ b/gcc/ada/libgnat/system-linux-ppc.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU-Linux/PPC Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-linux-riscv.ads b/gcc/ada/libgnat/system-linux-riscv.ads index fc25470..56f4d09 100644 --- a/gcc/ada/libgnat/system-linux-riscv.ads +++ b/gcc/ada/libgnat/system-linux-riscv.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU-Linux/RISC-V Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-linux-s390.ads b/gcc/ada/libgnat/system-linux-s390.ads index be8fb5c..24803e2 100644 --- a/gcc/ada/libgnat/system-linux-s390.ads +++ b/gcc/ada/libgnat/system-linux-s390.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU-Linux/s390 Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-linux-sh4.ads b/gcc/ada/libgnat/system-linux-sh4.ads index 6ee142a..5cee747 100644 --- a/gcc/ada/libgnat/system-linux-sh4.ads +++ b/gcc/ada/libgnat/system-linux-sh4.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU-Linux/sh4 Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-linux-sparc.ads b/gcc/ada/libgnat/system-linux-sparc.ads index 9e7fae1..db46b74 100644 --- a/gcc/ada/libgnat/system-linux-sparc.ads +++ b/gcc/ada/libgnat/system-linux-sparc.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU/Linux-SPARC Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-linux-x86.ads b/gcc/ada/libgnat/system-linux-x86.ads index 893536e..87eb903 100644 --- a/gcc/ada/libgnat/system-linux-x86.ads +++ b/gcc/ada/libgnat/system-linux-x86.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (GNU-Linux/x86 Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-lynxos178-ppc.ads b/gcc/ada/libgnat/system-lynxos178-ppc.ads index 1002342..ebf8132 100644 --- a/gcc/ada/libgnat/system-lynxos178-ppc.ads +++ b/gcc/ada/libgnat/system-lynxos178-ppc.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (LynxOS-178 PPC Version) -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-lynxos178-x86.ads b/gcc/ada/libgnat/system-lynxos178-x86.ads index b4e7f12..302a2f3 100644 --- a/gcc/ada/libgnat/system-lynxos178-x86.ads +++ b/gcc/ada/libgnat/system-lynxos178-x86.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (LynxOS-178 X86 Version) -- -- -- --- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-mingw.ads b/gcc/ada/libgnat/system-mingw.ads index 71d54ec..77fb6f0 100644 --- a/gcc/ada/libgnat/system-mingw.ads +++ b/gcc/ada/libgnat/system-mingw.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Windows Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-qnx-aarch64.ads b/gcc/ada/libgnat/system-qnx-aarch64.ads index 57e30bf..827f9df 100644 --- a/gcc/ada/libgnat/system-qnx-aarch64.ads +++ b/gcc/ada/libgnat/system-qnx-aarch64.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (QNX/Aarch64 Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-rtems.ads b/gcc/ada/libgnat/system-rtems.ads index c083cb5..06f7831 100644 --- a/gcc/ada/libgnat/system-rtems.ads +++ b/gcc/ada/libgnat/system-rtems.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (Compiler Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -109,15 +109,13 @@ package System is -- hardware priority levels. Protected Object ceilings can -- override these values. -- 245 is used by the Interrupt_Manager task - -- 0 is reserved for the RTEMS IDLE task and really should not - -- be accessible from Ada but GNAT initializes - -- Current_Priority to 0 so it must be valid + -- 0 is reserved for the RTEMS IDLE task Max_Priority : constant Positive := 244; Max_Interrupt_Priority : constant Positive := 254; - subtype Any_Priority is Integer range 0 .. 254; - subtype Priority is Any_Priority range 0 .. 244; + subtype Any_Priority is Integer range 1 .. 254; + subtype Priority is Any_Priority range 1 .. 244; subtype Interrupt_Priority is Any_Priority range 245 .. 254; Default_Priority : constant Priority := 122; diff --git a/gcc/ada/libgnat/system-solaris-sparc.ads b/gcc/ada/libgnat/system-solaris-sparc.ads index 5810a28..2ba5198 100644 --- a/gcc/ada/libgnat/system-solaris-sparc.ads +++ b/gcc/ada/libgnat/system-solaris-sparc.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (SUN Solaris Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-solaris-x86.ads b/gcc/ada/libgnat/system-solaris-x86.ads index e0ac9c5..7872523 100644 --- a/gcc/ada/libgnat/system-solaris-x86.ads +++ b/gcc/ada/libgnat/system-solaris-x86.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (x86 Solaris Version) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks-arm-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks-arm-rtp-smp.ads index fe963d7..4273245 100644 --- a/gcc/ada/libgnat/system-vxworks-arm-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks-arm-rtp-smp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 6.x ARM RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks-arm-rtp.ads b/gcc/ada/libgnat/system-vxworks-arm-rtp.ads index f95efd7..214e3d5 100644 --- a/gcc/ada/libgnat/system-vxworks-arm-rtp.ads +++ b/gcc/ada/libgnat/system-vxworks-arm-rtp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 6.x ARM RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks-arm.ads b/gcc/ada/libgnat/system-vxworks-arm.ads index a51cfa8..be391d0 100644 --- a/gcc/ada/libgnat/system-vxworks-arm.ads +++ b/gcc/ada/libgnat/system-vxworks-arm.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks Version ARM) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks-e500-kernel.ads b/gcc/ada/libgnat/system-vxworks-e500-kernel.ads index 3cd5902..9ee828b 100644 --- a/gcc/ada/libgnat/system-vxworks-e500-kernel.ads +++ b/gcc/ada/libgnat/system-vxworks-e500-kernel.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 6 Kernel Version E500) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks-e500-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks-e500-rtp-smp.ads index 4f3b544..d7ab0a9 100644 --- a/gcc/ada/libgnat/system-vxworks-e500-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks-e500-rtp-smp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 6.x SMP E500 RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks-e500-rtp.ads b/gcc/ada/libgnat/system-vxworks-e500-rtp.ads index b0ac2f8..e304d50 100644 --- a/gcc/ada/libgnat/system-vxworks-e500-rtp.ads +++ b/gcc/ada/libgnat/system-vxworks-e500-rtp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 6.x E500 RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks-ppc-kernel.ads b/gcc/ada/libgnat/system-vxworks-ppc-kernel.ads index 3e15ddc..6cf9b3f 100644 --- a/gcc/ada/libgnat/system-vxworks-ppc-kernel.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc-kernel.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 6 Kernel Version PPC) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads index 0fc52d0..07da01d 100644 --- a/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 6.x SMP PPC RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks-ppc-rtp.ads b/gcc/ada/libgnat/system-vxworks-ppc-rtp.ads index dd31dad..b6807b3 100644 --- a/gcc/ada/libgnat/system-vxworks-ppc-rtp.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc-rtp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 6.x PPC RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks-x86-kernel.ads b/gcc/ada/libgnat/system-vxworks-x86-kernel.ads index 959a3b9..c8cbf52 100644 --- a/gcc/ada/libgnat/system-vxworks-x86-kernel.ads +++ b/gcc/ada/libgnat/system-vxworks-x86-kernel.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 6 Kernel Version x86) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks-x86-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks-x86-rtp-smp.ads index 8c35743..d70642e 100644 --- a/gcc/ada/libgnat/system-vxworks-x86-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks-x86-rtp-smp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks Version x86 for SMP RTPs) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks-x86-rtp.ads b/gcc/ada/libgnat/system-vxworks-x86-rtp.ads index 0274581..262445d 100644 --- a/gcc/ada/libgnat/system-vxworks-x86-rtp.ads +++ b/gcc/ada/libgnat/system-vxworks-x86-rtp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks Version x86 for RTPs) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-aarch64-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks7-aarch64-rtp-smp.ads index cf1b138..a739441 100644 --- a/gcc/ada/libgnat/system-vxworks7-aarch64-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks7-aarch64-rtp-smp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7.x AARCH64 RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-aarch64.ads b/gcc/ada/libgnat/system-vxworks7-aarch64.ads index 82ebc60..840682b 100644 --- a/gcc/ada/libgnat/system-vxworks7-aarch64.ads +++ b/gcc/ada/libgnat/system-vxworks7-aarch64.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7.x AARCH64 Kernel) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-arm-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks7-arm-rtp-smp.ads index 3642075..c82f8fc 100644 --- a/gcc/ada/libgnat/system-vxworks7-arm-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks7-arm-rtp-smp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7 ARM RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-arm.ads b/gcc/ada/libgnat/system-vxworks7-arm.ads index a51cfa8..be391d0 100644 --- a/gcc/ada/libgnat/system-vxworks7-arm.ads +++ b/gcc/ada/libgnat/system-vxworks7-arm.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks Version ARM) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-e500-kernel.ads b/gcc/ada/libgnat/system-vxworks7-e500-kernel.ads index 37fa0ef..bb72157 100644 --- a/gcc/ada/libgnat/system-vxworks7-e500-kernel.ads +++ b/gcc/ada/libgnat/system-vxworks7-e500-kernel.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7 Kernel Version E500) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-e500-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks7-e500-rtp-smp.ads index 2402795..d4b4dce 100644 --- a/gcc/ada/libgnat/system-vxworks7-e500-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks7-e500-rtp-smp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7.x E500 RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-e500-rtp.ads b/gcc/ada/libgnat/system-vxworks7-e500-rtp.ads index 4378e28..7f7f817 100644 --- a/gcc/ada/libgnat/system-vxworks7-e500-rtp.ads +++ b/gcc/ada/libgnat/system-vxworks7-e500-rtp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7.x E500 RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-ppc-kernel.ads b/gcc/ada/libgnat/system-vxworks7-ppc-kernel.ads index 2a9a2d7..2b83609 100644 --- a/gcc/ada/libgnat/system-vxworks7-ppc-kernel.ads +++ b/gcc/ada/libgnat/system-vxworks7-ppc-kernel.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7 Kernel Version PPC) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-ppc-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks7-ppc-rtp-smp.ads index d8fbbee..f232b34 100644 --- a/gcc/ada/libgnat/system-vxworks7-ppc-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks7-ppc-rtp-smp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7.x PPC RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-ppc-rtp.ads b/gcc/ada/libgnat/system-vxworks7-ppc-rtp.ads index 6a2c35a..1c59deb 100644 --- a/gcc/ada/libgnat/system-vxworks7-ppc-rtp.ads +++ b/gcc/ada/libgnat/system-vxworks7-ppc-rtp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7.x PPC RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-ppc64-kernel.ads b/gcc/ada/libgnat/system-vxworks7-ppc64-kernel.ads index b71a3a9..942c4b1 100644 --- a/gcc/ada/libgnat/system-vxworks7-ppc64-kernel.ads +++ b/gcc/ada/libgnat/system-vxworks7-ppc64-kernel.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7.x PPC64 Kernel) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-ppc64-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks7-ppc64-rtp-smp.ads index 429bbd2..42aeb34 100644 --- a/gcc/ada/libgnat/system-vxworks7-ppc64-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks7-ppc64-rtp-smp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7.x PPC64 RTP) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-x86-kernel.ads b/gcc/ada/libgnat/system-vxworks7-x86-kernel.ads index 883a749..f84d8f0 100644 --- a/gcc/ada/libgnat/system-vxworks7-x86-kernel.ads +++ b/gcc/ada/libgnat/system-vxworks7-x86-kernel.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7 Kernel Version x86) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-x86-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks7-x86-rtp-smp.ads index c010ae9..26e35ab 100644 --- a/gcc/ada/libgnat/system-vxworks7-x86-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks7-x86-rtp-smp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7 Version x86 for RTPs) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-x86-rtp.ads b/gcc/ada/libgnat/system-vxworks7-x86-rtp.ads index 8a36aa1..9eb643c 100644 --- a/gcc/ada/libgnat/system-vxworks7-x86-rtp.ads +++ b/gcc/ada/libgnat/system-vxworks7-x86-rtp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7 Version x86 for RTPs) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-x86_64-kernel.ads b/gcc/ada/libgnat/system-vxworks7-x86_64-kernel.ads index 0225112..6cdd59e 100644 --- a/gcc/ada/libgnat/system-vxworks7-x86_64-kernel.ads +++ b/gcc/ada/libgnat/system-vxworks7-x86_64-kernel.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7 Kernel Version x86_64) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- diff --git a/gcc/ada/libgnat/system-vxworks7-x86_64-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks7-x86_64-rtp-smp.ads index 3be0ffb..47a91e6 100644 --- a/gcc/ada/libgnat/system-vxworks7-x86_64-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks7-x86_64-rtp-smp.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 7 Version x86_64 for RTPs) -- -- -- --- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- |