diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
commit | e252b51ccde010cbd2a146485d8045103cd99533 (patch) | |
tree | e060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/ada/libgnat | |
parent | f10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff) | |
parent | 104c05c5284b7822d770ee51a7d91946c7e56d50 (diff) | |
download | gcc-e252b51ccde010cbd2a146485d8045103cd99533.zip gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2 |
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/ada/libgnat')
1505 files changed, 10887 insertions, 8024 deletions
diff --git a/gcc/ada/libgnat/a-assert.adb b/gcc/ada/libgnat/a-assert.adb index f3fb837..cbb97ac 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-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- -- diff --git a/gcc/ada/libgnat/a-assert.ads b/gcc/ada/libgnat/a-assert.ads index f7aef0f..0a590d6 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-2021, Free Software Foundation, Inc. -- -- -- -- S p e c -- -- -- @@ -39,23 +39,12 @@ pragma Assertion_Policy (Pre => Ignore); --- We do a with of System.Assertions to get hold of the exception (following --- the specific RM permission that lets' Assertion_Error being a renaming). --- The suppression of Warnings stops the warning about bad categorization. - -pragma Warnings (Off); -with System.Assertions; -pragma Warnings (On); +pragma Compiler_Unit_Warning; package Ada.Assertions with - SPARK_Mode + SPARK_Mode, Pure is - pragma Pure (Assertions); - - Assertion_Error : exception renames System.Assertions.Assert_Failure; - -- This is the renaming that is allowed by 11.4.2(24). Note that the - -- Exception_Name will refer to the one in System.Assertions (see - -- AARM-11.4.1(12.b)). + Assertion_Error : exception; procedure Assert (Check : Boolean) with Pre => Check; diff --git a/gcc/ada/libgnat/a-btgbso.adb b/gcc/ada/libgnat/a-btgbso.adb index 75c6dd5..0620a87 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-btgbso.ads b/gcc/ada/libgnat/a-btgbso.ads index a30ccf3..da47c49 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-calari.adb b/gcc/ada/libgnat/a-calari.adb index 27d6da4..31b9c74 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-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- -- diff --git a/gcc/ada/libgnat/a-calari.ads b/gcc/ada/libgnat/a-calari.ads index f319572..ad1fff4 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2021, 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 3b5ec6b..6a017a9 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/a-calcon.ads b/gcc/ada/libgnat/a-calcon.ads index 23f176e..5a8a19a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/a-caldel.adb b/gcc/ada/libgnat/a-caldel.adb index 5b64ef7..70877d0 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 9fa5d60..eba238e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 f457412..8295a7c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-calend.ads b/gcc/ada/libgnat/a-calend.ads index e7eb3ef..cd3fed5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-calfor.adb b/gcc/ada/libgnat/a-calfor.adb index 7d53d56..cb6c179 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-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- -- diff --git a/gcc/ada/libgnat/a-calfor.ads b/gcc/ada/libgnat/a-calfor.ads index 599e395..2bc030b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2021, 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 f183445..ec70122 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/a-cbdlli.adb b/gcc/ada/libgnat/a-cbdlli.adb index 948b706..143805e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -312,7 +312,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -1504,7 +1504,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : List) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List) is First_Time : Boolean := True; use System.Put_Images; @@ -1608,7 +1608,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); diff --git a/gcc/ada/libgnat/a-cbdlli.ads b/gcc/ada/libgnat/a-cbdlli.ads index 4574aa6..ab55086 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; with Ada.Containers.Helpers; private with Ada.Streams; private with Ada.Finalization; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type is private; @@ -285,7 +285,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : List); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List); procedure Read (Stream : not null access Root_Stream_Type'Class; diff --git a/gcc/ada/libgnat/a-cbhama.adb b/gcc/ada/libgnat/a-cbhama.adb index 7f0c0e6..26c01f5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -213,7 +213,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -239,7 +239,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -902,7 +902,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map) is First_Time : Boolean := True; use System.Put_Images; @@ -1028,7 +1028,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -1053,7 +1053,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); diff --git a/gcc/ada/libgnat/a-cbhama.ads b/gcc/ada/libgnat/a-cbhama.ads index 7a1d0f6..8be64c8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; private with Ada.Containers.Hash_Tables; private with Ada.Streams; private with Ada.Finalization; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Key_Type is private; @@ -349,7 +349,7 @@ private with null record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map); use HT_Types, HT_Types.Implementation; use Ada.Streams; diff --git a/gcc/ada/libgnat/a-cbhase.adb b/gcc/ada/libgnat/a-cbhase.adb index 75b9667..d6ab353 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -232,7 +232,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -1125,7 +1125,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set) is First_Time : Boolean := True; use System.Put_Images; @@ -1643,7 +1643,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); diff --git a/gcc/ada/libgnat/a-cbhase.ads b/gcc/ada/libgnat/a-cbhase.ads index c82a123..92926c1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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,7 +37,7 @@ private with Ada.Containers.Hash_Tables; with Ada.Containers.Helpers; private with Ada.Streams; private with Ada.Finalization; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type is private; @@ -507,7 +507,7 @@ private with null record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set); use HT_Types, HT_Types.Implementation; use Ada.Streams; diff --git a/gcc/ada/libgnat/a-cbmutr.adb b/gcc/ada/libgnat/a-cbmutr.adb index 3b25d20..e80eb5c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -600,7 +600,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := - (Element => Container.Elements (Position.Node)'Access, + (Element => Container.Elements (Position.Node)'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -2328,7 +2328,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Tree) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree) is use System.Put_Images; @@ -2533,7 +2533,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Reference_Type := - (Element => Container.Elements (Position.Node)'Access, + (Element => Container.Elements (Position.Node)'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); diff --git a/gcc/ada/libgnat/a-cbmutr.ads b/gcc/ada/libgnat/a-cbmutr.ads index d9a4a9a..c7e221a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2021, 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,7 +35,7 @@ with Ada.Iterator_Interfaces; with Ada.Containers.Helpers; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type is private; @@ -311,7 +311,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Tree); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree); procedure Write (Stream : not null access Root_Stream_Type'Class; diff --git a/gcc/ada/libgnat/a-cborma.adb b/gcc/ada/libgnat/a-cborma.adb index 5401847..f26a1e3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -420,7 +420,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -445,7 +445,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -1306,7 +1306,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map) is First_Time : Boolean := True; use System.Put_Images; @@ -1417,7 +1417,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -1442,7 +1442,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); diff --git a/gcc/ada/libgnat/a-cborma.ads b/gcc/ada/libgnat/a-cborma.ads index 4da71bc..f87522a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; private with Ada.Containers.Red_Black_Trees; private with Ada.Streams; private with Ada.Finalization; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Key_Type is private; @@ -257,7 +257,7 @@ private with null record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map); use Red_Black_Trees; use Tree_Types, Tree_Types.Implementation; diff --git a/gcc/ada/libgnat/a-cborse.adb b/gcc/ada/libgnat/a-cborse.adb index 41f0859..5c9a86e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -420,7 +420,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -752,7 +752,7 @@ is Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -943,7 +943,7 @@ is N : Node_Type renames Container.Nodes (Position.Node); begin return R : constant Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with Container.TC'Unrestricted_Access, @@ -971,7 +971,7 @@ is N : Node_Type renames Container.Nodes (Node); begin return R : constant Reference_Type := - (Element => N.Element'Access, + (Element => N.Element'Unchecked_Access, Control => (Controlled with Container.TC'Unrestricted_Access, @@ -1645,7 +1645,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-cborse.ads b/gcc/ada/libgnat/a-cborse.ads index 92a6df7..06bd20f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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,7 +37,7 @@ with Ada.Containers.Helpers; private with Ada.Containers.Red_Black_Trees; private with Ada.Streams; private with Ada.Finalization; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type is private; @@ -345,7 +345,7 @@ private with null record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set); use Tree_Types, Tree_Types.Implementation; use Ada.Finalization; diff --git a/gcc/ada/libgnat/a-cbprqu.adb b/gcc/ada/libgnat/a-cbprqu.adb index 2e97291..1d04579 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-cbprqu.ads b/gcc/ada/libgnat/a-cbprqu.ads index 6259a47..ec08aea 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 abb0e79..e4e6725 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-cbsyqu.ads b/gcc/ada/libgnat/a-cbsyqu.ads index 4037d84..8c8d5a6 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 08c29f2..d989751 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -130,11 +130,6 @@ is pragma Assert (Container.Last.Next = null); pragma Assert (Container.Length > 0); - Container.First := null; - Container.Last := null; - Container.Length := 0; - Zero_Counts (Container.TC); - Container.First := new Node_Type'(Src.Element, null, null); Container.Last := Container.First; Container.Length := 1; @@ -232,9 +227,7 @@ is Container.Last := null; Container.Length := 0; - pragma Warnings (Off); Free (X); - pragma Warnings (On); end Clear; ------------------------ @@ -682,68 +675,152 @@ is procedure Sort (Container : in out List) is - procedure Partition (Pivot : Node_Access; Back : Node_Access); - - procedure Sort (Front, Back : Node_Access); - - --------------- - -- Partition -- - --------------- + type List_Descriptor is + record + First, Last : Node_Access; + Length : Count_Type; + end record; + + function Merge_Sort (Arg : List_Descriptor) return List_Descriptor; + -- Sort list of given length using MergeSort; length must be >= 2. + -- As required by RM, the sort is stable. + + ---------------- + -- Merge_Sort -- + ---------------- + + function Merge_Sort (Arg : List_Descriptor) return List_Descriptor + is + procedure Split_List + (Unsplit : List_Descriptor; Part1, Part2 : out List_Descriptor); + -- Split list into two parts for divide-and-conquer. + -- Unsplit.Length must be >= 2. + + function Merge_Parts + (Part1, Part2 : List_Descriptor) return List_Descriptor; + -- Merge two sorted lists, preserving sorted property. + + ---------------- + -- Split_List -- + ---------------- + + procedure Split_List + (Unsplit : List_Descriptor; Part1, Part2 : out List_Descriptor) + is + Rover : Node_Access := Unsplit.First; + Bump_Count : constant Count_Type := (Unsplit.Length - 1) / 2; + begin + for Iter in 1 .. Bump_Count loop + Rover := Rover.Next; + end loop; + + Part1 := (First => Unsplit.First, + Last => Rover, + Length => Bump_Count + 1); + + Part2 := (First => Rover.Next, + Last => Unsplit.Last, + Length => Unsplit.Length - Part1.Length); + + -- Detach + Part1.Last.Next := null; + Part2.First.Prev := null; + end Split_List; + + ----------------- + -- Merge_Parts -- + ----------------- + + function Merge_Parts + (Part1, Part2 : List_Descriptor) return List_Descriptor + is + Empty : constant List_Descriptor := (null, null, 0); + + procedure Detach_First (Source : in out List_Descriptor; + Detached : out Node_Access); + -- Detach the first element from a non-empty list and + -- return the detached node via the Detached parameter. + + ------------------ + -- Detach_First -- + ------------------ + + procedure Detach_First (Source : in out List_Descriptor; + Detached : out Node_Access) is + begin + Detached := Source.First; + + if Source.Length = 1 then + Source := Empty; + else + Source := (Source.First.Next, + Source.Last, + Source.Length - 1); + + Detached.Next.Prev := null; + Detached.Next := null; + end if; + end Detach_First; + + P1 : List_Descriptor := Part1; + P2 : List_Descriptor := Part2; + Merged : List_Descriptor := Empty; + + Take_From_P2 : Boolean; + Detached : Node_Access; + + -- Start of processing for Merge_Parts - procedure Partition (Pivot : Node_Access; Back : Node_Access) is - Node : Node_Access; + begin + while (P1.Length /= 0) or (P2.Length /= 0) loop + if P1.Length = 0 then + Take_From_P2 := True; + elsif P2.Length = 0 then + Take_From_P2 := False; + else + -- If the compared elements are equal then Take_From_P2 + -- must be False in order to ensure stability. + + Take_From_P2 := P2.First.Element < P1.First.Element; + end if; + + if Take_From_P2 then + Detach_First (P2, Detached); + else + Detach_First (P1, Detached); + end if; + + if Merged.Length = 0 then + Merged := (First | Last => Detached, Length => 1); + else + Detached.Prev := Merged.Last; + Merged.Last.Next := Detached; + Merged.Last := Detached; + Merged.Length := Merged.Length + 1; + end if; + end loop; + return Merged; + end Merge_Parts; + + -- Start of processing for Merge_Sort begin - Node := Pivot.Next; - while Node /= Back loop - if Node.Element < Pivot.Element then - declare - Prev : constant Node_Access := Node.Prev; - Next : constant Node_Access := Node.Next; - - begin - Prev.Next := Next; - - if Next = null then - Container.Last := Prev; - else - Next.Prev := Prev; - end if; - - Node.Next := Pivot; - Node.Prev := Pivot.Prev; - - Pivot.Prev := Node; - - if Node.Prev = null then - Container.First := Node; - else - Node.Prev.Next := Node; - end if; - - Node := Next; - end; + if Arg.Length < 2 then + -- already sorted + return Arg; + end if; - else - Node := Node.Next; - end if; - end loop; - end Partition; + declare + Part1, Part2 : List_Descriptor; + begin + Split_List (Unsplit => Arg, Part1 => Part1, Part2 => Part2); - ---------- - -- Sort -- - ---------- + Part1 := Merge_Sort (Part1); + Part2 := Merge_Sort (Part2); - procedure Sort (Front, Back : Node_Access) is - Pivot : constant Node_Access := - (if Front = null then Container.First else Front.Next); - begin - if Pivot /= Back then - Partition (Pivot, Back); - Sort (Front, Pivot); - Sort (Pivot, Back); - end if; - end Sort; + return Merge_Parts (Part1, Part2); + end; + end Merge_Sort; -- Start of processing for Sort @@ -761,9 +838,28 @@ is -- element tampering by a generic actual subprogram. declare - Lock : With_Lock (Container.TC'Unchecked_Access); + Lock : With_Lock (Container.TC'Unchecked_Access); + + Unsorted : constant List_Descriptor := + (First => Container.First, + Last => Container.Last, + Length => Container.Length); + + Sorted : List_Descriptor; begin - Sort (Front => null, Back => null); + -- If a call to the formal < operator references the container + -- during sorting, seeing an empty container seems preferable + -- to seeing an internally inconsistent container. + -- + Container.First := null; + Container.Last := null; + Container.Length := 0; + + Sorted := Merge_Sort (Unsorted); + + Container.First := Sorted.First; + Container.Last := Sorted.Last; + Container.Length := Sorted.Length; end; pragma Assert (Container.First.Prev = null); @@ -1269,7 +1365,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : List) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-cdlili.ads b/gcc/ada/libgnat/a-cdlili.ads index 53de78b..66368b5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; with Ada.Containers.Helpers; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type is private; @@ -66,7 +66,9 @@ is pragma Preelaborable_Initialization (Cursor); Empty_List : constant List; + function Empty return List; + pragma Ada_2022 (Empty); No_Element : constant Cursor; @@ -286,7 +288,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : List); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List); overriding procedure Adjust (Container : in out List); diff --git a/gcc/ada/libgnat/a-cfdlli.adb b/gcc/ada/libgnat/a-cfdlli.adb index 9713f4c..b289def 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- @@ -188,6 +188,22 @@ is Free (Container, X); end Clear; + ------------------------ + -- Constant_Reference -- + ------------------------ + + function Constant_Reference + (Container : aliased List; + Position : Cursor) return not null access constant Element_Type + is + begin + if not Has_Element (Container => Container, Position => Position) then + raise Constraint_Error with "Position cursor has no element"; + end if; + + return Container.Nodes (Position.Node).Element'Access; + end Constant_Reference; + -------------- -- Contains -- -------------- @@ -1376,6 +1392,22 @@ is return (Node => Container.Nodes (Position.Node).Prev); end Previous; + --------------- + -- Reference -- + --------------- + + function Reference + (Container : not null access List; + Position : Cursor) return not null access Element_Type + is + begin + if not Has_Element (Container.all, Position) then + raise Constraint_Error with "Position cursor has no element"; + end if; + + return Container.Nodes (Position.Node).Element'Access; + end Reference; + --------------------- -- Replace_Element -- --------------------- diff --git a/gcc/ada/libgnat/a-cfdlli.ads b/gcc/ada/libgnat/a-cfdlli.ads index f7dbf04..8713d33 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -39,6 +39,11 @@ generic package Ada.Containers.Formal_Doubly_Linked_Lists with SPARK_Mode is + -- Contracts in this unit are meant for analysis only, not for run-time + -- checking. + + pragma Assertion_Policy (Pre => Ignore); + pragma Assertion_Policy (Post => Ignore); pragma Annotate (CodePeer, Skip_Analysis); type List (Capacity : Count_Type) is private with @@ -382,6 +387,53 @@ is Model (Container), P.Get (Positions (Container), Position)); + function At_End (E : access constant List) return access constant List + is (E) + with Ghost, + Annotate => (GNATprove, At_End_Borrow); + + function At_End + (E : access constant Element_Type) return access constant Element_Type + is (E) + with Ghost, + Annotate => (GNATprove, At_End_Borrow); + + function Constant_Reference + (Container : aliased List; + Position : Cursor) return not null access constant Element_Type + with + Global => null, + Pre => Has_Element (Container, Position), + Post => + Constant_Reference'Result.all = + Element (Model (Container), P.Get (Positions (Container), Position)); + + function Reference + (Container : not null access List; + Position : Cursor) return not null access Element_Type + with + Global => null, + Pre => Has_Element (Container.all, Position), + Post => + Length (Container.all) = Length (At_End (Container).all) + + -- Cursors are preserved + + and Positions (Container.all) = Positions (At_End (Container).all) + + -- Container will have Result.all at position Position + + and At_End (Reference'Result).all = + Element (Model (At_End (Container).all), + P.Get (Positions (At_End (Container).all), Position)) + + -- All other elements are preserved + + and M.Equal_Except + (Model (Container.all), + Model (At_End (Container).all), + P.Get (Positions (At_End (Container).all), Position)); + procedure Move (Target : in out List; Source : in out List) with Global => null, Pre => Target.Capacity >= Length (Source), @@ -1604,7 +1656,7 @@ private type Node_Type is record Prev : Count_Type'Base := -1; Next : Count_Type; - Element : Element_Type; + Element : aliased Element_Type; end record; function "=" (L, R : Node_Type) return Boolean is abstract; diff --git a/gcc/ada/libgnat/a-cfhama.adb b/gcc/ada/libgnat/a-cfhama.adb index b5c37d2..179b400 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- @@ -109,20 +109,21 @@ is ENode : Count_Type; begin - Node := Left.First.Node; + Node := First (Left).Node; while Node /= 0 loop ENode := Find (Container => Right, - Key => Left.Nodes (Node).Key).Node; + Key => Left.Content.Nodes (Node).Key).Node; if ENode = 0 or else - Right.Nodes (ENode).Element /= Left.Nodes (Node).Element + Right.Content.Nodes (ENode).Element /= + Left.Content.Nodes (Node).Element then return False; end if; - Node := HT_Ops.Next (Left, Node); + Node := HT_Ops.Next (Left.Content, Node); end loop; return True; @@ -145,7 +146,7 @@ is -------------------- procedure Insert_Element (Source_Node : Count_Type) is - N : Node_Type renames Source.Nodes (Source_Node); + N : Node_Type renames Source.Content.Nodes (Source_Node); begin Insert (Target, N.Key, N.Element); end Insert_Element; @@ -164,7 +165,7 @@ is Clear (Target); - Insert_Elements (Source); + Insert_Elements (Source.Content); end Assign; -------------- @@ -173,7 +174,7 @@ is function Capacity (Container : Map) return Count_Type is begin - return Container.Nodes'Length; + return Container.Content.Nodes'Length; end Capacity; ----------- @@ -182,9 +183,44 @@ is procedure Clear (Container : in out Map) is begin - HT_Ops.Clear (Container); + HT_Ops.Clear (Container.Content); end Clear; + ------------------------ + -- Constant_Reference -- + ------------------------ + + function Constant_Reference + (Container : aliased Map; + Position : Cursor) return not null access constant Element_Type + is + begin + if not Has_Element (Container, Position) then + raise Constraint_Error with "Position cursor has no element"; + end if; + + pragma Assert + (Vet (Container, Position), + "bad cursor in function Constant_Reference"); + + return Container.Content.Nodes (Position.Node).Element'Access; + end Constant_Reference; + + function Constant_Reference + (Container : aliased Map; + Key : Key_Type) return not null access constant Element_Type + is + Node : constant Count_Type := Find (Container, Key).Node; + + begin + if Node = 0 then + raise Constraint_Error with + "no element available because key not in map"; + end if; + + return Container.Content.Nodes (Node).Element'Access; + end Constant_Reference; + -------------- -- Contains -- -------------- @@ -214,18 +250,18 @@ is raise Capacity_Error; end if; - Target.Length := Source.Length; - Target.Free := Source.Free; + Target.Content.Length := Source.Content.Length; + Target.Content.Free := Source.Content.Free; H := 1; while H <= Source.Modulus loop - Target.Buckets (H) := Source.Buckets (H); + Target.Content.Buckets (H) := Source.Content.Buckets (H); H := H + 1; end loop; N := 1; while N <= Source.Capacity loop - Target.Nodes (N) := Source.Nodes (N); + Target.Content.Nodes (N) := Source.Content.Nodes (N); N := N + 1; end loop; @@ -255,7 +291,7 @@ is X : Count_Type; begin - Key_Ops.Delete_Key_Sans_Free (Container, Key, X); + Key_Ops.Delete_Key_Sans_Free (Container.Content, Key, X); if X = 0 then raise Constraint_Error with "attempt to delete key not in map"; @@ -273,7 +309,7 @@ is pragma Assert (Vet (Container, Position), "bad cursor in Delete"); - HT_Ops.Delete_Node_Sans_Free (Container, Position.Node); + HT_Ops.Delete_Node_Sans_Free (Container.Content, Position.Node); Free (Container, Position.Node); Position := No_Element; @@ -292,7 +328,7 @@ is "no element available because key not in map"; end if; - return Container.Nodes (Node).Element; + return Container.Content.Nodes (Node).Element; end Element; function Element (Container : Map; Position : Cursor) return Element_Type is @@ -304,7 +340,7 @@ is pragma Assert (Vet (Container, Position), "bad cursor in function Element"); - return Container.Nodes (Position.Node).Element; + return Container.Content.Nodes (Position.Node).Element; end Element; --------------------- @@ -326,7 +362,7 @@ is procedure Exclude (Container : in out Map; Key : Key_Type) is X : Count_Type; begin - Key_Ops.Delete_Key_Sans_Free (Container, Key, X); + Key_Ops.Delete_Key_Sans_Free (Container.Content, Key, X); Free (Container, X); end Exclude; @@ -335,7 +371,7 @@ is ---------- function Find (Container : Map; Key : Key_Type) return Cursor is - Node : constant Count_Type := Key_Ops.Find (Container, Key); + Node : constant Count_Type := Key_Ops.Find (Container.Content, Key); begin if Node = 0 then @@ -350,7 +386,7 @@ is ----------- function First (Container : Map) return Cursor is - Node : constant Count_Type := HT_Ops.First (Container); + Node : constant Count_Type := HT_Ops.First (Container.Content); begin if Node = 0 then @@ -407,7 +443,7 @@ is ---------- function Keys (Container : Map) return K.Sequence is - Position : Count_Type := HT_Ops.First (Container); + Position : Count_Type := HT_Ops.First (Container.Content); R : K.Sequence; begin @@ -415,8 +451,8 @@ is -- for their postconditions. while Position /= 0 loop - R := K.Add (R, Container.Nodes (Position).Key); - Position := HT_Ops.Next (Container, Position); + R := K.Add (R, Container.Content.Nodes (Position).Key); + Position := HT_Ops.Next (Container.Content, Position); end loop; return R; @@ -458,7 +494,7 @@ is ----------- function Model (Container : Map) return M.Map is - Position : Count_Type := HT_Ops.First (Container); + Position : Count_Type := HT_Ops.First (Container.Content); R : M.Map; begin @@ -469,10 +505,10 @@ is R := M.Add (Container => R, - New_Key => Container.Nodes (Position).Key, - New_Item => Container.Nodes (Position).Element); + New_Key => Container.Content.Nodes (Position).Key, + New_Item => Container.Content.Nodes (Position).Element); - Position := HT_Ops.Next (Container, Position); + Position := HT_Ops.Next (Container.Content, Position); end loop; return R; @@ -484,7 +520,7 @@ is function Positions (Container : Map) return P.Map is I : Count_Type := 1; - Position : Count_Type := HT_Ops.First (Container); + Position : Count_Type := HT_Ops.First (Container.Content); R : P.Map; begin @@ -494,7 +530,7 @@ is while Position /= 0 loop R := P.Add (R, (Node => Position), I); pragma Assert (P.Length (R) = I); - Position := HT_Ops.Next (Container, Position); + Position := HT_Ops.Next (Container.Content, Position); I := I + 1; end loop; @@ -511,8 +547,8 @@ is begin if X /= 0 then pragma Assert (X <= HT.Capacity); - HT.Nodes (X).Has_Element := False; - HT_Ops.Free (HT, X); + HT.Content.Nodes (X).Has_Element := False; + HT_Ops.Free (HT.Content, X); end if; end Free; @@ -525,8 +561,8 @@ is new HT_Ops.Generic_Allocate (Set_Element); begin - Allocate (HT, Node); - HT.Nodes (Node).Has_Element := True; + Allocate (HT.Content, Node); + HT.Content.Nodes (Node).Has_Element := True; end Generic_Allocate; ----------------- @@ -536,7 +572,7 @@ is function Has_Element (Container : Map; Position : Cursor) return Boolean is begin if Position.Node = 0 - or else not Container.Nodes (Position.Node).Has_Element + or else not Container.Content.Nodes (Position.Node).Has_Element then return False; else @@ -570,7 +606,7 @@ is if not Inserted then declare - N : Node_Type renames Container.Nodes (Position.Node); + N : Node_Type renames Container.Content.Nodes (Position.Node); begin N.Key := Key; N.Element := New_Item; @@ -625,7 +661,7 @@ is -- Start of processing for Insert begin - Local_Insert (Container, Key, Position.Node, Inserted); + Local_Insert (Container.Content, Key, Position.Node, Inserted); end Insert; procedure Insert @@ -668,7 +704,7 @@ is pragma Assert (Vet (Container, Position), "bad cursor in function Key"); - return Container.Nodes (Position.Node).Key; + return Container.Content.Nodes (Position.Node).Key; end Key; ------------ @@ -677,7 +713,7 @@ is function Length (Container : Map) return Count_Type is begin - return Container.Length; + return Container.Content.Length; end Length; ---------- @@ -688,7 +724,7 @@ is (Target : in out Map; Source : in out Map) is - NN : HT_Types.Nodes_Type renames Source.Nodes; + NN : HT_Types.Nodes_Type renames Source.Content.Nodes; X : Count_Type; Y : Count_Type; @@ -704,17 +740,17 @@ is Clear (Target); - if Source.Length = 0 then + if Source.Content.Length = 0 then return; end if; - X := HT_Ops.First (Source); + X := HT_Ops.First (Source.Content); while X /= 0 loop Insert (Target, NN (X).Key, NN (X).Element); -- optimize??? - Y := HT_Ops.Next (Source, X); + Y := HT_Ops.Next (Source.Content, X); - HT_Ops.Delete_Node_Sans_Free (Source, X); + HT_Ops.Delete_Node_Sans_Free (Source.Content, X); Free (Source, X); X := Y; @@ -743,7 +779,8 @@ is pragma Assert (Vet (Container, Position), "bad cursor in function Next"); declare - Node : constant Count_Type := HT_Ops.Next (Container, Position.Node); + Node : constant Count_Type := + HT_Ops.Next (Container.Content, Position.Node); begin if Node = 0 then @@ -759,6 +796,40 @@ is Position := Next (Container, Position); end Next; + --------------- + -- Reference -- + --------------- + + function Reference + (Container : not null access Map; + Position : Cursor) return not null access Element_Type + is + begin + if not Has_Element (Container.all, Position) then + raise Constraint_Error with "Position cursor has no element"; + end if; + + pragma Assert + (Vet (Container.all, Position), "bad cursor in function Reference"); + + return Container.Content.Nodes (Position.Node).Element'Access; + end Reference; + + function Reference + (Container : not null access Map; + Key : Key_Type) return not null access Element_Type + is + Node : constant Count_Type := Find (Container.all, Key).Node; + + begin + if Node = 0 then + raise Constraint_Error with + "no element available because key not in map"; + end if; + + return Container.Content.Nodes (Node).Element'Access; + end Reference; + ------------- -- Replace -- ------------- @@ -768,7 +839,7 @@ is Key : Key_Type; New_Item : Element_Type) is - Node : constant Count_Type := Key_Ops.Find (Container, Key); + Node : constant Count_Type := Key_Ops.Find (Container.Content, Key); begin if Node = 0 then @@ -776,7 +847,7 @@ is end if; declare - N : Node_Type renames Container.Nodes (Node); + N : Node_Type renames Container.Content.Nodes (Node); begin N.Key := Key; N.Element := New_Item; @@ -801,7 +872,7 @@ is pragma Assert (Vet (Container, Position), "bad cursor in Replace_Element"); - Container.Nodes (Position.Node).Element := New_Item; + Container.Content.Nodes (Position.Node).Element := New_Item; end Replace_Element; ---------------------- @@ -841,7 +912,7 @@ is X : Count_Type; begin - if Container.Length = 0 then + if Container.Content.Length = 0 then return False; end if; @@ -849,7 +920,7 @@ is return False; end if; - if Container.Buckets'Length = 0 then + if Container.Content.Buckets'Length = 0 then return False; end if; @@ -857,15 +928,17 @@ is return False; end if; - if Container.Nodes (Position.Node).Next = Position.Node then + if Container.Content.Nodes (Position.Node).Next = Position.Node then return False; end if; X := - Container.Buckets - (Key_Ops.Index (Container, Container.Nodes (Position.Node).Key)); + Container.Content.Buckets + (Key_Ops.Index + (Container.Content, + Container.Content.Nodes (Position.Node).Key)); - for J in 1 .. Container.Length loop + for J in 1 .. Container.Content.Length loop if X = Position.Node then return True; end if; @@ -874,14 +947,14 @@ is return False; end if; - if X = Container.Nodes (X).Next then + if X = Container.Content.Nodes (X).Next then -- Prevent unnecessary looping return False; end if; - X := Container.Nodes (X).Next; + X := Container.Content.Nodes (X).Next; end loop; return False; diff --git a/gcc/ada/libgnat/a-cfhama.ads b/gcc/ada/libgnat/a-cfhama.ads index 8a73508..2b49c13 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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,6 +64,11 @@ generic package Ada.Containers.Formal_Hashed_Maps with SPARK_Mode is + -- Contracts in this unit are meant for analysis only, not for run-time + -- checking. + + pragma Assertion_Policy (Pre => Ignore); + pragma Assertion_Policy (Post => Ignore); pragma Annotate (CodePeer, Skip_Analysis); type Map (Capacity : Count_Type; Modulus : Hash_Type) is private with @@ -389,6 +394,95 @@ is Model (Container)'Old, Key (Container, Position)); + function At_End + (E : not null access constant Map) return not null access constant Map + is (E) + with Ghost, + Annotate => (GNATprove, At_End_Borrow); + + function At_End + (E : access constant Element_Type) return access constant Element_Type + is (E) + with Ghost, + Annotate => (GNATprove, At_End_Borrow); + + function Constant_Reference + (Container : aliased Map; + Position : Cursor) return not null access constant Element_Type + with + Global => null, + Pre => Has_Element (Container, Position), + Post => + Constant_Reference'Result.all = + Element (Model (Container), Key (Container, Position)); + + function Reference + (Container : not null access Map; + Position : Cursor) return not null access Element_Type + with + Global => null, + Pre => Has_Element (Container.all, Position), + Post => + + -- Order of keys and cursors is preserved + + Keys (At_End (Container).all) = Keys (Container.all) + and Positions (At_End (Container).all) = Positions (Container.all) + + -- The value designated by the result of Reference is now associated + -- with the key at position Position in Container. + + and Element (At_End (Container).all, Position) = + At_End (Reference'Result).all + + -- Elements associated with other keys are preserved + + and M.Same_Keys + (Model (At_End (Container).all), + Model (Container.all)) + and M.Elements_Equal_Except + (Model (At_End (Container).all), + Model (Container.all), + Key (At_End (Container).all, Position)); + + function Constant_Reference + (Container : aliased Map; + Key : Key_Type) return not null access constant Element_Type + with + Global => null, + Pre => Contains (Container, Key), + Post => + Constant_Reference'Result.all = Element (Model (Container), Key); + + function Reference + (Container : not null access Map; + Key : Key_Type) return not null access Element_Type + with + Global => null, + Pre => Contains (Container.all, Key), + Post => + + -- Order of keys and cursors is preserved + + Keys (At_End (Container).all) = Keys (Container.all) + and Positions (At_End (Container).all) = Positions (Container.all) + + -- The value designated by the result of Reference is now associated + -- with Key in Container. + + and Element (Model (At_End (Container).all), Key) = + At_End (Reference'Result).all + + -- Elements associated with other keys are preserved + + and M.Same_Keys + (Model (At_End (Container).all), + Model (Container.all)) + and M.Elements_Equal_Except + (Model (At_End (Container).all), + Model (Container.all), + Key); + procedure Move (Target : in out Map; Source : in out Map) with Global => null, Pre => Target.Capacity >= Length (Source), @@ -799,7 +893,7 @@ private type Node_Type is record Key : Key_Type; - Element : Element_Type; + Element : aliased Element_Type; Next : Count_Type; Has_Element : Boolean := False; end record; @@ -807,8 +901,9 @@ private package HT_Types is new Ada.Containers.Hash_Tables.Generic_Bounded_Hash_Table_Types (Node_Type); - type Map (Capacity : Count_Type; Modulus : Hash_Type) is - new HT_Types.Hash_Table_Type (Capacity, Modulus) with null record; + type Map (Capacity : Count_Type; Modulus : Hash_Type) is record + Content : HT_Types.Hash_Table_Type (Capacity, Modulus); + end record; Empty_Map : constant Map := (Capacity => 0, Modulus => 0, others => <>); diff --git a/gcc/ada/libgnat/a-cfhase.adb b/gcc/ada/libgnat/a-cfhase.adb index 121708c..cdb8a98 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- @@ -136,15 +136,16 @@ is ENode := Find (Container => Right, - Item => Left.Nodes (Node).Element).Node; + Item => Left.Content.Nodes (Node).Element).Node; if ENode = 0 - or else Right.Nodes (ENode).Element /= Left.Nodes (Node).Element + or else Right.Content.Nodes (ENode).Element /= + Left.Content.Nodes (Node).Element then return False; end if; - Node := HT_Ops.Next (Left, Node); + Node := HT_Ops.Next (Left.Content, Node); end loop; return True; @@ -166,7 +167,7 @@ is -------------------- procedure Insert_Element (Source_Node : Count_Type) is - N : Node_Type renames Source.Nodes (Source_Node); + N : Node_Type renames Source.Content.Nodes (Source_Node); X : Count_Type; B : Boolean; @@ -186,8 +187,8 @@ is raise Storage_Error with "not enough capacity"; -- SE or CE? ??? end if; - HT_Ops.Clear (Target); - Insert_Elements (Source); + HT_Ops.Clear (Target.Content); + Insert_Elements (Source.Content); end Assign; -------------- @@ -196,7 +197,7 @@ is function Capacity (Container : Set) return Count_Type is begin - return Container.Nodes'Length; + return Container.Content.Nodes'Length; end Capacity; ----------- @@ -205,9 +206,28 @@ is procedure Clear (Container : in out Set) is begin - HT_Ops.Clear (Container); + HT_Ops.Clear (Container.Content); end Clear; + ------------------------ + -- Constant_Reference -- + ------------------------ + + function Constant_Reference + (Container : aliased Set; + Position : Cursor) return not null access constant Element_Type + is + begin + if not Has_Element (Container, Position) then + raise Constraint_Error with "Position cursor equals No_Element"; + end if; + + pragma Assert + (Vet (Container, Position), "bad cursor in function Element"); + + return Container.Content.Nodes (Position.Node).Element'Access; + end Constant_Reference; + -------------- -- Contains -- -------------- @@ -237,18 +257,18 @@ is raise Capacity_Error; end if; - Target.Length := Source.Length; - Target.Free := Source.Free; + Target.Content.Length := Source.Content.Length; + Target.Content.Free := Source.Content.Free; H := 1; while H <= Source.Modulus loop - Target.Buckets (H) := Source.Buckets (H); + Target.Content.Buckets (H) := Source.Content.Buckets (H); H := H + 1; end loop; N := 1; while N <= Source.Capacity loop - Target.Nodes (N) := Source.Nodes (N); + Target.Content.Nodes (N) := Source.Content.Nodes (N); N := N + 1; end loop; @@ -278,7 +298,7 @@ is X : Count_Type; begin - Element_Keys.Delete_Key_Sans_Free (Container, Item, X); + Element_Keys.Delete_Key_Sans_Free (Container.Content, Item, X); if X = 0 then raise Constraint_Error with "attempt to delete element not in set"; @@ -295,7 +315,7 @@ is pragma Assert (Vet (Container, Position), "bad cursor in Delete"); - HT_Ops.Delete_Node_Sans_Free (Container, Position.Node); + HT_Ops.Delete_Node_Sans_Free (Container.Content, Position.Node); Free (Container, Position.Node); Position := No_Element; @@ -311,8 +331,8 @@ is Src_Node : Count_Type; Tgt_Node : Count_Type; - TN : Nodes_Type renames Target.Nodes; - SN : Nodes_Type renames Source.Nodes; + TN : Nodes_Type renames Target.Content.Nodes; + SN : Nodes_Type renames Source.Content.Nodes; begin if Target'Address = Source'Address then @@ -320,44 +340,45 @@ is return; end if; - Src_Length := Source.Length; + Src_Length := Source.Content.Length; if Src_Length = 0 then return; end if; - if Src_Length >= Target.Length then - Tgt_Node := HT_Ops.First (Target); + if Src_Length >= Target.Content.Length then + Tgt_Node := HT_Ops.First (Target.Content); while Tgt_Node /= 0 loop - if Element_Keys.Find (Source, TN (Tgt_Node).Element) /= 0 then + if Element_Keys.Find (Source.Content, TN (Tgt_Node).Element) /= 0 + then declare X : constant Count_Type := Tgt_Node; begin - Tgt_Node := HT_Ops.Next (Target, Tgt_Node); - HT_Ops.Delete_Node_Sans_Free (Target, X); + Tgt_Node := HT_Ops.Next (Target.Content, Tgt_Node); + HT_Ops.Delete_Node_Sans_Free (Target.Content, X); Free (Target, X); end; else - Tgt_Node := HT_Ops.Next (Target, Tgt_Node); + Tgt_Node := HT_Ops.Next (Target.Content, Tgt_Node); end if; end loop; return; else - Src_Node := HT_Ops.First (Source); + Src_Node := HT_Ops.First (Source.Content); Src_Last := 0; end if; while Src_Node /= Src_Last loop - Tgt_Node := Element_Keys.Find (Target, SN (Src_Node).Element); + Tgt_Node := Element_Keys.Find (Target.Content, SN (Src_Node).Element); if Tgt_Node /= 0 then - HT_Ops.Delete_Node_Sans_Free (Target, Tgt_Node); + HT_Ops.Delete_Node_Sans_Free (Target.Content, Tgt_Node); Free (Target, Tgt_Node); end if; - Src_Node := HT_Ops.Next (Source, Src_Node); + Src_Node := HT_Ops.Next (Source.Content, Src_Node); end loop; end Difference; @@ -373,7 +394,7 @@ is procedure Process (L_Node : Count_Type) is B : Boolean; - E : Element_Type renames Left.Nodes (L_Node).Element; + E : Element_Type renames Left.Content.Nodes (L_Node).Element; X : Count_Type; begin @@ -386,7 +407,7 @@ is -- Start of processing for Difference begin - Iterate (Left); + Iterate (Left.Content); end Difference; function Difference (Left : Set; Right : Set) return Set is @@ -403,7 +424,7 @@ is end if; if Length (Right) = 0 then - return Left.Copy; + return Copy (Left); end if; C := Length (Left); @@ -430,7 +451,7 @@ is pragma Assert (Vet (Container, Position), "bad cursor in function Element"); - return Container.Nodes (Position.Node).Element; + return Container.Content.Nodes (Position.Node).Element; end Element; --------------------- @@ -479,7 +500,7 @@ is -- Start of processing for Equivalent_Sets begin - return Is_Equivalent (Left, Right); + return Is_Equivalent (Left.Content, Right.Content); end Equivalent_Sets; --------------------- @@ -501,7 +522,7 @@ is procedure Exclude (Container : in out Set; Item : Element_Type) is X : Count_Type; begin - Element_Keys.Delete_Key_Sans_Free (Container, Item, X); + Element_Keys.Delete_Key_Sans_Free (Container.Content, Item, X); Free (Container, X); end Exclude; @@ -513,7 +534,8 @@ is (Container : Set; Item : Element_Type) return Cursor is - Node : constant Count_Type := Element_Keys.Find (Container, Item); + Node : constant Count_Type := + Element_Keys.Find (Container.Content, Item); begin if Node = 0 then @@ -528,7 +550,7 @@ is ----------- function First (Container : Set) return Cursor is - Node : constant Count_Type := HT_Ops.First (Container); + Node : constant Count_Type := HT_Ops.First (Container.Content); begin if Node = 0 then @@ -632,7 +654,7 @@ is -------------- function Elements (Container : Set) return E.Sequence is - Position : Count_Type := HT_Ops.First (Container); + Position : Count_Type := HT_Ops.First (Container.Content); R : E.Sequence; begin @@ -640,8 +662,8 @@ is -- for their postconditions. while Position /= 0 loop - R := E.Add (R, Container.Nodes (Position).Element); - Position := HT_Ops.Next (Container, Position); + R := E.Add (R, Container.Content.Nodes (Position).Element); + Position := HT_Ops.Next (Container.Content, Position); end loop; return R; @@ -710,7 +732,7 @@ is ----------- function Model (Container : Set) return M.Set is - Position : Count_Type := HT_Ops.First (Container); + Position : Count_Type := HT_Ops.First (Container.Content); R : M.Set; begin @@ -721,9 +743,9 @@ is R := M.Add (Container => R, - Item => Container.Nodes (Position).Element); + Item => Container.Content.Nodes (Position).Element); - Position := HT_Ops.Next (Container, Position); + Position := HT_Ops.Next (Container.Content, Position); end loop; return R; @@ -735,7 +757,7 @@ is function Positions (Container : Set) return P.Map is I : Count_Type := 1; - Position : Count_Type := HT_Ops.First (Container); + Position : Count_Type := HT_Ops.First (Container.Content); R : P.Map; begin @@ -745,7 +767,7 @@ is while Position /= 0 loop R := P.Add (R, (Node => Position), I); pragma Assert (P.Length (R) = I); - Position := HT_Ops.Next (Container, Position); + Position := HT_Ops.Next (Container.Content, Position); I := I + 1; end loop; @@ -762,8 +784,8 @@ is begin if X /= 0 then pragma Assert (X <= HT.Capacity); - HT.Nodes (X).Has_Element := False; - HT_Ops.Free (HT, X); + HT.Content.Nodes (X).Has_Element := False; + HT_Ops.Free (HT.Content, X); end if; end Free; @@ -774,8 +796,8 @@ is procedure Generic_Allocate (HT : in out Set; Node : out Count_Type) is procedure Allocate is new HT_Ops.Generic_Allocate (Set_Element); begin - Allocate (HT, Node); - HT.Nodes (Node).Has_Element := True; + Allocate (HT.Content, Node); + HT.Content.Nodes (Node).Has_Element := True; end Generic_Allocate; package body Generic_Keys with SPARK_Mode => Off is @@ -821,7 +843,7 @@ is X : Count_Type; begin - Key_Keys.Delete_Key_Sans_Free (Container, Key, X); + Key_Keys.Delete_Key_Sans_Free (Container.Content, Key, X); if X = 0 then raise Constraint_Error with "attempt to delete key not in set"; @@ -845,7 +867,7 @@ is raise Constraint_Error with "key not in map"; end if; - return Container.Nodes (Node).Element; + return Container.Content.Nodes (Node).Element; end Element; ------------------------- @@ -867,7 +889,7 @@ is procedure Exclude (Container : in out Set; Key : Key_Type) is X : Count_Type; begin - Key_Keys.Delete_Key_Sans_Free (Container, Key, X); + Key_Keys.Delete_Key_Sans_Free (Container.Content, Key, X); Free (Container, X); end Exclude; @@ -879,7 +901,7 @@ is (Container : Set; Key : Key_Type) return Cursor is - Node : constant Count_Type := Key_Keys.Find (Container, Key); + Node : constant Count_Type := Key_Keys.Find (Container.Content, Key); begin return (if Node = 0 then No_Element else (Node => Node)); end Find; @@ -927,7 +949,7 @@ is (Vet (Container, Position), "bad cursor in function Key"); declare - N : Node_Type renames Container.Nodes (Position.Node); + N : Node_Type renames Container.Content.Nodes (Position.Node); begin return Key (N.Element); end; @@ -942,14 +964,14 @@ is Key : Key_Type; New_Item : Element_Type) is - Node : constant Count_Type := Key_Keys.Find (Container, Key); + Node : constant Count_Type := Key_Keys.Find (Container.Content, Key); begin if Node = 0 then raise Constraint_Error with "attempt to replace key not in set"; end if; - Replace_Element (Container, Node, New_Item); + Replace_Element (Container.Content, Node, New_Item); end Replace; end Generic_Keys; @@ -961,7 +983,7 @@ is function Has_Element (Container : Set; Position : Cursor) return Boolean is begin if Position.Node = 0 - or else not Container.Nodes (Position.Node).Has_Element + or else not Container.Content.Nodes (Position.Node).Has_Element then return False; end if; @@ -990,7 +1012,7 @@ is Insert (Container, New_Item, Position, Inserted); if not Inserted then - Container.Nodes (Position.Node).Element := New_Item; + Container.Content.Nodes (Position.Node).Element := New_Item; end if; end Include; @@ -1062,7 +1084,7 @@ is -- Start of processing for Insert begin - Local_Insert (Container, New_Item, Node, Inserted); + Local_Insert (Container.Content, New_Item, Node, Inserted); end Insert; ------------------ @@ -1071,29 +1093,29 @@ is procedure Intersection (Target : in out Set; Source : Set) is Tgt_Node : Count_Type; - TN : Nodes_Type renames Target.Nodes; + TN : Nodes_Type renames Target.Content.Nodes; begin if Target'Address = Source'Address then return; end if; - if Source.Length = 0 then + if Source.Content.Length = 0 then Clear (Target); return; end if; - Tgt_Node := HT_Ops.First (Target); + Tgt_Node := HT_Ops.First (Target.Content); while Tgt_Node /= 0 loop if Find (Source, TN (Tgt_Node).Element).Node /= 0 then - Tgt_Node := HT_Ops.Next (Target, Tgt_Node); + Tgt_Node := HT_Ops.Next (Target.Content, Tgt_Node); else declare X : constant Count_Type := Tgt_Node; begin - Tgt_Node := HT_Ops.Next (Target, Tgt_Node); - HT_Ops.Delete_Node_Sans_Free (Target, X); + Tgt_Node := HT_Ops.Next (Target.Content, Tgt_Node); + HT_Ops.Delete_Node_Sans_Free (Target.Content, X); Free (Target, X); end; end if; @@ -1111,7 +1133,7 @@ is ------------- procedure Process (L_Node : Count_Type) is - E : Element_Type renames Left.Nodes (L_Node).Element; + E : Element_Type renames Left.Content.Nodes (L_Node).Element; X : Count_Type; B : Boolean; @@ -1125,7 +1147,7 @@ is -- Start of processing for Intersection begin - Iterate (Left); + Iterate (Left.Content); end Intersection; function Intersection (Left : Set; Right : Set) return Set is @@ -1134,7 +1156,7 @@ is begin if Left'Address = Right'Address then - return Left.Copy; + return Copy (Left); end if; C := Count_Type'Min (Length (Left), Length (Right)); -- ??? @@ -1162,7 +1184,7 @@ is function Is_In (HT : Set; Key : Node_Type) return Boolean is begin - return Element_Keys.Find (HT, Key.Element) /= 0; + return Element_Keys.Find (HT.Content, Key.Element) /= 0; end Is_In; --------------- @@ -1171,7 +1193,7 @@ is function Is_Subset (Subset : Set; Of_Set : Set) return Boolean is Subset_Node : Count_Type; - Subset_Nodes : Nodes_Type renames Subset.Nodes; + Subset_Nodes : Nodes_Type renames Subset.Content.Nodes; begin if Subset'Address = Of_Set'Address then @@ -1194,7 +1216,7 @@ is end if; end; - Subset_Node := HT_Ops.Next (Subset, Subset_Node); + Subset_Node := HT_Ops.Next (Subset.Content, Subset_Node); end loop; return True; @@ -1206,7 +1228,7 @@ is function Length (Container : Set) return Count_Type is begin - return Container.Length; + return Container.Content.Length; end Length; ---------- @@ -1216,7 +1238,7 @@ is -- Comments??? procedure Move (Target : in out Set; Source : in out Set) is - NN : HT_Types.Nodes_Type renames Source.Nodes; + NN : HT_Types.Nodes_Type renames Source.Content.Nodes; X, Y : Count_Type; begin @@ -1231,17 +1253,17 @@ is Clear (Target); - if Source.Length = 0 then + if Source.Content.Length = 0 then return; end if; - X := HT_Ops.First (Source); + X := HT_Ops.First (Source.Content); while X /= 0 loop Insert (Target, NN (X).Element); -- optimize??? - Y := HT_Ops.Next (Source, X); + Y := HT_Ops.Next (Source.Content, X); - HT_Ops.Delete_Node_Sans_Free (Source, X); + HT_Ops.Delete_Node_Sans_Free (Source.Content, X); Free (Source, X); X := Y; @@ -1269,7 +1291,7 @@ is pragma Assert (Vet (Container, Position), "bad cursor in Next"); - return (Node => HT_Ops.Next (Container, Position.Node)); + return (Node => HT_Ops.Next (Container.Content, Position.Node)); end Next; procedure Next (Container : Set; Position : in out Cursor) is @@ -1283,7 +1305,7 @@ is function Overlap (Left, Right : Set) return Boolean is Left_Node : Count_Type; - Left_Nodes : Nodes_Type renames Left.Nodes; + Left_Nodes : Nodes_Type renames Left.Content.Nodes; begin if Length (Right) = 0 or Length (Left) = 0 then @@ -1305,7 +1327,7 @@ is end if; end; - Left_Node := HT_Ops.Next (Left, Left_Node); + Left_Node := HT_Ops.Next (Left.Content, Left_Node); end loop; return False; @@ -1316,14 +1338,15 @@ is ------------- procedure Replace (Container : in out Set; New_Item : Element_Type) is - Node : constant Count_Type := Element_Keys.Find (Container, New_Item); + Node : constant Count_Type := + Element_Keys.Find (Container.Content, New_Item); begin if Node = 0 then raise Constraint_Error with "attempt to replace element not in set"; end if; - Container.Nodes (Node).Element := New_Item; + Container.Content.Nodes (Node).Element := New_Item; end Replace; --------------------- @@ -1343,7 +1366,7 @@ is pragma Assert (Vet (Container, Position), "bad cursor in Replace_Element"); - Replace_Element (Container, Position.Node, New_Item); + Replace_Element (Container.Content, Position.Node, New_Item); end Replace_Element; ---------------------- @@ -1394,7 +1417,7 @@ is procedure Process (Source_Node : Count_Type) is B : Boolean; - N : Node_Type renames Source.Nodes (Source_Node); + N : Node_Type renames Source.Content.Nodes (Source_Node); X : Count_Type; begin @@ -1419,7 +1442,7 @@ is return; end if; - Iterate (Source); + Iterate (Source.Content); end Symmetric_Difference; function Symmetric_Difference (Left : Set; Right : Set) return Set is @@ -1432,11 +1455,11 @@ is end if; if Length (Right) = 0 then - return Left.Copy; + return Copy (Left); end if; if Length (Left) = 0 then - return Right.Copy; + return Copy (Right); end if; C := Length (Left) + Length (Right); @@ -1478,7 +1501,7 @@ is ------------- procedure Process (Src_Node : Count_Type) is - N : Node_Type renames Source.Nodes (Src_Node); + N : Node_Type renames Source.Content.Nodes (Src_Node); E : Element_Type renames N.Element; X : Count_Type; @@ -1495,7 +1518,7 @@ is return; end if; - Iterate (Source); + Iterate (Source.Content); end Union; function Union (Left : Set; Right : Set) return Set is @@ -1504,15 +1527,15 @@ is begin if Left'Address = Right'Address then - return Left.Copy; + return Copy (Left); end if; if Length (Right) = 0 then - return Left.Copy; + return Copy (Left); end if; if Length (Left) = 0 then - return Right.Copy; + return Copy (Right); end if; C := Length (Left) + Length (Right); @@ -1535,11 +1558,11 @@ is declare S : Set renames Container; - N : Nodes_Type renames S.Nodes; + N : Nodes_Type renames S.Content.Nodes; X : Count_Type; begin - if S.Length = 0 then + if S.Content.Length = 0 then return False; end if; @@ -1551,9 +1574,10 @@ is return False; end if; - X := S.Buckets (Element_Keys.Index (S, N (Position.Node).Element)); + X := S.Content.Buckets + (Element_Keys.Index (S.Content, N (Position.Node).Element)); - for J in 1 .. S.Length loop + for J in 1 .. S.Content.Length loop if X = Position.Node then return True; end if; diff --git a/gcc/ada/libgnat/a-cfhase.ads b/gcc/ada/libgnat/a-cfhase.ads index 37022ca..9bcd8ce 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -62,6 +62,11 @@ generic package Ada.Containers.Formal_Hashed_Sets with SPARK_Mode is + -- Contracts in this unit are meant for analysis only, not for run-time + -- checking. + + pragma Assertion_Policy (Pre => Ignore); + pragma Assertion_Policy (Post => Ignore); pragma Annotate (CodePeer, Skip_Analysis); type Set (Capacity : Count_Type; Modulus : Hash_Type) is private with @@ -510,6 +515,16 @@ is Position => Position) and Positions (Container) = Positions (Container)'Old; + function Constant_Reference + (Container : aliased Set; + Position : Cursor) return not null access constant Element_Type + with + Global => null, + Pre => Has_Element (Container, Position), + Post => + Constant_Reference'Result.all = + E.Get (Elements (Container), P.Get (Positions (Container), Position)); + procedure Move (Target : in out Set; Source : in out Set) with Global => null, Pre => Target.Capacity >= Length (Source), @@ -1457,7 +1472,7 @@ private type Node_Type is record - Element : Element_Type; + Element : aliased Element_Type; Next : Count_Type; Has_Element : Boolean := False; end record; @@ -1465,8 +1480,9 @@ private package HT_Types is new Ada.Containers.Hash_Tables.Generic_Bounded_Hash_Table_Types (Node_Type); - type Set (Capacity : Count_Type; Modulus : Hash_Type) is - new HT_Types.Hash_Table_Type (Capacity, Modulus) with null record; + type Set (Capacity : Count_Type; Modulus : Hash_Type) is record + Content : HT_Types.Hash_Table_Type (Capacity, Modulus); + end record; use HT_Types; diff --git a/gcc/ada/libgnat/a-cfinve.adb b/gcc/ada/libgnat/a-cfinve.adb index e424df0..d0c7e82 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- @@ -184,6 +184,28 @@ is Free (Container.Elements_Ptr); end Clear; + ------------------------ + -- Constant_Reference -- + ------------------------ + + function Constant_Reference + (Container : aliased Vector; + Index : Index_Type) return not null access constant Element_Type + is + begin + if Index > Container.Last then + raise Constraint_Error with "Index is out of range"; + end if; + + declare + II : constant Int'Base := Int (Index) - Int (No_Index); + I : constant Capacity_Range := Capacity_Range (II); + + begin + return Constant_Reference (Elemsc (Container) (I)); + end; + end Constant_Reference; + -------------- -- Contains -- -------------- @@ -1180,6 +1202,32 @@ is Insert (Container, Index_Type'First, New_Item, Count); end Prepend; + --------------- + -- Reference -- + --------------- + + function Reference + (Container : not null access Vector; + Index : Index_Type) return not null access Element_Type + is + begin + if Index > Container.Last then + raise Constraint_Error with "Index is out of range"; + end if; + + declare + II : constant Int'Base := Int (Index) - Int (No_Index); + I : constant Capacity_Range := Capacity_Range (II); + + begin + if Container.Elements_Ptr = null then + return Reference (Container.Elements (I)'Access); + else + return Reference (Container.Elements_Ptr (I)'Access); + end if; + end; + end Reference; + --------------------- -- Replace_Element -- --------------------- diff --git a/gcc/ada/libgnat/a-cfinve.ads b/gcc/ada/libgnat/a-cfinve.ads index 3e2e350..9b95437 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2021, 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 -- @@ -55,6 +55,11 @@ generic package Ada.Containers.Formal_Indefinite_Vectors with SPARK_Mode => On is + -- Contracts in this unit are meant for analysis only, not for run-time + -- checking. + + pragma Assertion_Policy (Pre => Ignore); + pragma Assertion_Policy (Post => Ignore); pragma Annotate (CodePeer, Skip_Analysis); subtype Extended_Index is Index_Type'Base @@ -306,6 +311,48 @@ is Right => Model (Container), Position => Index); + function At_End (E : access constant Vector) return access constant Vector + is (E) + with Ghost, + Annotate => (GNATprove, At_End_Borrow); + + function At_End + (E : access constant Element_Type) return access constant Element_Type + is (E) + with Ghost, + Annotate => (GNATprove, At_End_Borrow); + + function Constant_Reference + (Container : aliased Vector; + Index : Index_Type) return not null access constant Element_Type + with + Global => null, + Pre => Index in First_Index (Container) .. Last_Index (Container), + Post => + Constant_Reference'Result.all = Element (Model (Container), Index); + + function Reference + (Container : not null access Vector; + Index : Index_Type) return not null access Element_Type + with + Global => null, + Pre => + Index in First_Index (Container.all) .. Last_Index (Container.all), + Post => + Length (Container.all) = Length (At_End (Container).all) + + -- Container will have Result.all at index Index + + and At_End (Reference'Result).all = + Element (Model (At_End (Container).all), Index) + + -- All other elements are preserved + + and M.Equal_Except + (Left => Model (Container.all), + Right => Model (At_End (Container).all), + Position => Index); + procedure Insert (Container : in out Vector; Before : Extended_Index; @@ -904,7 +951,7 @@ private use Holders; subtype Array_Index is Capacity_Range range 1 .. Capacity_Range'Last; - type Elements_Array is array (Array_Index range <>) of Holder; + type Elements_Array is array (Array_Index range <>) of aliased Holder; function "=" (L, R : Elements_Array) return Boolean is abstract; type Elements_Array_Ptr is access all Elements_Array; diff --git a/gcc/ada/libgnat/a-cforma.adb b/gcc/ada/libgnat/a-cforma.adb index 004b31e..45f9be7 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- @@ -133,19 +133,20 @@ is return True; end if; - Lst := Next (Left, Last (Left).Node); + Lst := Next (Left.Content, Last (Left).Node); Node := First (Left).Node; while Node /= Lst loop - ENode := Find (Right, Left.Nodes (Node).Key).Node; + ENode := Find (Right, Left.Content.Nodes (Node).Key).Node; if ENode = 0 or else - Left.Nodes (Node).Element /= Right.Nodes (ENode).Element + Left.Content.Nodes (Node).Element /= + Right.Content.Nodes (ENode).Element then return False; end if; - Node := Next (Left, Node); + Node := Next (Left.Content, Node); end loop; return True; @@ -166,7 +167,7 @@ is -------------------- procedure Append_Element (Source_Node : Count_Type) is - SN : Node_Type renames Source.Nodes (Source_Node); + SN : Node_Type renames Source.Content.Nodes (Source_Node); procedure Set_Element (Node : in out Node_Type); pragma Inline (Set_Element); @@ -193,7 +194,7 @@ is function New_Node return Count_Type is Result : Count_Type; begin - Allocate (Target, Result); + Allocate (Target.Content, Result); return Result; end New_Node; @@ -213,7 +214,7 @@ is begin Unconditional_Insert_Avec_Hint - (Tree => Target, + (Tree => Target.Content, Hint => 0, Key => SN.Key, Node => Target_Node); @@ -230,8 +231,8 @@ is raise Storage_Error with "not enough capacity"; -- SE or CE? ??? end if; - Tree_Operations.Clear_Tree (Target); - Append_Elements (Source); + Tree_Operations.Clear_Tree (Target.Content); + Append_Elements (Source.Content); end Assign; ------------- @@ -239,7 +240,7 @@ is ------------- function Ceiling (Container : Map; Key : Key_Type) return Cursor is - Node : constant Count_Type := Key_Ops.Ceiling (Container, Key); + Node : constant Count_Type := Key_Ops.Ceiling (Container.Content, Key); begin if Node = 0 then @@ -255,7 +256,7 @@ is procedure Clear (Container : in out Map) is begin - Tree_Operations.Clear_Tree (Container); + Tree_Operations.Clear_Tree (Container.Content); end Clear; ----------- @@ -267,6 +268,40 @@ is return Node.Color; end Color; + ------------------------ + -- Constant_Reference -- + ------------------------ + + function Constant_Reference + (Container : aliased Map; + Position : Cursor) return not null access constant Element_Type + is + begin + if not Has_Element (Container, Position) then + raise Constraint_Error with "Position cursor has no element"; + end if; + + pragma Assert (Vet (Container.Content, Position.Node), + "bad cursor in function Constant_Reference"); + + return Container.Content.Nodes (Position.Node).Element'Access; + end Constant_Reference; + + function Constant_Reference + (Container : aliased Map; + Key : Key_Type) return not null access constant Element_Type + is + Node : constant Node_Access := Find (Container, Key).Node; + + begin + if Node = 0 then + raise Constraint_Error with + "no element available because key not in map"; + end if; + + return Container.Content.Nodes (Node).Element'Access; + end Constant_Reference; + -------------- -- Contains -- -------------- @@ -291,33 +326,33 @@ is return Target : Map (Count_Type'Max (Source.Capacity, Capacity)) do if Length (Source) > 0 then - Target.Length := Source.Length; - Target.Root := Source.Root; - Target.First := Source.First; - Target.Last := Source.Last; - Target.Free := Source.Free; + Target.Content.Length := Source.Content.Length; + Target.Content.Root := Source.Content.Root; + Target.Content.First := Source.Content.First; + Target.Content.Last := Source.Content.Last; + Target.Content.Free := Source.Content.Free; while Node <= Source.Capacity loop - Target.Nodes (Node).Element := - Source.Nodes (Node).Element; - Target.Nodes (Node).Key := - Source.Nodes (Node).Key; - Target.Nodes (Node).Parent := - Source.Nodes (Node).Parent; - Target.Nodes (Node).Left := - Source.Nodes (Node).Left; - Target.Nodes (Node).Right := - Source.Nodes (Node).Right; - Target.Nodes (Node).Color := - Source.Nodes (Node).Color; - Target.Nodes (Node).Has_Element := - Source.Nodes (Node).Has_Element; + Target.Content.Nodes (Node).Element := + Source.Content.Nodes (Node).Element; + Target.Content.Nodes (Node).Key := + Source.Content.Nodes (Node).Key; + Target.Content.Nodes (Node).Parent := + Source.Content.Nodes (Node).Parent; + Target.Content.Nodes (Node).Left := + Source.Content.Nodes (Node).Left; + Target.Content.Nodes (Node).Right := + Source.Content.Nodes (Node).Right; + Target.Content.Nodes (Node).Color := + Source.Content.Nodes (Node).Color; + Target.Content.Nodes (Node).Has_Element := + Source.Content.Nodes (Node).Has_Element; Node := Node + 1; end loop; while Node <= Target.Capacity loop N := Node; - Formal_Ordered_Maps.Free (Tree => Target, X => N); + Free (Tree => Target, X => N); Node := Node + 1; end loop; end if; @@ -335,25 +370,25 @@ is "Position cursor of Delete has no element"; end if; - pragma Assert (Vet (Container, Position.Node), + pragma Assert (Vet (Container.Content, Position.Node), "Position cursor of Delete is bad"); - Tree_Operations.Delete_Node_Sans_Free (Container, + Tree_Operations.Delete_Node_Sans_Free (Container.Content, Position.Node); - Formal_Ordered_Maps.Free (Container, Position.Node); + Free (Container, Position.Node); Position := No_Element; end Delete; procedure Delete (Container : in out Map; Key : Key_Type) is - X : constant Node_Access := Key_Ops.Find (Container, Key); + X : constant Node_Access := Key_Ops.Find (Container.Content, Key); begin if X = 0 then raise Constraint_Error with "key not in map"; end if; - Tree_Operations.Delete_Node_Sans_Free (Container, X); - Formal_Ordered_Maps.Free (Container, X); + Tree_Operations.Delete_Node_Sans_Free (Container.Content, X); + Free (Container, X); end Delete; ------------------ @@ -364,8 +399,8 @@ is X : constant Node_Access := First (Container).Node; begin if X /= 0 then - Tree_Operations.Delete_Node_Sans_Free (Container, X); - Formal_Ordered_Maps.Free (Container, X); + Tree_Operations.Delete_Node_Sans_Free (Container.Content, X); + Free (Container, X); end if; end Delete_First; @@ -377,8 +412,8 @@ is X : constant Node_Access := Last (Container).Node; begin if X /= 0 then - Tree_Operations.Delete_Node_Sans_Free (Container, X); - Formal_Ordered_Maps.Free (Container, X); + Tree_Operations.Delete_Node_Sans_Free (Container.Content, X); + Free (Container, X); end if; end Delete_Last; @@ -393,10 +428,10 @@ is "Position cursor of function Element has no element"; end if; - pragma Assert (Vet (Container, Position.Node), + pragma Assert (Vet (Container.Content, Position.Node), "Position cursor of function Element is bad"); - return Container.Nodes (Position.Node).Element; + return Container.Content.Nodes (Position.Node).Element; end Element; @@ -408,7 +443,7 @@ is raise Constraint_Error with "key not in map"; end if; - return Container.Nodes (Node).Element; + return Container.Content.Nodes (Node).Element; end Element; --------------------- @@ -431,11 +466,11 @@ is ------------- procedure Exclude (Container : in out Map; Key : Key_Type) is - X : constant Node_Access := Key_Ops.Find (Container, Key); + X : constant Node_Access := Key_Ops.Find (Container.Content, Key); begin if X /= 0 then - Tree_Operations.Delete_Node_Sans_Free (Container, X); - Formal_Ordered_Maps.Free (Container, X); + Tree_Operations.Delete_Node_Sans_Free (Container.Content, X); + Free (Container, X); end if; end Exclude; @@ -444,7 +479,7 @@ is ---------- function Find (Container : Map; Key : Key_Type) return Cursor is - Node : constant Count_Type := Key_Ops.Find (Container, Key); + Node : constant Count_Type := Key_Ops.Find (Container.Content, Key); begin if Node = 0 then @@ -464,7 +499,7 @@ is return No_Element; end if; - return (Node => Container.First); + return (Node => Container.Content.First); end First; ------------------- @@ -477,7 +512,7 @@ is raise Constraint_Error with "map is empty"; end if; - return Container.Nodes (First (Container).Node).Element; + return Container.Content.Nodes (First (Container).Node).Element; end First_Element; --------------- @@ -490,7 +525,7 @@ is raise Constraint_Error with "map is empty"; end if; - return Container.Nodes (First (Container).Node).Key; + return Container.Content.Nodes (First (Container).Node).Key; end First_Key; ----------- @@ -498,7 +533,7 @@ is ----------- function Floor (Container : Map; Key : Key_Type) return Cursor is - Node : constant Count_Type := Key_Ops.Floor (Container, Key); + Node : constant Count_Type := Key_Ops.Floor (Container.Content, Key); begin if Node = 0 then @@ -602,7 +637,7 @@ is ---------- function Keys (Container : Map) return K.Sequence is - Position : Count_Type := Container.First; + Position : Count_Type := Container.Content.First; R : K.Sequence; begin @@ -610,8 +645,8 @@ is -- for their postconditions. while Position /= 0 loop - R := K.Add (R, Container.Nodes (Position).Key); - Position := Tree_Operations.Next (Container, Position); + R := K.Add (R, Container.Content.Nodes (Position).Key); + Position := Tree_Operations.Next (Container.Content, Position); end loop; return R; @@ -628,7 +663,7 @@ is ----------- function Model (Container : Map) return M.Map is - Position : Count_Type := Container.First; + Position : Count_Type := Container.Content.First; R : M.Map; begin @@ -639,10 +674,10 @@ is R := M.Add (Container => R, - New_Key => Container.Nodes (Position).Key, - New_Item => Container.Nodes (Position).Element); + New_Key => Container.Content.Nodes (Position).Key, + New_Item => Container.Content.Nodes (Position).Element); - Position := Tree_Operations.Next (Container, Position); + Position := Tree_Operations.Next (Container.Content, Position); end loop; return R; @@ -701,7 +736,7 @@ is function Positions (Container : Map) return P.Map is I : Count_Type := 1; - Position : Count_Type := Container.First; + Position : Count_Type := Container.Content.First; R : P.Map; begin @@ -711,7 +746,7 @@ is while Position /= 0 loop R := P.Add (R, (Node => Position), I); pragma Assert (P.Length (R) = I); - Position := Tree_Operations.Next (Container, Position); + Position := Tree_Operations.Next (Container.Content, Position); I := I + 1; end loop; @@ -729,8 +764,8 @@ is X : Count_Type) is begin - Tree.Nodes (X).Has_Element := False; - Tree_Operations.Free (Tree, X); + Tree.Content.Nodes (X).Has_Element := False; + Tree_Operations.Free (Tree.Content, X); end Free; ---------------------- @@ -758,7 +793,7 @@ is return False; end if; - return Container.Nodes (Position.Node).Has_Element; + return Container.Content.Nodes (Position.Node).Has_Element; end Has_Element; ------------- @@ -778,7 +813,7 @@ is if not Inserted then declare - N : Node_Type renames Container.Nodes (Position.Node); + N : Node_Type renames Container.Content.Nodes (Position.Node); begin N.Key := Key; N.Element := New_Item; @@ -819,7 +854,7 @@ is X : Node_Access; begin - Allocate_Node (Container, X); + Allocate_Node (Container.Content, X); return X; end New_Node; @@ -827,7 +862,7 @@ is begin Insert_Sans_Hint - (Container, + (Container.Content, Key, Position.Node, Inserted); @@ -895,10 +930,10 @@ is "Position cursor of function Key has no element"; end if; - pragma Assert (Vet (Container, Position.Node), + pragma Assert (Vet (Container.Content, Position.Node), "Position cursor of function Key is bad"); - return Container.Nodes (Position.Node).Key; + return Container.Content.Nodes (Position.Node).Key; end Key; ---------- @@ -911,7 +946,7 @@ is return No_Element; end if; - return (Node => Container.Last); + return (Node => Container.Content.Last); end Last; ------------------ @@ -924,7 +959,7 @@ is raise Constraint_Error with "map is empty"; end if; - return Container.Nodes (Last (Container).Node).Element; + return Container.Content.Nodes (Last (Container).Node).Element; end Last_Element; -------------- @@ -937,7 +972,7 @@ is raise Constraint_Error with "map is empty"; end if; - return Container.Nodes (Last (Container).Node).Key; + return Container.Content.Nodes (Last (Container).Node).Key; end Last_Key; -------------- @@ -955,7 +990,7 @@ is function Length (Container : Map) return Count_Type is begin - return Container.Length; + return Container.Content.Length; end Length; ---------- @@ -963,7 +998,7 @@ is ---------- procedure Move (Target : in out Map; Source : in out Map) is - NN : Tree_Types.Nodes_Type renames Source.Nodes; + NN : Tree_Types.Nodes_Type renames Source.Content.Nodes; X : Node_Access; begin @@ -989,7 +1024,7 @@ is Insert (Target, NN (X).Key, NN (X).Element); -- optimize??? - Tree_Operations.Delete_Node_Sans_Free (Source, X); + Tree_Operations.Delete_Node_Sans_Free (Source.Content, X); Formal_Ordered_Maps.Free (Source, X); end loop; end Move; @@ -1013,10 +1048,10 @@ is raise Constraint_Error; end if; - pragma Assert (Vet (Container, Position.Node), + pragma Assert (Vet (Container.Content, Position.Node), "bad cursor in Next"); - return (Node => Tree_Operations.Next (Container, Position.Node)); + return (Node => Tree_Operations.Next (Container.Content, Position.Node)); end Next; ------------ @@ -1047,12 +1082,12 @@ is raise Constraint_Error; end if; - pragma Assert (Vet (Container, Position.Node), + pragma Assert (Vet (Container.Content, Position.Node), "bad cursor in Previous"); declare Node : constant Count_Type := - Tree_Operations.Previous (Container, Position.Node); + Tree_Operations.Previous (Container.Content, Position.Node); begin if Node = 0 then @@ -1063,6 +1098,41 @@ is end; end Previous; + -------------- + -- Reference -- + -------------- + + function Reference + (Container : not null access Map; + Position : Cursor) return not null access Element_Type + is + begin + if not Has_Element (Container.all, Position) then + raise Constraint_Error with "Position cursor has no element"; + end if; + + pragma Assert + (Vet (Container.Content, Position.Node), + "bad cursor in function Reference"); + + return Container.Content.Nodes (Position.Node).Element'Access; + end Reference; + + function Reference + (Container : not null access Map; + Key : Key_Type) return not null access Element_Type + is + Node : constant Count_Type := Find (Container.all, Key).Node; + + begin + if Node = 0 then + raise Constraint_Error with + "no element available because key not in map"; + end if; + + return Container.Content.Nodes (Node).Element'Access; + end Reference; + ------------- -- Replace -- ------------- @@ -1074,7 +1144,7 @@ is is begin declare - Node : constant Node_Access := Key_Ops.Find (Container, Key); + Node : constant Node_Access := Key_Ops.Find (Container.Content, Key); begin if Node = 0 then @@ -1082,7 +1152,7 @@ is end if; declare - N : Node_Type renames Container.Nodes (Node); + N : Node_Type renames Container.Content.Nodes (Node); begin N.Key := Key; N.Element := New_Item; @@ -1105,10 +1175,10 @@ is "Position cursor of Replace_Element has no element"; end if; - pragma Assert (Vet (Container, Position.Node), + pragma Assert (Vet (Container.Content, Position.Node), "Position cursor of Replace_Element is bad"); - Container.Nodes (Position.Node).Element := New_Item; + Container.Content.Nodes (Position.Node).Element := New_Item; end Replace_Element; --------------- diff --git a/gcc/ada/libgnat/a-cforma.ads b/gcc/ada/libgnat/a-cforma.ads index 99b02a5..a1cad03 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -63,6 +63,11 @@ generic package Ada.Containers.Formal_Ordered_Maps with SPARK_Mode is + -- Contracts in this unit are meant for analysis only, not for run-time + -- checking. + + pragma Assertion_Policy (Pre => Ignore); + pragma Assertion_Policy (Post => Ignore); pragma Annotate (CodePeer, Skip_Analysis); function Equivalent_Keys (Left, Right : Key_Type) return Boolean with @@ -395,6 +400,95 @@ is Model (Container)'Old, Key (Container, Position)); + function At_End + (E : not null access constant Map) return not null access constant Map + is (E) + with Ghost, + Annotate => (GNATprove, At_End_Borrow); + + function At_End + (E : access constant Element_Type) return access constant Element_Type + is (E) + with Ghost, + Annotate => (GNATprove, At_End_Borrow); + + function Constant_Reference + (Container : aliased Map; + Position : Cursor) return not null access constant Element_Type + with + Global => null, + Pre => Has_Element (Container, Position), + Post => + Constant_Reference'Result.all = + Element (Model (Container), Key (Container, Position)); + + function Reference + (Container : not null access Map; + Position : Cursor) return not null access Element_Type + with + Global => null, + Pre => Has_Element (Container.all, Position), + Post => + + -- Order of keys and cursors is preserved + + Keys (At_End (Container).all) = Keys (Container.all) + and Positions (At_End (Container).all) = Positions (Container.all) + + -- The value designated by the result of Reference is now associated + -- with the key at position Position in Container. + + and Element (At_End (Container).all, Position) = + At_End (Reference'Result).all + + -- Elements associated with other keys are preserved + + and M.Same_Keys + (Model (At_End (Container).all), + Model (Container.all)) + and M.Elements_Equal_Except + (Model (At_End (Container).all), + Model (Container.all), + Key (At_End (Container).all, Position)); + + function Constant_Reference + (Container : aliased Map; + Key : Key_Type) return not null access constant Element_Type + with + Global => null, + Pre => Contains (Container, Key), + Post => + Constant_Reference'Result.all = Element (Model (Container), Key); + + function Reference + (Container : not null access Map; + Key : Key_Type) return not null access Element_Type + with + Global => null, + Pre => Contains (Container.all, Key), + Post => + + -- Order of keys and cursors is preserved + + Keys (At_End (Container).all) = Keys (Container.all) + and Positions (At_End (Container).all) = Positions (Container.all) + + -- The value designated by the result of Reference is now associated + -- with Key in Container. + + and Element (Model (At_End (Container).all), Key) = + At_End (Reference'Result).all + + -- Elements associated with other keys are preserved + + and M.Same_Keys + (Model (At_End (Container).all), + Model (Container.all)) + and M.Elements_Equal_Except + (Model (At_End (Container).all), + Model (Container.all), + Key); + procedure Move (Target : in out Map; Source : in out Map) with Global => null, Pre => Target.Capacity >= Length (Source), @@ -1040,14 +1134,15 @@ private Right : Node_Access := 0; Color : Red_Black_Trees.Color_Type := Red; Key : Key_Type; - Element : Element_Type; + Element : aliased Element_Type; end record; package Tree_Types is new Ada.Containers.Red_Black_Trees.Generic_Bounded_Tree_Types (Node_Type); - type Map (Capacity : Count_Type) is - new Tree_Types.Tree_Type (Capacity) with null record; + type Map (Capacity : Count_Type) is record + Content : Tree_Types.Tree_Type (Capacity); + end record; Empty_Map : constant Map := (Capacity => 0, others => <>); diff --git a/gcc/ada/libgnat/a-cforse.adb b/gcc/ada/libgnat/a-cforse.adb index 991d1dc..7c45e4f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- @@ -81,6 +81,10 @@ is -- Comments needed??? + procedure Assign + (Target : in out Tree_Types.Tree_Type; + Source : Tree_Types.Tree_Type); + generic with procedure Set_Element (Node : in out Node_Type); procedure Generic_Allocate @@ -90,13 +94,13 @@ is procedure Free (Tree : in out Set; X : Count_Type); procedure Insert_Sans_Hint - (Container : in out Set; + (Container : in out Tree_Types.Tree_Type; New_Item : Element_Type; Node : out Count_Type; Inserted : out Boolean); procedure Insert_With_Hint - (Dst_Set : in out Set; + (Dst_Set : in out Tree_Types.Tree_Type; Dst_Hint : Count_Type; Src_Node : Node_Type; Dst_Node : out Count_Type); @@ -141,7 +145,7 @@ is package Set_Ops is new Red_Black_Trees.Generic_Bounded_Set_Operations (Tree_Operations => Tree_Operations, - Set_Type => Set, + Set_Type => Tree_Types.Tree_Type, Assign => Assign, Insert_With_Hint => Insert_With_Hint, Is_Less => Is_Less_Node_Node); @@ -164,18 +168,19 @@ is return True; end if; - Lst := Next (Left, Last (Left).Node); + Lst := Next (Left.Content, Last (Left).Node); Node := First (Left).Node; while Node /= Lst loop - ENode := Find (Right, Left.Nodes (Node).Element).Node; + ENode := Find (Right, Left.Content.Nodes (Node).Element).Node; if ENode = 0 - or else Left.Nodes (Node).Element /= Right.Nodes (ENode).Element + or else Left.Content.Nodes (Node).Element /= + Right.Content.Nodes (ENode).Element then return False; end if; - Node := Next (Left, Node); + Node := Next (Left.Content, Node); end loop; return True; @@ -185,7 +190,10 @@ is -- Assign -- ------------ - procedure Assign (Target : in out Set; Source : Set) is + procedure Assign + (Target : in out Tree_Types.Tree_Type; + Source : Tree_Types.Tree_Type) + is procedure Append_Element (Source_Node : Count_Type); procedure Append_Elements is @@ -267,12 +275,18 @@ is Append_Elements (Source); end Assign; + procedure Assign (Target : in out Set; Source : Set) is + begin + Assign (Target.Content, Source.Content); + end Assign; + ------------- -- Ceiling -- ------------- function Ceiling (Container : Set; Item : Element_Type) return Cursor is - Node : constant Count_Type := Element_Keys.Ceiling (Container, Item); + Node : constant Count_Type := + Element_Keys.Ceiling (Container.Content, Item); begin if Node = 0 then @@ -288,7 +302,7 @@ is procedure Clear (Container : in out Set) is begin - Tree_Operations.Clear_Tree (Container); + Tree_Operations.Clear_Tree (Container.Content); end Clear; ----------- @@ -300,6 +314,25 @@ is return Node.Color; end Color; + ------------------------ + -- Constant_Reference -- + ------------------------ + + function Constant_Reference + (Container : aliased Set; + Position : Cursor) return not null access constant Element_Type + is + begin + if not Has_Element (Container, Position) then + raise Constraint_Error with "Position cursor has no element"; + end if; + + pragma Assert (Vet (Container.Content, Position.Node), + "bad cursor in Element"); + + return Container.Content.Nodes (Position.Node).Element'Access; + end Constant_Reference; + -------------- -- Contains -- -------------- @@ -327,32 +360,32 @@ is end if; if Length (Source) > 0 then - Target.Length := Source.Length; - Target.Root := Source.Root; - Target.First := Source.First; - Target.Last := Source.Last; - Target.Free := Source.Free; + Target.Content.Length := Source.Content.Length; + Target.Content.Root := Source.Content.Root; + Target.Content.First := Source.Content.First; + Target.Content.Last := Source.Content.Last; + Target.Content.Free := Source.Content.Free; Node := 1; while Node <= Source.Capacity loop - Target.Nodes (Node).Element := - Source.Nodes (Node).Element; - Target.Nodes (Node).Parent := - Source.Nodes (Node).Parent; - Target.Nodes (Node).Left := - Source.Nodes (Node).Left; - Target.Nodes (Node).Right := - Source.Nodes (Node).Right; - Target.Nodes (Node).Color := - Source.Nodes (Node).Color; - Target.Nodes (Node).Has_Element := - Source.Nodes (Node).Has_Element; + Target.Content.Nodes (Node).Element := + Source.Content.Nodes (Node).Element; + Target.Content.Nodes (Node).Parent := + Source.Content.Nodes (Node).Parent; + Target.Content.Nodes (Node).Left := + Source.Content.Nodes (Node).Left; + Target.Content.Nodes (Node).Right := + Source.Content.Nodes (Node).Right; + Target.Content.Nodes (Node).Color := + Source.Content.Nodes (Node).Color; + Target.Content.Nodes (Node).Has_Element := + Source.Content.Nodes (Node).Has_Element; Node := Node + 1; end loop; while Node <= Target.Capacity loop N := Node; - Formal_Ordered_Sets.Free (Tree => Target, X => N); + Free (Tree => Target, X => N); Node := Node + 1; end loop; end if; @@ -370,25 +403,25 @@ is raise Constraint_Error with "Position cursor has no element"; end if; - pragma Assert (Vet (Container, Position.Node), + pragma Assert (Vet (Container.Content, Position.Node), "bad cursor in Delete"); - Tree_Operations.Delete_Node_Sans_Free (Container, + Tree_Operations.Delete_Node_Sans_Free (Container.Content, Position.Node); - Formal_Ordered_Sets.Free (Container, Position.Node); + Free (Container, Position.Node); Position := No_Element; end Delete; procedure Delete (Container : in out Set; Item : Element_Type) is - X : constant Count_Type := Element_Keys.Find (Container, Item); + X : constant Count_Type := Element_Keys.Find (Container.Content, Item); begin if X = 0 then raise Constraint_Error with "attempt to delete element not in set"; end if; - Tree_Operations.Delete_Node_Sans_Free (Container, X); - Formal_Ordered_Sets.Free (Container, X); + Tree_Operations.Delete_Node_Sans_Free (Container.Content, X); + Free (Container, X); end Delete; ------------------ @@ -396,11 +429,11 @@ is ------------------ procedure Delete_First (Container : in out Set) is - X : constant Count_Type := Container.First; + X : constant Count_Type := Container.Content.First; begin if X /= 0 then - Tree_Operations.Delete_Node_Sans_Free (Container, X); - Formal_Ordered_Sets.Free (Container, X); + Tree_Operations.Delete_Node_Sans_Free (Container.Content, X); + Free (Container, X); end if; end Delete_First; @@ -409,11 +442,11 @@ is ----------------- procedure Delete_Last (Container : in out Set) is - X : constant Count_Type := Container.Last; + X : constant Count_Type := Container.Content.Last; begin if X /= 0 then - Tree_Operations.Delete_Node_Sans_Free (Container, X); - Formal_Ordered_Sets.Free (Container, X); + Tree_Operations.Delete_Node_Sans_Free (Container.Content, X); + Free (Container, X); end if; end Delete_Last; @@ -423,7 +456,7 @@ is procedure Difference (Target : in out Set; Source : Set) is begin - Set_Ops.Set_Difference (Target, Source); + Set_Ops.Set_Difference (Target.Content, Source.Content); end Difference; function Difference (Left, Right : Set) return Set is @@ -437,11 +470,12 @@ is end if; if Length (Right) = 0 then - return Left.Copy; + return Copy (Left); end if; return S : Set (Length (Left)) do - Assign (S, Set_Ops.Set_Difference (Left, Right)); + Assign + (S.Content, Set_Ops.Set_Difference (Left.Content, Right.Content)); end return; end Difference; @@ -455,10 +489,10 @@ is raise Constraint_Error with "Position cursor has no element"; end if; - pragma Assert (Vet (Container, Position.Node), + pragma Assert (Vet (Container.Content, Position.Node), "bad cursor in Element"); - return Container.Nodes (Position.Node).Element; + return Container.Content.Nodes (Position.Node).Element; end Element; ------------------------- @@ -506,7 +540,7 @@ is -- Start of processing for Equivalent_Sets begin - return Is_Equivalent (Left, Right); + return Is_Equivalent (Left.Content, Right.Content); end Equivalent_Sets; ------------- @@ -514,11 +548,11 @@ is ------------- procedure Exclude (Container : in out Set; Item : Element_Type) is - X : constant Count_Type := Element_Keys.Find (Container, Item); + X : constant Count_Type := Element_Keys.Find (Container.Content, Item); begin if X /= 0 then - Tree_Operations.Delete_Node_Sans_Free (Container, X); - Formal_Ordered_Sets.Free (Container, X); + Tree_Operations.Delete_Node_Sans_Free (Container.Content, X); + Free (Container, X); end if; end Exclude; @@ -527,7 +561,8 @@ is ---------- function Find (Container : Set; Item : Element_Type) return Cursor is - Node : constant Count_Type := Element_Keys.Find (Container, Item); + Node : constant Count_Type := + Element_Keys.Find (Container.Content, Item); begin if Node = 0 then @@ -547,7 +582,7 @@ is return No_Element; end if; - return (Node => Container.First); + return (Node => Container.Content.First); end First; ------------------- @@ -562,7 +597,7 @@ is end if; declare - N : Tree_Types.Nodes_Type renames Container.Nodes; + N : Tree_Types.Nodes_Type renames Container.Content.Nodes; begin return N (Fst).Element; end; @@ -575,7 +610,8 @@ is function Floor (Container : Set; Item : Element_Type) return Cursor is begin declare - Node : constant Count_Type := Element_Keys.Floor (Container, Item); + Node : constant Count_Type := + Element_Keys.Floor (Container.Content, Item); begin if Node = 0 then @@ -748,7 +784,7 @@ is -------------- function Elements (Container : Set) return E.Sequence is - Position : Count_Type := Container.First; + Position : Count_Type := Container.Content.First; R : E.Sequence; begin @@ -756,8 +792,8 @@ is -- for their postconditions. while Position /= 0 loop - R := E.Add (R, Container.Nodes (Position).Element); - Position := Tree_Operations.Next (Container, Position); + R := E.Add (R, Container.Content.Nodes (Position).Element); + Position := Tree_Operations.Next (Container.Content, Position); end loop; return R; @@ -873,7 +909,7 @@ is ----------- function Model (Container : Set) return M.Set is - Position : Count_Type := Container.First; + Position : Count_Type := Container.Content.First; R : M.Set; begin @@ -884,9 +920,9 @@ is R := M.Add (Container => R, - Item => Container.Nodes (Position).Element); + Item => Container.Content.Nodes (Position).Element); - Position := Tree_Operations.Next (Container, Position); + Position := Tree_Operations.Next (Container.Content, Position); end loop; return R; @@ -898,7 +934,7 @@ is function Positions (Container : Set) return P.Map is I : Count_Type := 1; - Position : Count_Type := Container.First; + Position : Count_Type := Container.Content.First; R : P.Map; begin @@ -908,7 +944,7 @@ is while Position /= 0 loop R := P.Add (R, (Node => Position), I); pragma Assert (P.Length (R) = I); - Position := Tree_Operations.Next (Container, Position); + Position := Tree_Operations.Next (Container.Content, Position); I := I + 1; end loop; @@ -923,8 +959,8 @@ is procedure Free (Tree : in out Set; X : Count_Type) is begin - Tree.Nodes (X).Has_Element := False; - Tree_Operations.Free (Tree, X); + Tree.Content.Nodes (X).Has_Element := False; + Tree_Operations.Free (Tree.Content, X); end Free; ---------------------- @@ -978,7 +1014,8 @@ is ------------- function Ceiling (Container : Set; Key : Key_Type) return Cursor is - Node : constant Count_Type := Key_Keys.Ceiling (Container, Key); + Node : constant Count_Type := + Key_Keys.Ceiling (Container.Content, Key); begin if Node = 0 then @@ -1002,15 +1039,15 @@ is ------------ procedure Delete (Container : in out Set; Key : Key_Type) is - X : constant Count_Type := Key_Keys.Find (Container, Key); + X : constant Count_Type := Key_Keys.Find (Container.Content, Key); begin if X = 0 then raise Constraint_Error with "attempt to delete key not in set"; end if; - Delete_Node_Sans_Free (Container, X); - Formal_Ordered_Sets.Free (Container, X); + Delete_Node_Sans_Free (Container.Content, X); + Free (Container, X); end Delete; ------------- @@ -1018,7 +1055,7 @@ is ------------- function Element (Container : Set; Key : Key_Type) return Element_Type is - Node : constant Count_Type := Key_Keys.Find (Container, Key); + Node : constant Count_Type := Key_Keys.Find (Container.Content, Key); begin if Node = 0 then @@ -1026,7 +1063,7 @@ is end if; declare - N : Tree_Types.Nodes_Type renames Container.Nodes; + N : Tree_Types.Nodes_Type renames Container.Content.Nodes; begin return N (Node).Element; end; @@ -1052,11 +1089,11 @@ is ------------- procedure Exclude (Container : in out Set; Key : Key_Type) is - X : constant Count_Type := Key_Keys.Find (Container, Key); + X : constant Count_Type := Key_Keys.Find (Container.Content, Key); begin if X /= 0 then - Delete_Node_Sans_Free (Container, X); - Formal_Ordered_Sets.Free (Container, X); + Delete_Node_Sans_Free (Container.Content, X); + Free (Container, X); end if; end Exclude; @@ -1065,7 +1102,7 @@ is ---------- function Find (Container : Set; Key : Key_Type) return Cursor is - Node : constant Count_Type := Key_Keys.Find (Container, Key); + Node : constant Count_Type := Key_Keys.Find (Container.Content, Key); begin return (if Node = 0 then No_Element else (Node => Node)); end Find; @@ -1075,7 +1112,7 @@ is ----------- function Floor (Container : Set; Key : Key_Type) return Cursor is - Node : constant Count_Type := Key_Keys.Floor (Container, Key); + Node : constant Count_Type := Key_Keys.Floor (Container.Content, Key); begin return (if Node = 0 then No_Element else (Node => Node)); end Floor; @@ -1225,11 +1262,11 @@ is "Position cursor has no element"; end if; - pragma Assert (Vet (Container, Position.Node), + pragma Assert (Vet (Container.Content, Position.Node), "bad cursor in Key"); declare - N : Tree_Types.Nodes_Type renames Container.Nodes; + N : Tree_Types.Nodes_Type renames Container.Content.Nodes; begin return Key (N (Position.Node).Element); end; @@ -1244,7 +1281,7 @@ is Key : Key_Type; New_Item : Element_Type) is - Node : constant Count_Type := Key_Keys.Find (Container, Key); + Node : constant Count_Type := Key_Keys.Find (Container.Content, Key); begin if not Has_Element (Container, (Node => Node)) then raise Constraint_Error with @@ -1265,7 +1302,7 @@ is if Position.Node = 0 then return False; else - return Container.Nodes (Position.Node).Has_Element; + return Container.Content.Nodes (Position.Node).Has_Element; end if; end Has_Element; @@ -1282,7 +1319,7 @@ is if not Inserted then declare - N : Tree_Types.Nodes_Type renames Container.Nodes; + N : Tree_Types.Nodes_Type renames Container.Content.Nodes; begin N (Position.Node).Element := New_Item; end; @@ -1300,7 +1337,7 @@ is Inserted : out Boolean) is begin - Insert_Sans_Hint (Container, New_Item, Position.Node, Inserted); + Insert_Sans_Hint (Container.Content, New_Item, Position.Node, Inserted); end Insert; procedure Insert @@ -1324,7 +1361,7 @@ is ---------------------- procedure Insert_Sans_Hint - (Container : in out Set; + (Container : in out Tree_Types.Tree_Type; New_Item : Element_Type; Node : out Count_Type; Inserted : out Boolean) @@ -1377,7 +1414,7 @@ is ---------------------- procedure Insert_With_Hint - (Dst_Set : in out Set; + (Dst_Set : in out Tree_Types.Tree_Type; Dst_Hint : Count_Type; Src_Node : Node_Type; Dst_Node : out Count_Type) @@ -1439,17 +1476,18 @@ is procedure Intersection (Target : in out Set; Source : Set) is begin - Set_Ops.Set_Intersection (Target, Source); + Set_Ops.Set_Intersection (Target.Content, Source.Content); end Intersection; function Intersection (Left, Right : Set) return Set is begin if Left'Address = Right'Address then - return Left.Copy; + return Copy (Left); end if; return S : Set (Count_Type'Min (Length (Left), Length (Right))) do - Assign (S, Set_Ops.Set_Intersection (Left, Right)); + Assign (S.Content, + Set_Ops.Set_Intersection (Left.Content, Right.Content)); end return; end Intersection; @@ -1503,7 +1541,7 @@ is function Is_Subset (Subset : Set; Of_Set : Set) return Boolean is begin - return Set_Ops.Set_Subset (Subset, Of_Set => Of_Set); + return Set_Ops.Set_Subset (Subset.Content, Of_Set => Of_Set.Content); end Is_Subset; ---------- @@ -1514,7 +1552,7 @@ is begin return (if Length (Container) = 0 then No_Element - else (Node => Container.Last)); + else (Node => Container.Content.Last)); end Last; ------------------ @@ -1528,7 +1566,7 @@ is end if; declare - N : Tree_Types.Nodes_Type renames Container.Nodes; + N : Tree_Types.Nodes_Type renames Container.Content.Nodes; begin return N (Last (Container).Node).Element; end; @@ -1549,7 +1587,7 @@ is function Length (Container : Set) return Count_Type is begin - return Container.Length; + return Container.Content.Length; end Length; ---------- @@ -1557,7 +1595,7 @@ is ---------- procedure Move (Target : in out Set; Source : in out Set) is - N : Tree_Types.Nodes_Type renames Source.Nodes; + N : Tree_Types.Nodes_Type renames Source.Content.Nodes; X : Count_Type; begin @@ -1573,13 +1611,13 @@ is Clear (Target); loop - X := Source.First; + X := Source.Content.First; exit when X = 0; Insert (Target, N (X).Element); -- optimize??? - Tree_Operations.Delete_Node_Sans_Free (Source, X); - Formal_Ordered_Sets.Free (Source, X); + Tree_Operations.Delete_Node_Sans_Free (Source.Content, X); + Free (Source, X); end loop; end Move; @@ -1597,9 +1635,9 @@ is raise Constraint_Error; end if; - pragma Assert (Vet (Container, Position.Node), + pragma Assert (Vet (Container.Content, Position.Node), "bad cursor in Next"); - return (Node => Tree_Operations.Next (Container, Position.Node)); + return (Node => Tree_Operations.Next (Container.Content, Position.Node)); end Next; procedure Next (Container : Set; Position : in out Cursor) is @@ -1613,7 +1651,7 @@ is function Overlap (Left, Right : Set) return Boolean is begin - return Set_Ops.Set_Overlap (Left, Right); + return Set_Ops.Set_Overlap (Left.Content, Right.Content); end Overlap; ------------ @@ -1639,12 +1677,12 @@ is raise Constraint_Error; end if; - pragma Assert (Vet (Container, Position.Node), + pragma Assert (Vet (Container.Content, Position.Node), "bad cursor in Previous"); declare Node : constant Count_Type := - Tree_Operations.Previous (Container, Position.Node); + Tree_Operations.Previous (Container.Content, Position.Node); begin return (if Node = 0 then No_Element else (Node => Node)); end; @@ -1660,7 +1698,8 @@ is ------------- procedure Replace (Container : in out Set; New_Item : Element_Type) is - Node : constant Count_Type := Element_Keys.Find (Container, New_Item); + Node : constant Count_Type := + Element_Keys.Find (Container.Content, New_Item); begin if Node = 0 then @@ -1668,7 +1707,7 @@ is "attempt to replace element not in set"; end if; - Container.Nodes (Node).Element := New_Item; + Container.Content.Nodes (Node).Element := New_Item; end Replace; --------------------- @@ -1696,7 +1735,7 @@ is (Local_Insert_Post, Local_Insert_Sans_Hint); - NN : Tree_Types.Nodes_Type renames Tree.Nodes; + NN : Tree_Types.Nodes_Type renames Tree.Content.Nodes; -------------- -- New_Node -- @@ -1730,7 +1769,7 @@ is return; end if; - Hint := Element_Keys.Ceiling (Tree, Item); + Hint := Element_Keys.Ceiling (Tree.Content, Item); if Hint = 0 then null; @@ -1746,10 +1785,10 @@ is raise Program_Error with "attempt to replace existing element"; end if; - Tree_Operations.Delete_Node_Sans_Free (Tree, Node); + Tree_Operations.Delete_Node_Sans_Free (Tree.Content, Node); Local_Insert_With_Hint - (Tree => Tree, + (Tree => Tree.Content, Position => Hint, Key => Item, Node => Result, @@ -1770,7 +1809,7 @@ is "Position cursor has no element"; end if; - pragma Assert (Vet (Container, Position.Node), + pragma Assert (Vet (Container.Content, Position.Node), "bad cursor in Replace_Element"); Replace_Element (Container, Position.Node, New_Item); @@ -1830,7 +1869,7 @@ is procedure Symmetric_Difference (Target : in out Set; Source : Set) is begin - Set_Ops.Set_Symmetric_Difference (Target, Source); + Set_Ops.Set_Symmetric_Difference (Target.Content, Source.Content); end Symmetric_Difference; function Symmetric_Difference (Left, Right : Set) return Set is @@ -1840,15 +1879,17 @@ is end if; if Length (Right) = 0 then - return Left.Copy; + return Copy (Left); end if; if Length (Left) = 0 then - return Right.Copy; + return Copy (Right); end if; return S : Set (Length (Left) + Length (Right)) do - Assign (S, Set_Ops.Set_Symmetric_Difference (Left, Right)); + Assign + (S.Content, + Set_Ops.Set_Symmetric_Difference (Left.Content, Right.Content)); end return; end Symmetric_Difference; @@ -1861,7 +1902,7 @@ is Inserted : Boolean; begin return S : Set (Capacity => 1) do - Insert_Sans_Hint (S, New_Item, Node, Inserted); + Insert_Sans_Hint (S.Content, New_Item, Node, Inserted); pragma Assert (Inserted); end return; end To_Set; @@ -1872,21 +1913,21 @@ is procedure Union (Target : in out Set; Source : Set) is begin - Set_Ops.Set_Union (Target, Source); + Set_Ops.Set_Union (Target.Content, Source.Content); end Union; function Union (Left, Right : Set) return Set is begin if Left'Address = Right'Address then - return Left.Copy; + return Copy (Left); end if; if Length (Left) = 0 then - return Right.Copy; + return Copy (Right); end if; if Length (Right) = 0 then - return Left.Copy; + return Copy (Left); end if; return S : Set (Length (Left) + Length (Right)) do diff --git a/gcc/ada/libgnat/a-cforse.ads b/gcc/ada/libgnat/a-cforse.ads index a818726..e1d7c91 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -59,6 +59,11 @@ generic package Ada.Containers.Formal_Ordered_Sets with SPARK_Mode is + -- Contracts in this unit are meant for analysis only, not for run-time + -- checking. + + pragma Assertion_Policy (Pre => Ignore); + pragma Assertion_Policy (Post => Ignore); pragma Annotate (CodePeer, Skip_Analysis); function Equivalent_Elements (Left, Right : Element_Type) return Boolean @@ -524,6 +529,16 @@ is Position => Position) and Positions (Container) = Positions (Container)'Old; + function Constant_Reference + (Container : aliased Set; + Position : Cursor) return not null access constant Element_Type + with + Global => null, + Pre => Has_Element (Container, Position), + Post => + Constant_Reference'Result.all = + E.Get (Elements (Container), P.Get (Positions (Container), Position)); + procedure Move (Target : in out Set; Source : in out Set) with Global => null, Pre => Target.Capacity >= Length (Source), @@ -1765,18 +1780,19 @@ private type Node_Type is record Has_Element : Boolean := False; - Parent : Count_Type := 0; - Left : Count_Type := 0; - Right : Count_Type := 0; - Color : Red_Black_Trees.Color_Type; - Element : Element_Type; + Parent : Count_Type := 0; + Left : Count_Type := 0; + Right : Count_Type := 0; + Color : Red_Black_Trees.Color_Type; + Element : aliased Element_Type; end record; package Tree_Types is new Red_Black_Trees.Generic_Bounded_Tree_Types (Node_Type); - type Set (Capacity : Count_Type) is - new Tree_Types.Tree_Type (Capacity) with null record; + type Set (Capacity : Count_Type) is record + Content : Tree_Types.Tree_Type (Capacity); + end record; use Red_Black_Trees; diff --git a/gcc/ada/libgnat/a-cgaaso.adb b/gcc/ada/libgnat/a-cgaaso.adb index 6d0049a..ec4952c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-cgaaso.ads b/gcc/ada/libgnat/a-cgaaso.ads index c809b65..cfa858a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-cgarso.adb b/gcc/ada/libgnat/a-cgarso.adb index 5f4e594..18a20e7 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-cgcaso.adb b/gcc/ada/libgnat/a-cgcaso.adb index ff03b80..ca4f14a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-chacon.adb b/gcc/ada/libgnat/a-chacon.adb index 638dcc4..dbb1b0e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-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- -- diff --git a/gcc/ada/libgnat/a-chacon.ads b/gcc/ada/libgnat/a-chacon.ads index df2e276..6f611f5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-2021, 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 de66846..827794c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-chahan.ads b/gcc/ada/libgnat/a-chahan.ads index 04f975c..2f93e7c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-chlat9.ads b/gcc/ada/libgnat/a-chlat9.ads index de9b54e..53ce457 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2021, 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 89358e4..148b92d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-chtgbk.ads b/gcc/ada/libgnat/a-chtgbk.ads index 43ad208..edeca72 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-chtgbo.adb b/gcc/ada/libgnat/a-chtgbo.adb index 9fec5c4..678cdc0 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-chtgbo.ads b/gcc/ada/libgnat/a-chtgbo.ads index 5fc852d..1779c79 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-chtgke.adb b/gcc/ada/libgnat/a-chtgke.adb index fdd62b7..76c7e1b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-chtgke.ads b/gcc/ada/libgnat/a-chtgke.ads index 375ddf6..1445369 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-chtgop.adb b/gcc/ada/libgnat/a-chtgop.adb index 6e7511f..7250488 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-chtgop.ads b/gcc/ada/libgnat/a-chtgop.ads index 9073d57..a2081dd 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-chzla1.ads b/gcc/ada/libgnat/a-chzla1.ads index 8afca7d..3d27eba 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-chzla9.ads b/gcc/ada/libgnat/a-chzla9.ads index 389bccf..0359309 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-cidlli.adb b/gcc/ada/libgnat/a-cidlli.adb index 79df5a9..3fc57da 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -1311,7 +1311,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : List) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-cidlli.ads b/gcc/ada/libgnat/a-cidlli.ads index c75e5af..c8794a3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; with Ada.Containers.Helpers; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type (<>) is private; @@ -65,7 +65,9 @@ is pragma Preelaborable_Initialization (Cursor); Empty_List : constant List; + function Empty return List; + pragma Ada_2022 (Empty); No_Element : constant Cursor; @@ -280,7 +282,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : List); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : List); overriding procedure Adjust (Container : in out List); diff --git a/gcc/ada/libgnat/a-cihama.adb b/gcc/ada/libgnat/a-cihama.adb index 7a490d5..2fbf65e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -522,7 +522,8 @@ is return No_Element; end if; - return Cursor'(Container'Unrestricted_Access, Node, Hash_Type'Last); + return Cursor' + (Container'Unrestricted_Access, Node, HT_Ops.Index (HT, Node)); end Find; -------------------- @@ -748,6 +749,7 @@ is end if; Position.Container := Container'Unchecked_Access; + Position.Position := HT_Ops.Index (HT, Position.Node); end Insert; procedure Insert @@ -971,7 +973,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-cihama.ads b/gcc/ada/libgnat/a-cihama.ads index ccf5f4e..056f338 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; private with Ada.Containers.Hash_Tables; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Key_Type (<>) is private; @@ -336,7 +336,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map); overriding procedure Adjust (Container : in out Map); @@ -363,8 +363,22 @@ private type Cursor is record Container : Map_Access; + -- Access to this cursor's container + Node : Node_Access; + -- Access to the node pointed to by this cursor + Position : Hash_Type := Hash_Type'Last; + -- Position of the node in the buckets of the container. If this is + -- equal to Hash_Type'Last, then it will not be used. Position is + -- not requried by the implementation, but improves the efficiency + -- of various operations. + -- + -- However, this value must be maintained so that the predefined + -- equality operation acts as required by RM A.18.4-18/2, which + -- states: "The predefined "=" operator for type Cursor returns True + -- if both cursors are No_Element, or designate the same element + -- in the same container." end record; procedure Write diff --git a/gcc/ada/libgnat/a-cihase.adb b/gcc/ada/libgnat/a-cihase.adb index ebc9152..9fd4d98 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -1281,7 +1281,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-cihase.ads b/gcc/ada/libgnat/a-cihase.ads index cdfd86e..a73e898 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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,7 +37,7 @@ private with Ada.Containers.Hash_Tables; with Ada.Containers.Helpers; private with Ada.Streams; private with Ada.Finalization; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type (<>) is private; @@ -500,7 +500,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set); overriding procedure Adjust (Container : in out Set); diff --git a/gcc/ada/libgnat/a-cimutr.adb b/gcc/ada/libgnat/a-cimutr.adb index b358aad..aa7efac 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -1881,7 +1881,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Tree) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree) is use System.Put_Images; diff --git a/gcc/ada/libgnat/a-cimutr.ads b/gcc/ada/libgnat/a-cimutr.ads index 9e03eb9..014d1fe 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; with Ada.Containers.Helpers; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type (<>) is private; @@ -352,7 +352,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Tree); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree); overriding procedure Adjust (Container : in out Tree); diff --git a/gcc/ada/libgnat/a-ciorma.adb b/gcc/ada/libgnat/a-ciorma.adb index 7cfe07d..a569156 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -1297,7 +1297,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-ciorma.ads b/gcc/ada/libgnat/a-ciorma.ads index 17f5dfd..157714d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; private with Ada.Containers.Red_Black_Trees; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Key_Type (<>) is private; @@ -70,6 +70,7 @@ is Empty_Map : constant Map; function Empty return Map; + pragma Ada_2022 (Empty); No_Element : constant Cursor; function Has_Element (Position : Cursor) return Boolean; @@ -264,7 +265,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map); overriding procedure Adjust (Container : in out Map); diff --git a/gcc/ada/libgnat/a-ciormu.adb b/gcc/ada/libgnat/a-ciormu.adb index c3672f4..f1b9021 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -1663,7 +1663,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-ciormu.ads b/gcc/ada/libgnat/a-ciormu.ads index 5667e2c..cf8ea0d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -35,7 +35,7 @@ private with Ada.Containers.Red_Black_Trees; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; with Ada.Iterator_Interfaces; generic @@ -472,7 +472,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set); overriding procedure Adjust (Container : in out Set); diff --git a/gcc/ada/libgnat/a-ciorse.adb b/gcc/ada/libgnat/a-ciorse.adb index df56e48..7e63f15 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -1728,7 +1728,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-ciorse.ads b/gcc/ada/libgnat/a-ciorse.ads index 1b6e317..1a9d82c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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,7 +37,7 @@ with Ada.Containers.Helpers; private with Ada.Containers.Red_Black_Trees; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type (<>) is private; @@ -364,7 +364,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set); overriding procedure Adjust (Container : in out Set); diff --git a/gcc/ada/libgnat/a-clrefi.adb b/gcc/ada/libgnat/a-clrefi.adb index 2d2c78c..1bcb370 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-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- -- diff --git a/gcc/ada/libgnat/a-clrefi.ads b/gcc/ada/libgnat/a-clrefi.ads index 4aace2d..bb31bee 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-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- -- diff --git a/gcc/ada/libgnat/a-coboho.adb b/gcc/ada/libgnat/a-coboho.adb index 5d44163..21b9f54 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-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- -- @@ -65,12 +65,32 @@ package body Ada.Containers.Bounded_Holders is return Get (Left) = Get (Right); end "="; + ------------------------ + -- Constant_Reference -- + ------------------------ + + function Constant_Reference + (Container : aliased Holder) return not null access constant Element_Type + is + begin + return Cast (Container'Address); + end Constant_Reference; + + --------- + -- Get -- + --------- + + function Get (Container : Holder) return Element_Type is + begin + return Cast (Container'Address).all; + end Get; + --------------- -- Put_Image -- --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Holder) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder) is use System.Put_Images; begin @@ -79,14 +99,16 @@ package body Ada.Containers.Bounded_Holders is Array_After (S); end Put_Image; - --------- - -- Get -- - --------- + --------------- + -- Reference -- + --------------- - function Get (Container : Holder) return Element_Type is + function Reference + (Container : not null access Holder) return not null access Element_Type + is begin - return Cast (Container'Address).all; - end Get; + return Cast (Container.all'Address); + end Reference; --------- -- Set -- diff --git a/gcc/ada/libgnat/a-coboho.ads b/gcc/ada/libgnat/a-coboho.ads index 024e6a6..086f194 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-2021, 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 -- @@ -30,7 +30,7 @@ ------------------------------------------------------------------------------ private with System; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type (<>) is private; @@ -81,6 +81,12 @@ package Ada.Containers.Bounded_Holders is procedure Set (Container : in out Holder; New_Item : Element_Type); + function Constant_Reference + (Container : aliased Holder) return not null access constant Element_Type; + + function Reference + (Container : not null access Holder) return not null access Element_Type; + private -- The implementation uses low-level tricks (Address clauses and unchecked @@ -100,7 +106,7 @@ private -- (default) alignment instead. procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Holder); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder); type Element_Access is access all Element_Type; pragma Assert (Element_Access'Size = Standard'Address_Size, diff --git a/gcc/ada/libgnat/a-cobove.adb b/gcc/ada/libgnat/a-cobove.adb index 8a8b279..e56cb94 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -415,7 +415,7 @@ package body Ada.Containers.Bounded_Vectors is Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := - (Element => A (J)'Access, + (Element => A (J)'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -439,7 +439,7 @@ package body Ada.Containers.Bounded_Vectors is Container.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := - (Element => A (J)'Access, + (Element => A (J)'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -2140,7 +2140,7 @@ package body Ada.Containers.Bounded_Vectors is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Vector) is First_Time : Boolean := True; use System.Put_Images; @@ -2238,7 +2238,7 @@ package body Ada.Containers.Bounded_Vectors is Container.TC'Unrestricted_Access; begin return R : constant Reference_Type := - (Element => A (J)'Access, + (Element => A (J)'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); @@ -2262,7 +2262,7 @@ package body Ada.Containers.Bounded_Vectors is Container.TC'Unrestricted_Access; begin return R : constant Reference_Type := - (Element => A (J)'Access, + (Element => A (J)'Unchecked_Access, Control => (Controlled with TC)) do Busy (TC.all); diff --git a/gcc/ada/libgnat/a-cobove.ads b/gcc/ada/libgnat/a-cobove.ads index 324ca84..67c4419 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; with Ada.Containers.Helpers; private with Ada.Streams; private with Ada.Finalization; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Index_Type is range <>; @@ -80,12 +80,14 @@ package Ada.Containers.Bounded_Vectors is Ada.Iterator_Interfaces (Cursor, Has_Element); function Empty (Capacity : Count_Type := 10) return Vector; + pragma Ada_2022 (Empty); overriding function "=" (Left, Right : Vector) return Boolean; function New_Vector (First, Last : Index_Type) return Vector with Pre => First = Index_Type'First; - -- Ada_2020 aggregate operation. + -- Ada 2022 aggregate operation. + pragma Ada_2022 (New_Vector); function To_Vector (Length : Count_Type) return Vector; @@ -194,6 +196,7 @@ package Ada.Containers.Bounded_Vectors is (Container : in out Vector; Before : Extended_Index; New_Item : Vector); + pragma Ada_2022 (Insert_Vector); procedure Insert (Container : in out Vector; @@ -205,6 +208,7 @@ package Ada.Containers.Bounded_Vectors is (Container : in out Vector; Before : Cursor; New_Item : Vector); + pragma Ada_2022 (Insert_Vector); procedure Insert (Container : in out Vector; @@ -217,6 +221,7 @@ package Ada.Containers.Bounded_Vectors is Before : Cursor; New_Item : Vector; Position : out Cursor); + pragma Ada_2022 (Insert_Vector); procedure Insert (Container : in out Vector; @@ -258,6 +263,7 @@ package Ada.Containers.Bounded_Vectors is procedure Prepend_Vector (Container : in out Vector; New_Item : Vector); + pragma Ada_2022 (Prepend_Vector); procedure Prepend (Container : in out Vector; @@ -272,6 +278,7 @@ package Ada.Containers.Bounded_Vectors is procedure Append_Vector (Container : in out Vector; New_Item : Vector); + pragma Ada_2022 (Append_Vector); procedure Append (Container : in out Vector; @@ -426,7 +433,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Vector); procedure Write (Stream : not null access Root_Stream_Type'Class; diff --git a/gcc/ada/libgnat/a-cofove.adb b/gcc/ada/libgnat/a-cofove.adb index d467384..c7f4f06 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- @@ -142,6 +142,22 @@ is Container.Last := No_Index; end Clear; + ------------------------ + -- Constant_Reference -- + ------------------------ + + function Constant_Reference + (Container : aliased Vector; + Index : Index_Type) return not null access constant Element_Type + is + begin + if Index > Container.Last then + raise Constraint_Error with "Index is out of range"; + end if; + + return Container.Elements (To_Array_Index (Index))'Access; + end Constant_Reference; + -------------- -- Contains -- -------------- @@ -868,11 +884,7 @@ is -- less than 0, so it is safe to compute the following sum without -- fear of overflow. - pragma Warnings - (Off, "value not in range of type ""T"" defined at line 4"); Index := No_Index + Index_Type'Base (Count_Type'Last); - pragma Warnings - (On, "value not in range of type ""T"" defined at line 4"); if Index <= Index_Type'Last then @@ -1100,6 +1112,22 @@ is end; end Replace_Element; + --------------- + -- Reference -- + --------------- + + function Reference + (Container : not null access Vector; + Index : Index_Type) return not null access Element_Type + is + begin + if Index > Container.Last then + raise Constraint_Error with "Index is out of range"; + end if; + + return Container.Elements (To_Array_Index (Index))'Access; + end Reference; + ---------------------- -- Reserve_Capacity -- ---------------------- diff --git a/gcc/ada/libgnat/a-cofove.ads b/gcc/ada/libgnat/a-cofove.ads index 5712e63..a4ed7e5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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,11 @@ generic package Ada.Containers.Formal_Vectors with SPARK_Mode is + -- Contracts in this unit are meant for analysis only, not for run-time + -- checking. + + pragma Assertion_Policy (Pre => Ignore); + pragma Assertion_Policy (Post => Ignore); pragma Annotate (CodePeer, Skip_Analysis); subtype Extended_Index is Index_Type'Base @@ -285,6 +290,48 @@ is Right => Model (Container), Position => Index); + function At_End (E : access constant Vector) return access constant Vector + is (E) + with Ghost, + Annotate => (GNATprove, At_End_Borrow); + + function At_End + (E : access constant Element_Type) return access constant Element_Type + is (E) + with Ghost, + Annotate => (GNATprove, At_End_Borrow); + + function Constant_Reference + (Container : aliased Vector; + Index : Index_Type) return not null access constant Element_Type + with + Global => null, + Pre => Index in First_Index (Container) .. Last_Index (Container), + Post => + Constant_Reference'Result.all = Element (Model (Container), Index); + + function Reference + (Container : not null access Vector; + Index : Index_Type) return not null access Element_Type + with + Global => null, + Pre => + Index in First_Index (Container.all) .. Last_Index (Container.all), + Post => + Length (Container.all) = Length (At_End (Container).all) + + -- Container will have Result.all at index Index + + and At_End (Reference'Result).all = + Element (Model (At_End (Container).all), Index) + + -- All other elements are preserved + + and M.Equal_Except + (Left => Model (Container.all), + Right => Model (At_End (Container).all), + Position => Index); + procedure Insert (Container : in out Vector; Before : Extended_Index; @@ -900,7 +947,7 @@ private pragma Inline (Contains); subtype Array_Index is Capacity_Range range 1 .. Capacity_Range'Last; - type Elements_Array is array (Array_Index range <>) of Element_Type; + type Elements_Array is array (Array_Index range <>) of aliased Element_Type; function "=" (L, R : Elements_Array) return Boolean is abstract; type Vector (Capacity : Capacity_Range) is record diff --git a/gcc/ada/libgnat/a-cofuba.adb b/gcc/ada/libgnat/a-cofuba.adb index 6f2b1f3..b290c74 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2021, 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 7865342..1640b03 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2021, 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 4defdf2..2b21b0c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2021, 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 d50d5de..a1dd764 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2021, 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 -- @@ -302,6 +302,14 @@ package Ada.Containers.Functional_Maps with SPARK_Mode is Global => null, Pre => Has_Witness (Container, Witness); + function Copy_Key (Key : Key_Type) return Key_Type is (Key); + function Copy_Element (Item : Element_Type) return Element_Type is (Item); + -- Elements and Keys of maps are copied by numerous primitives in this + -- package. This function causes GNATprove to verify that such a copy is + -- valid (in particular, it does not break the ownership policy of SPARK, + -- i.e. it does not contain pointers that could be used to alias mutable + -- data). + --------------------------- -- Iteration Primitives -- --------------------------- diff --git a/gcc/ada/libgnat/a-cofuse.adb b/gcc/ada/libgnat/a-cofuse.adb index 668c6d0..1c5f25b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2021, 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 4209e74..d0acba7 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2021, 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 -- @@ -249,6 +249,13 @@ package Ada.Containers.Functional_Sets with SPARK_Mode is and Right <= Union'Result and Included_In_Union (Union'Result, Left, Right); + function Copy_Element (Item : Element_Type) return Element_Type is (Item); + -- Elements of containers are copied by numerous primitives in this + -- package. This function causes GNATprove to verify that such a copy is + -- valid (in particular, it does not break the ownership policy of SPARK, + -- i.e. it does not contain pointers that could be used to alias mutable + -- data). + --------------------------- -- Iteration Primitives -- --------------------------- diff --git a/gcc/ada/libgnat/a-cofuve.adb b/gcc/ada/libgnat/a-cofuve.adb index 0ff2204..b4f972c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2021, 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 cfccf1d..ee52730 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2016-2021, 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 -- @@ -336,6 +336,13 @@ package Ada.Containers.Functional_Vectors with SPARK_Mode is Lst => Last (Remove'Result), Offset => 1); + function Copy_Element (Item : Element_Type) return Element_Type is (Item); + -- Elements of containers are copied by numerous primitives in this + -- package. This function causes GNATprove to verify that such a copy is + -- valid (in particular, it does not break the ownership policy of SPARK, + -- i.e. it does not contain pointers that could be used to alias mutable + -- data). + --------------------------- -- Iteration Primitives -- --------------------------- diff --git a/gcc/ada/libgnat/a-cogeso.adb b/gcc/ada/libgnat/a-cogeso.adb index 2b6b05e..ebbc118 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-cogeso.ads b/gcc/ada/libgnat/a-cogeso.ads index 6457e64..810b93b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-cohama.adb b/gcc/ada/libgnat/a-cohama.adb index 9c4e51a..e6d6e4d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -116,6 +116,13 @@ is -- "=" -- --------- + function "=" (Left, Right : Cursor) return Boolean is + begin + return + Left.Container = Right.Container + and then Left.Node = Right.Node; + end "="; + function "=" (Left, Right : Map) return Boolean is begin return Is_Equal (Left.HT, Right.HT); @@ -478,7 +485,8 @@ is return No_Element; end if; - return Cursor'(Container'Unrestricted_Access, Node, Hash_Type'Last); + return Cursor' + (Container'Unrestricted_Access, Node, HT_Ops.Index (HT, Node)); end Find; -------------------- @@ -635,6 +643,11 @@ is end if; Position.Container := Container'Unrestricted_Access; + + -- Note that we do not set the Position component of the cursor, + -- because it may become incorrect on subsequent insertions/deletions + -- from the container. This will lose some optimizations but prevents + -- anomalies when the underlying hash-table is expanded or shrunk. end Insert; procedure Insert @@ -889,7 +902,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-cohama.ads b/gcc/ada/libgnat/a-cohama.ads index 21b6935..3f172bd 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; private with Ada.Containers.Hash_Tables; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; -- The language-defined generic package Containers.Hashed_Maps provides -- private types Map and Cursor, and a set of operations for each type. A map @@ -110,6 +110,14 @@ is type Cursor is private; pragma Preelaborable_Initialization (Cursor); + function "=" (Left, Right : Cursor) return Boolean; + -- The representation of cursors includes a component used to optimize + -- iteration over maps. This component may become unreliable after + -- multiple map insertions, and must be excluded from cursor equality, + -- so we need to provide an explicit definition for it, instead of + -- using predefined equality (as implied by a questionable comment + -- in the RM). + Empty_Map : constant Map; -- Map objects declared without an initialization expression are -- initialized to the value Empty_Map. @@ -431,7 +439,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map); overriding procedure Adjust (Container : in out Map); @@ -465,7 +473,15 @@ private Position : Hash_Type := Hash_Type'Last; -- Position of the node in the buckets of the container. If this is - -- equal to Hash_Type'Last, then it will not be used. + -- equal to Hash_Type'Last, then it will not be used. Position is + -- not requried by the implementation, but improves the efficiency + -- of various operations. + -- + -- However, this value must be maintained so that the predefined + -- equality operation acts as required by RM A.18.4-18/2, which + -- states: "The predefined "=" operator for type Cursor returns True + -- if both cursors are No_Element, or designate the same element + -- in the same container." end record; procedure Read diff --git a/gcc/ada/libgnat/a-cohase.adb b/gcc/ada/libgnat/a-cohase.adb index 0131f73..2342116 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -145,6 +145,13 @@ is -- "=" -- --------- + function "=" (Left, Right : Cursor) return Boolean is + begin + return + Left.Container = Right.Container + and then Left.Node = Right.Node; + end "="; + function "=" (Left, Right : Set) return Boolean is begin return Is_Equal (Left.HT, Right.HT); @@ -605,13 +612,13 @@ is is HT : Hash_Table_Type renames Container'Unrestricted_Access.HT; Node : constant Node_Access := Element_Keys.Find (HT, Item); - begin if Node = null then return No_Element; end if; - return Cursor'(Container'Unrestricted_Access, Node, Hash_Type'Last); + return Cursor' + (Container'Unrestricted_Access, Node, HT_Ops.Index (HT, Node)); end Find; -------------------- @@ -766,6 +773,11 @@ is begin Insert (Container.HT, New_Item, Position.Node, Inserted); Position.Container := Container'Unchecked_Access; + + -- Note that we do not set the Position component of the cursor, + -- because it may become incorrect on subsequent insertions/deletions + -- from the container. This will lose some optimizations but prevents + -- anomalies when the underlying hash-table is expanded or shrunk. end Insert; procedure Insert @@ -1168,7 +1180,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set) is First_Time : Boolean := True; use System.Put_Images; @@ -1998,7 +2010,7 @@ is return No_Element; else return Cursor' - (Container'Unrestricted_Access, Node, Hash_Type'Last); + (Container'Unrestricted_Access, Node, HT_Ops.Index (HT, Node)); end if; end Find; diff --git a/gcc/ada/libgnat/a-cohase.ads b/gcc/ada/libgnat/a-cohase.ads index a0aca52..2356ba7 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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,7 +37,7 @@ private with Ada.Containers.Hash_Tables; with Ada.Containers.Helpers; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type is private; @@ -69,6 +69,15 @@ is type Cursor is private; pragma Preelaborable_Initialization (Cursor); + function "=" (Left, Right : Cursor) return Boolean; + -- The representation of cursors includes a component used to optimize + -- iteration over sets. This component may become unreliable after + -- multiple set insertions, and must be excluded from cursor equality, + -- so we need to provide an explicit definition for it, instead of + -- using predefined equality (as implied by a questionable comment + -- in the RM). This is also the case for hashed maps, and affects the + -- use of Insert primitives in hashed structures. + Empty_Set : constant Set; -- Set objects declared without an initialization expression are -- initialized to the value Empty_Set. @@ -510,7 +519,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set); overriding procedure Adjust (Container : in out Set); @@ -537,8 +546,22 @@ private type Cursor is record Container : Set_Access; + -- Access to this cursor's container + Node : Node_Access; + -- Access to the node pointed to by this cursor + Position : Hash_Type := Hash_Type'Last; + -- Position of the node in the buckets of the container. If this is + -- equal to Hash_Type'Last, then it will not be used. Position is + -- not requried by the implementation, but improves the efficiency + -- of various operations. + -- + -- However, this value must be maintained so that the predefined + -- equality operation acts as required by RM A.18.7-17/2, which + -- states: "The predefined "=" operator for type Cursor returns True + -- if both cursors are No_Element, or designate the same element + -- in the same container." end record; procedure Write diff --git a/gcc/ada/libgnat/a-cohata.ads b/gcc/ada/libgnat/a-cohata.ads index 2b98928..f7e44a3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-coinho.adb b/gcc/ada/libgnat/a-coinho.adb index 6c99c8d..ca6882a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-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- -- @@ -235,7 +235,7 @@ package body Ada.Containers.Indefinite_Holders is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Holder) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder) is use System.Put_Images; begin diff --git a/gcc/ada/libgnat/a-coinho.ads b/gcc/ada/libgnat/a-coinho.ads index 372f069..b648836 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 -- @@ -31,7 +31,7 @@ private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type (<>) is private; @@ -119,7 +119,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Holder); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder); for Holder'Read use Read; for Holder'Write use Write; diff --git a/gcc/ada/libgnat/a-coinho__shared.adb b/gcc/ada/libgnat/a-coinho__shared.adb index 16bb708..0340af0 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-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- -- @@ -325,7 +325,7 @@ package body Ada.Containers.Indefinite_Holders is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Holder) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder) is use System.Put_Images; begin diff --git a/gcc/ada/libgnat/a-coinho__shared.ads b/gcc/ada/libgnat/a-coinho__shared.ads index e7bea85..97f796d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2021, 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 -- @@ -36,7 +36,7 @@ private with Ada.Finalization; private with Ada.Streams; private with System.Atomic_Counters; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type (<>) is private; @@ -134,7 +134,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Holder); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Holder); for Holder'Read use Read; for Holder'Write use Write; diff --git a/gcc/ada/libgnat/a-coinve.adb b/gcc/ada/libgnat/a-coinve.adb index 051aa71..9df6e3d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -2670,7 +2670,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Vector) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-coinve.ads b/gcc/ada/libgnat/a-coinve.ads index c9364c7..828ed29 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; with Ada.Containers.Helpers; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Index_Type is range <>; @@ -428,7 +428,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Vector); overriding procedure Adjust (Container : in out Vector); overriding procedure Finalize (Container : in out Vector); diff --git a/gcc/ada/libgnat/a-colien.adb b/gcc/ada/libgnat/a-colien.adb index 9ea536d..b189505 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-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- -- diff --git a/gcc/ada/libgnat/a-colien.ads b/gcc/ada/libgnat/a-colien.ads index cdcb842..0c20486 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-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- -- diff --git a/gcc/ada/libgnat/a-colire.adb b/gcc/ada/libgnat/a-colire.adb index c341773..e39d002 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-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- -- diff --git a/gcc/ada/libgnat/a-colire.ads b/gcc/ada/libgnat/a-colire.ads index 975c0db..c1d79b8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-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- -- diff --git a/gcc/ada/libgnat/a-comlin.adb b/gcc/ada/libgnat/a-comlin.adb index e6e6174..171b061 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-comlin.ads b/gcc/ada/libgnat/a-comlin.ads index 8dbbb07..d8149cf 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 78f93f0..617d248 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -1864,7 +1864,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Tree) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree) is use System.Put_Images; diff --git a/gcc/ada/libgnat/a-comutr.ads b/gcc/ada/libgnat/a-comutr.ads index a1f51af..8e88b14 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; with Ada.Containers.Helpers; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type is private; @@ -404,7 +404,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Tree); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Tree); overriding procedure Adjust (Container : in out Tree); diff --git a/gcc/ada/libgnat/a-conhel.adb b/gcc/ada/libgnat/a-conhel.adb index 1a30b53..316c866 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-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- -- @@ -27,6 +27,13 @@ package body Ada.Containers.Helpers is + Max_Count : constant := 2**31 - 1; + -- Used in assertions below, to make sure the counts don't wrap around. + -- This can help detect bugs in which Adjust and Finalize calls are + -- improperly generated. An extra Decrement could otherwise cause + -- wraparound from 0 to 2**32-1. The highest count seen so far is + -- around 25, so this should be plenty. + package body Generic_Implementation is use type SAC.Atomic_Unsigned; @@ -50,6 +57,7 @@ package body Ada.Containers.Helpers is begin if T_Check then SAC.Increment (T_Counts.Busy); + pragma Assert (T_Counts.Busy <= Max_Count); end if; end Busy; @@ -112,7 +120,9 @@ package body Ada.Containers.Helpers is begin if T_Check then SAC.Increment (T_Counts.Lock); + pragma Assert (T_Counts.Lock <= Max_Count); SAC.Increment (T_Counts.Busy); + pragma Assert (T_Counts.Busy <= Max_Count); end if; end Lock; @@ -122,17 +132,20 @@ package body Ada.Containers.Helpers is procedure TC_Check (T_Counts : Tamper_Counts) is begin - if T_Check and then T_Counts.Busy > 0 then - raise Program_Error with - "attempt to tamper with cursors"; + if T_Check then + if T_Counts.Busy > 0 then + raise Program_Error with + "attempt to tamper with cursors"; + end if; + + -- The lock status (which monitors "element tampering") always + -- implies that the busy status (which monitors "cursor + -- tampering") is set too; this is a representation invariant. + -- Thus if the busy count is zero, then the lock count + -- must also be zero. + + pragma Assert (T_Counts.Lock = 0); end if; - - -- The lock status (which monitors "element tampering") always - -- implies that the busy status (which monitors "cursor tampering") - -- is set too; this is a representation invariant. Thus if the busy - -- bit is not set, then the lock bit must not be set either. - - pragma Assert (T_Counts.Lock = 0); end TC_Check; -------------- @@ -155,6 +168,7 @@ package body Ada.Containers.Helpers is begin if T_Check then SAC.Decrement (T_Counts.Busy); + pragma Assert (T_Counts.Busy <= Max_Count); end if; end Unbusy; @@ -166,7 +180,9 @@ package body Ada.Containers.Helpers is begin if T_Check then SAC.Decrement (T_Counts.Lock); + pragma Assert (T_Counts.Lock <= Max_Count); SAC.Decrement (T_Counts.Busy); + pragma Assert (T_Counts.Busy <= Max_Count); end if; end Unlock; diff --git a/gcc/ada/libgnat/a-conhel.ads b/gcc/ada/libgnat/a-conhel.ads index 80ae980..47cb2ce 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-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- -- diff --git a/gcc/ada/libgnat/a-convec.adb b/gcc/ada/libgnat/a-convec.adb index fec72cc..5cede72 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -2345,7 +2345,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Vector) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-convec.ads b/gcc/ada/libgnat/a-convec.ads index 1d257a0..41eafbc 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; with Ada.Containers.Helpers; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; -- The language-defined generic package Containers.Vectors provides private -- types Vector and Cursor, and a set of operations for each type. A vector @@ -332,7 +332,7 @@ is function New_Vector (First, Last : Index_Type) return Vector with Pre => First = Index_Type'First; - -- Ada_2020 aggregate operation. + -- Ada 2022 aggregate operation. procedure Insert_Vector (Container : in out Vector; @@ -745,7 +745,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Vector); overriding procedure Adjust (Container : in out Vector); overriding procedure Finalize (Container : in out Vector); diff --git a/gcc/ada/libgnat/a-coorma.adb b/gcc/ada/libgnat/a-coorma.adb index 15d08f5..65adf4c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -1220,7 +1220,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-coorma.ads b/gcc/ada/libgnat/a-coorma.ads index 7f65a7f..5de65c1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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 -- @@ -36,7 +36,7 @@ with Ada.Iterator_Interfaces; private with Ada.Containers.Red_Black_Trees; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Key_Type is private; @@ -61,12 +61,15 @@ is Iterator_Element => Element_Type, Aggregate => (Empty => Empty, Add_Named => Insert); + pragma Preelaborable_Initialization (Map); type Cursor is private; pragma Preelaborable_Initialization (Cursor); Empty_Map : constant Map; + function Empty return Map; + pragma Ada_2022 (Empty); No_Element : constant Cursor; @@ -264,7 +267,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Map); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Map); overriding procedure Adjust (Container : in out Map); diff --git a/gcc/ada/libgnat/a-coormu.adb b/gcc/ada/libgnat/a-coormu.adb index c7db472..9b11d29 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -1571,7 +1571,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-coormu.ads b/gcc/ada/libgnat/a-coormu.ads index 95aec73..51b94eb 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -34,7 +34,7 @@ private with Ada.Containers.Red_Black_Trees; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; with Ada.Iterator_Interfaces; generic @@ -476,7 +476,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set); overriding procedure Adjust (Container : in out Set); diff --git a/gcc/ada/libgnat/a-coorse.adb b/gcc/ada/libgnat/a-coorse.adb index 8a648e8..ca8f238 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -1586,7 +1586,7 @@ is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set) + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set) is First_Time : Boolean := True; use System.Put_Images; diff --git a/gcc/ada/libgnat/a-coorse.ads b/gcc/ada/libgnat/a-coorse.ads index 1ccf290..6d24e03 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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,7 +37,7 @@ with Ada.Containers.Helpers; private with Ada.Containers.Red_Black_Trees; private with Ada.Finalization; private with Ada.Streams; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; generic type Element_Type is private; @@ -347,7 +347,7 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Set); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set); overriding procedure Adjust (Container : in out Set); diff --git a/gcc/ada/libgnat/a-coprnu.adb b/gcc/ada/libgnat/a-coprnu.adb index 25f04e6..20837d4 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-coprnu.ads b/gcc/ada/libgnat/a-coprnu.ads index 5afb474..7f5f7bd 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-crbltr.ads b/gcc/ada/libgnat/a-crbltr.ads index 4f00bd6..7f5028d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-crbtgk.adb b/gcc/ada/libgnat/a-crbtgk.adb index a41fcbb..8af0923 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-crbtgk.ads b/gcc/ada/libgnat/a-crbtgk.ads index 4bdcf5c..a7c597c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-crbtgo.adb b/gcc/ada/libgnat/a-crbtgo.adb index 35727b0..467b1b7 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-crbtgo.ads b/gcc/ada/libgnat/a-crbtgo.ads index 5f37221..00e5a6d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-crdlli.adb b/gcc/ada/libgnat/a-crdlli.adb index fb92fd4..6538b26 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-crdlli.ads b/gcc/ada/libgnat/a-crdlli.ads index b30d353..ea693c3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-csquin.ads b/gcc/ada/libgnat/a-csquin.ads index df65ba4..95e334e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 deae9a7..d0a4e64 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-cuprqu.ads b/gcc/ada/libgnat/a-cuprqu.ads index a70e5e0..4367fe6 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 295711c..85a0747 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-cusyqu.ads b/gcc/ada/libgnat/a-cusyqu.ads index cd2af82..407359d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 fc28f17..830fb47 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-cwila9.ads b/gcc/ada/libgnat/a-cwila9.ads index 8f44c5b..5545c14 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-decima.adb b/gcc/ada/libgnat/a-decima.adb index bf05516..9afe287 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-decima.ads b/gcc/ada/libgnat/a-decima.ads index 9b56cc6..7ccd9f0 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 b29b010..aa87ccf 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2021, 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 e0ae41f..4f0f033 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-dhfina.ads b/gcc/ada/libgnat/a-dhfina.ads index cf8697e..d760251 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-diocst.adb b/gcc/ada/libgnat/a-diocst.adb index 83dc30a..f3e08fe 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-diocst.ads b/gcc/ada/libgnat/a-diocst.ads index a6507c1..6454c91 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-direct.adb b/gcc/ada/libgnat/a-direct.adb index 162ace9..20616a2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-direct.ads b/gcc/ada/libgnat/a-direct.ads index 05cb2b6..12f3bd4 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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. -- diff --git a/gcc/ada/libgnat/a-direio.adb b/gcc/ada/libgnat/a-direio.adb index 48e4f74..f83b34b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-direio.ads b/gcc/ada/libgnat/a-direio.ads index a293156..0a91174 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 38e56c9..bdb8faf 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-dirval.ads b/gcc/ada/libgnat/a-dirval.ads index 0485802..8c6cd0a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-dirval__mingw.adb b/gcc/ada/libgnat/a-dirval__mingw.adb index 27d09ef..51827a5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-einuoc.adb b/gcc/ada/libgnat/a-einuoc.adb index bc9211a..1c409da 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-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- -- diff --git a/gcc/ada/libgnat/a-einuoc.ads b/gcc/ada/libgnat/a-einuoc.ads index 5d1e264..cb70ab1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-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- -- diff --git a/gcc/ada/libgnat/a-elchha.adb b/gcc/ada/libgnat/a-elchha.adb index 244352d..d54aa65 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- diff --git a/gcc/ada/libgnat/a-elchha.ads b/gcc/ada/libgnat/a-elchha.ads index 5aa7fe2..15696bf 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- diff --git a/gcc/ada/libgnat/a-elchha__vxworks-ppc-full.adb b/gcc/ada/libgnat/a-elchha__vxworks-ppc-full.adb index 25097d6..69f5cc2 100644 --- a/gcc/ada/libgnat/a-elchha__vxworks-ppc-full.adb +++ b/gcc/ada/libgnat/a-elchha__vxworks-ppc-full.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- diff --git a/gcc/ada/libgnat/a-envvar.adb b/gcc/ada/libgnat/a-envvar.adb index 0d6e2ed..cf11887 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/a-excach.adb b/gcc/ada/libgnat/a-excach.adb index f9d6ee0..3939287 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-except.adb b/gcc/ada/libgnat/a-except.adb index f7fd5bb..c332afa 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -279,6 +279,23 @@ package body Ada.Exceptions is pragma No_Return (Raise_Exception_No_Defer); -- Similar to Raise_Exception, but with no abort deferral + procedure Raise_From_Signal_Handler + (E : Exception_Id; + M : System.Address); + pragma Export + (C, Raise_From_Signal_Handler, "__gnat_raise_from_signal_handler"); + pragma No_Return (Raise_From_Signal_Handler); + -- This routine is used to raise an exception from a signal handler. The + -- signal handler has already stored the machine state (i.e. the state that + -- corresponds to the location at which the signal was raised). E is the + -- Exception_Id specifying what exception is being raised, and M is a + -- pointer to a null-terminated string which is the message to be raised. + -- Note that this routine never returns, so it is permissible to simply + -- jump to this routine, rather than call it. This may be appropriate for + -- systems where the right way to get out of signal handler is to alter the + -- PC value in the machine state or in some other way ask the operating + -- system to return here rather than to the original location. + procedure Raise_With_Msg (E : Exception_Id); pragma No_Return (Raise_With_Msg); pragma Export (C, Raise_With_Msg, "__gnat_raise_with_msg"); diff --git a/gcc/ada/libgnat/a-except.ads b/gcc/ada/libgnat/a-except.ads index 4d36a84..2b27adb 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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,26 +184,7 @@ private -- Raise_Exception_Always if it can determine this is the case. The Export -- allows this routine to be accessed from Pure units. - procedure Raise_From_Signal_Handler - (E : Exception_Id; - M : System.Address); - pragma Export - (Ada, Raise_From_Signal_Handler, - "ada__exceptions__raise_from_signal_handler"); - pragma No_Return (Raise_From_Signal_Handler); - -- This routine is used to raise an exception from a signal handler. The - -- signal handler has already stored the machine state (i.e. the state that - -- corresponds to the location at which the signal was raised). E is the - -- Exception_Id specifying what exception is being raised, and M is a - -- pointer to a null-terminated string which is the message to be raised. - -- Note that this routine never returns, so it is permissible to simply - -- jump to this routine, rather than call it. This may be appropriate for - -- systems where the right way to get out of signal handler is to alter the - -- PC value in the machine state or in some other way ask the operating - -- system to return here rather than to the original location. - - procedure Raise_From_Controlled_Operation - (X : Ada.Exceptions.Exception_Occurrence); + procedure Raise_From_Controlled_Operation (X : Exception_Occurrence); pragma No_Return (Raise_From_Controlled_Operation); pragma Export (Ada, Raise_From_Controlled_Operation, diff --git a/gcc/ada/libgnat/a-exctra.adb b/gcc/ada/libgnat/a-exctra.adb index 450af8b..67c85ae 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-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- -- diff --git a/gcc/ada/libgnat/a-exctra.ads b/gcc/ada/libgnat/a-exctra.ads index ba90f52..84c2f20 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2021, 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 31831b6..f5cb37e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-exexpr.adb b/gcc/ada/libgnat/a-exexpr.adb index fb4b545..ff85bc5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -91,6 +91,9 @@ package body Exception_Propagation is use Exception_Traces; + type bool is new Boolean; + pragma Convention (C, bool); + Foreign_Exception : aliased System.Standard_Library.Exception_Data; pragma Import (Ada, Foreign_Exception, "system__exceptions__foreign_exception"); @@ -277,9 +280,8 @@ package body Exception_Propagation is -- painful and error prone. These subprograms could be moved to a more -- widely visible location if need be. - function Is_Handled_By_Others (E : Exception_Data_Ptr) return Boolean; + function Is_Handled_By_Others (E : Exception_Data_Ptr) return bool; pragma Export (C, Is_Handled_By_Others, "__gnat_is_handled_by_others"); - pragma Warnings (Off, Is_Handled_By_Others); function Language_For (E : Exception_Data_Ptr) return Character; pragma Export (C, Language_For, "__gnat_language_for"); @@ -685,9 +687,7 @@ package body Exception_Propagation is -- Foreign_Data_For -- ---------------------- - function Foreign_Data_For - (E : SSL.Exception_Data_Ptr) return Address - is + function Foreign_Data_For (E : Exception_Data_Ptr) return Address is begin return E.Foreign_Data; end Foreign_Data_For; @@ -696,16 +696,16 @@ package body Exception_Propagation is -- Is_Handled_By_Others -- -------------------------- - function Is_Handled_By_Others (E : SSL.Exception_Data_Ptr) return Boolean is + function Is_Handled_By_Others (E : Exception_Data_Ptr) return bool is begin - return not E.all.Not_Handled_By_Others; + return not bool (E.all.Not_Handled_By_Others); end Is_Handled_By_Others; ------------------ -- Language_For -- ------------------ - function Language_For (E : SSL.Exception_Data_Ptr) return Character is + function Language_For (E : Exception_Data_Ptr) return Character is begin return E.all.Lang; end Language_For; diff --git a/gcc/ada/libgnat/a-exextr.adb b/gcc/ada/libgnat/a-exextr.adb index da66873..9ef7e86 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-exstat.adb b/gcc/ada/libgnat/a-exstat.adb index 028be1f..adb199a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-finali.adb b/gcc/ada/libgnat/a-finali.adb index ba8b7b3..4bba140 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-finali.ads b/gcc/ada/libgnat/a-finali.ads index 2ee4cf8..ce124e3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-iteint.ads b/gcc/ada/libgnat/a-iteint.ads index 8ac9e1a..953853f 100644 --- a/gcc/ada/libgnat/a-iteint.ads +++ b/gcc/ada/libgnat/a-iteint.ads @@ -21,7 +21,7 @@ generic package Ada.Iterator_Interfaces is pragma Pure; - type Forward_Iterator is limited interface; + type Forward_Iterator is limited interface with No_Task_Parts; function First (Object : Forward_Iterator) return Cursor is abstract; @@ -29,7 +29,8 @@ package Ada.Iterator_Interfaces is (Object : Forward_Iterator; Position : Cursor) return Cursor is abstract; - type Reversible_Iterator is limited interface and Forward_Iterator; + type Reversible_Iterator is limited interface and Forward_Iterator with + No_Task_Parts; function Last (Object : Reversible_Iterator) return Cursor is abstract; diff --git a/gcc/ada/libgnat/a-locale.adb b/gcc/ada/libgnat/a-locale.adb index ec65938..71e8557 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- diff --git a/gcc/ada/libgnat/a-locale.ads b/gcc/ada/libgnat/a-locale.ads index be6b0c2..334e1f1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-2021, 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 9260391..25875fa 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-naliop.ads b/gcc/ada/libgnat/a-naliop.ads index 81de811..d5f2ecb 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 dc1969a..6482e88 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 ca998fa..ef52992 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-nallfl__wraplf.ads b/gcc/ada/libgnat/a-nallfl__wraplf.ads index 2d5c71d..582821e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-nalofl.ads b/gcc/ada/libgnat/a-nalofl.ads index 4cdf2f4..519bf1c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-nashfl.ads b/gcc/ada/libgnat/a-nashfl.ads index eaee862..6bb660d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-nashfl__wraplf.ads b/gcc/ada/libgnat/a-nashfl__wraplf.ads index ca5b48d..a6ffe3d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-nbnbin.adb b/gcc/ada/libgnat/a-nbnbin.adb index 9e051d3..fe41cf1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-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- -- @@ -30,7 +30,6 @@ ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; -with Ada.Strings.Text_Output.Utils; with Interfaces; use Interfaces; @@ -432,12 +431,12 @@ package body Ada.Numerics.Big_Numbers.Big_Integers is -- Put_Image -- --------------- - procedure Put_Image (S : in out Sink'Class; V : Big_Integer) is + procedure Put_Image (S : in out Root_Buffer_Type'Class; V : Big_Integer) is -- This is implemented in terms of To_String. It might be more elegant -- and more efficient to do it the other way around, but this is the -- most expedient implementation for now. begin - Strings.Text_Output.Utils.Put_UTF_8 (S, To_String (V)); + Strings.Text_Buffers.Put_UTF_8 (S, To_String (V)); end Put_Image; --------- diff --git a/gcc/ada/libgnat/a-nbnbin.ads b/gcc/ada/libgnat/a-nbnbin.ads index 668da8d..1ba10da 100644 --- a/gcc/ada/libgnat/a-nbnbin.ads +++ b/gcc/ada/libgnat/a-nbnbin.ads @@ -13,7 +13,7 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Strings.Text_Output; use Ada.Strings.Text_Output; +with Ada.Strings.Text_Buffers; use Ada.Strings.Text_Buffers; private with Ada.Finalization; private with System; @@ -22,7 +22,7 @@ package Ada.Numerics.Big_Numbers.Big_Integers with Preelaborate is type Big_Integer is private - with Integer_Literal => From_String, + with Integer_Literal => From_Universal_Image, Put_Image => Put_Image; function Is_Valid (Arg : Big_Integer) return Boolean @@ -116,7 +116,10 @@ is function From_String (Arg : String) return Valid_Big_Integer with Global => null; - procedure Put_Image (S : in out Sink'Class; V : Big_Integer); + function From_Universal_Image (Arg : String) return Valid_Big_Integer + renames From_String; + + procedure Put_Image (S : in out Root_Buffer_Type'Class; V : Big_Integer); function "+" (L : Valid_Big_Integer) return Valid_Big_Integer with Global => null; diff --git a/gcc/ada/libgnat/a-nbnbin__gmp.adb b/gcc/ada/libgnat/a-nbnbin__gmp.adb index 2e8a260..880e9a3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-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- -- @@ -35,7 +35,6 @@ with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; -with Ada.Strings.Text_Output.Utils; with Ada.Characters.Handling; use Ada.Characters.Handling; package body Ada.Numerics.Big_Numbers.Big_Integers is @@ -403,12 +402,12 @@ package body Ada.Numerics.Big_Numbers.Big_Integers is -- Put_Image -- --------------- - procedure Put_Image (S : in out Sink'Class; V : Big_Integer) is + procedure Put_Image (S : in out Root_Buffer_Type'Class; V : Big_Integer) is -- This is implemented in terms of To_String. It might be more elegant -- and more efficient to do it the other way around, but this is the -- most expedient implementation for now. begin - Strings.Text_Output.Utils.Put_UTF_8 (S, To_String (V)); + Strings.Text_Buffers.Put_UTF_8 (S, To_String (V)); end Put_Image; --------- diff --git a/gcc/ada/libgnat/a-nbnbre.adb b/gcc/ada/libgnat/a-nbnbre.adb index 4ff5b35..e45bc6d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-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- -- @@ -29,7 +29,6 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Strings.Text_Output.Utils; with System.Unsigned_Types; use System.Unsigned_Types; package body Ada.Numerics.Big_Numbers.Big_Reals is @@ -307,7 +306,7 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is package body Fixed_Conversions is - package Float_Aux is new Float_Conversions (Long_Long_Float); + package Float_Aux is new Float_Conversions (Long_Float); subtype LLLI is Long_Long_Long_Integer; subtype LLLU is Long_Long_Long_Unsigned; @@ -316,7 +315,7 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is Num'Small_Numerator > LLLU'Last or else Num'Small_Denominator > LLLU'Last; -- True if the Small is too large for Long_Long_Long_Unsigned, in which - -- case we convert to/from Long_Long_Float as an intermediate step. + -- case we convert to/from Long_Float as an intermediate step. package Conv_I is new Big_Integers.Signed_Conversions (LLLI); package Conv_U is new Big_Integers.Unsigned_Conversions (LLLU); @@ -334,7 +333,7 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is begin if Too_Large then - return Float_Aux.To_Big_Real (Long_Long_Float (Arg)); + return Float_Aux.To_Big_Real (Long_Float (Arg)); end if; N := Conv_U.To_Big_Integer (Num'Small_Numerator); @@ -593,13 +592,6 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is end; end From_String; - function From_String - (Numerator, Denominator : String) return Valid_Big_Real is - begin - return Big_Integers.From_String (Numerator) / - Big_Integers.From_String (Denominator); - end From_String; - -------------------------- -- From_Quotient_String -- -------------------------- @@ -626,12 +618,12 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is -- Put_Image -- --------------- - procedure Put_Image (S : in out Sink'Class; V : Big_Real) is + procedure Put_Image (S : in out Root_Buffer_Type'Class; V : Big_Real) is -- This is implemented in terms of To_String. It might be more elegant -- and more efficient to do it the other way around, but this is the -- most expedient implementation for now. begin - Strings.Text_Output.Utils.Put_UTF_8 (S, To_String (V)); + Strings.Text_Buffers.Put_UTF_8 (S, To_String (V)); end Put_Image; --------- diff --git a/gcc/ada/libgnat/a-nbnbre.ads b/gcc/ada/libgnat/a-nbnbre.ads index ee5636f..4118d2b 100644 --- a/gcc/ada/libgnat/a-nbnbre.ads +++ b/gcc/ada/libgnat/a-nbnbre.ads @@ -15,13 +15,13 @@ with Ada.Numerics.Big_Numbers.Big_Integers; -with Ada.Strings.Text_Output; use Ada.Strings.Text_Output; +with Ada.Strings.Text_Buffers; use Ada.Strings.Text_Buffers; package Ada.Numerics.Big_Numbers.Big_Reals with Preelaborate is type Big_Real is private with - Real_Literal => From_String, + Real_Literal => From_Universal_Image, Put_Image => Put_Image; function Is_Valid (Arg : Big_Real) return Boolean @@ -122,8 +122,13 @@ is function From_String (Arg : String) return Valid_Big_Real with Global => null; - function From_String (Numerator, Denominator : String) return Valid_Big_Real - with Global => null; + + function From_Universal_Image (Arg : String) return Valid_Big_Real + renames From_String; + function From_Universal_Image (Num, Den : String) return Valid_Big_Real is + (Big_Integers.From_Universal_Image (Num) / + Big_Integers.From_Universal_Image (Den)) + with Global => null; function To_Quotient_String (Arg : Big_Real) return String is (Big_Integers.To_String (Numerator (Arg)) & " / " @@ -133,7 +138,7 @@ is function From_Quotient_String (Arg : String) return Valid_Big_Real with Global => null; - procedure Put_Image (S : in out Sink'Class; V : Big_Real); + procedure Put_Image (S : in out Root_Buffer_Type'Class; V : Big_Real); function "+" (L : Valid_Big_Real) return Valid_Big_Real with Global => null; diff --git a/gcc/ada/libgnat/a-ngcefu.adb b/gcc/ada/libgnat/a-ngcefu.adb index d47a14f..50abfb2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ngcoar.adb b/gcc/ada/libgnat/a-ngcoar.adb index 3a7cede..ed9be6a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-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- -- diff --git a/gcc/ada/libgnat/a-ngcoty.adb b/gcc/ada/libgnat/a-ngcoty.adb index b369dfc..d9a88e8 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ngcoty.ads b/gcc/ada/libgnat/a-ngcoty.ads index a5534cd..71a6123 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 3f7c3d1..d9de09c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ngelfu.ads b/gcc/ada/libgnat/a-ngelfu.ads index 70f9b7a..523e64f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-2021, 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 -- @@ -126,7 +126,7 @@ is Pre => Cycle > 0.0 and then X /= 0.0 and then Float_Type'Base'Remainder (X, Cycle) /= 0.0 - and then abs Float_Type'Base'Remainder (X, Cycle) = 0.5 * Cycle; + and then abs Float_Type'Base'Remainder (X, Cycle) /= 0.5 * Cycle; function Arcsin (X : Float_Type'Base) return Float_Type'Base with Pre => abs X <= 1.0, diff --git a/gcc/ada/libgnat/a-ngrear.adb b/gcc/ada/libgnat/a-ngrear.adb index 1115cd3..820e6f7 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-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- -- diff --git a/gcc/ada/libgnat/a-ngrear.ads b/gcc/ada/libgnat/a-ngrear.ads index 748d6b7..6e3f854 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2021, 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 7fd49a8..164d4b8 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 f1fbb31..7901782 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 16a34ae..1c19912 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-nuaufl__wraplf.ads b/gcc/ada/libgnat/a-nuaufl__wraplf.ads index b6eb22c..3318a10 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-nudira.adb b/gcc/ada/libgnat/a-nudira.adb index e18403c..dff1013 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-nudira.ads b/gcc/ada/libgnat/a-nudira.ads index 35b7dc6..9496043 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 8621006..1ec38ac 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-nuflra.ads b/gcc/ada/libgnat/a-nuflra.ads index ff7ab88..350faeb 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 42ed336..de952a8 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-rbtgbk.adb b/gcc/ada/libgnat/a-rbtgbk.adb index 40a792f..1c0d5d8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-rbtgbk.ads b/gcc/ada/libgnat/a-rbtgbk.ads index 22f6c22..cd18fdc 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-rbtgbo.adb b/gcc/ada/libgnat/a-rbtgbo.adb index a2775ea..f92191e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-rbtgbo.ads b/gcc/ada/libgnat/a-rbtgbo.ads index 968c2f2..4d2c655 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-rbtgso.adb b/gcc/ada/libgnat/a-rbtgso.adb index fcb254d..22f5603 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-rbtgso.ads b/gcc/ada/libgnat/a-rbtgso.ads index e6eeb33..1e80ed5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-sbecin.adb b/gcc/ada/libgnat/a-sbecin.adb index d9bef56..ebbdc7f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-sbecin.ads b/gcc/ada/libgnat/a-sbecin.ads index 9144e9e..6061e9e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 5062756..f2994f9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-sbhcin.ads b/gcc/ada/libgnat/a-sbhcin.ads index ec1d97c..d067b61 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 c21050d..14b3b4c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-sblcin.ads b/gcc/ada/libgnat/a-sblcin.ads index 8915631..e9f5f20 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 6c042f1..bf80383 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-secain.ads b/gcc/ada/libgnat/a-secain.ads index 3e77231..e376660 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-sequio.adb b/gcc/ada/libgnat/a-sequio.adb index 0b5aa61..99e5e59 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-sequio.ads b/gcc/ada/libgnat/a-sequio.ads index dcaa3f0..34d3b25 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 0c1b0a7..c476d78 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 8da6f43..0d253a0 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 8fb7ac1..712ed2f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 35a346e..9432a07 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-shcain.ads b/gcc/ada/libgnat/a-shcain.ads index 4d2975c..8ba2551 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-siocst.adb b/gcc/ada/libgnat/a-siocst.adb index 5501486..e830621 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-siocst.ads b/gcc/ada/libgnat/a-siocst.ads index 3a37f7bb..88713b9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-slcain.adb b/gcc/ada/libgnat/a-slcain.adb index 732e103..141757b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-slcain.ads b/gcc/ada/libgnat/a-slcain.ads index 8efa651..a015993 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-ssicst.adb b/gcc/ada/libgnat/a-ssicst.adb index 2293136..03da997 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ssicst.ads b/gcc/ada/libgnat/a-ssicst.ads index 7cf18cb..9233fb7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stboha.adb b/gcc/ada/libgnat/a-stboha.adb index a960dc3..b551587 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-stbubo.adb b/gcc/ada/libgnat/a-stbubo.adb new file mode 100644 index 0000000..a3e0e32 --- /dev/null +++ b/gcc/ada/libgnat/a-stbubo.adb @@ -0,0 +1,147 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- ADA.STRINGS.TEXT_BUFFERS.BOUNDED -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 2020-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. -- +-- -- +------------------------------------------------------------------------------ + +with Ada.Strings.UTF_Encoding.Conversions; +with Ada.Strings.UTF_Encoding.Strings; +with Ada.Strings.UTF_Encoding.Wide_Strings; +with Ada.Strings.UTF_Encoding.Wide_Wide_Strings; +package body Ada.Strings.Text_Buffers.Bounded is + + -- Pretty much the same as the Unbounded version, except where different. + -- + -- One could imagine inventing an Input_Mapping generic analogous to + -- the existing Output_Mapping generic to address the Get-related + -- Bounded/Unbounded code duplication issues, but let's not. In the + -- Output case, there was more substantial duplication and there were + -- 3 clients (Bounded, Unbounded, and Files) instead of 2. + + function Text_Truncated (Buffer : Buffer_Type) return Boolean is + (Buffer.Truncated); + + function Get (Buffer : in out Buffer_Type) return String is + -- If all characters are 7 bits, we don't need to decode; + -- this is an optimization. + -- Otherwise, if all are 8 bits, we need to decode to get Latin-1. + -- Otherwise, the result is implementation defined, so we return a + -- String encoded as UTF-8. Note that the RM says "if any character + -- in the sequence is not defined in Character, the result is + -- implementation-defined", so we are not obliged to decode ANY + -- Latin-1 characters if ANY character is bigger than 8 bits. + begin + if Buffer.All_8_Bits and not Buffer.All_7_Bits then + return UTF_Encoding.Strings.Decode (Get_UTF_8 (Buffer)); + else + return Get_UTF_8 (Buffer); + end if; + end Get; + + function Wide_Get (Buffer : in out Buffer_Type) return Wide_String is + begin + return UTF_Encoding.Wide_Strings.Decode (Get_UTF_8 (Buffer)); + end Wide_Get; + + function Wide_Wide_Get (Buffer : in out Buffer_Type) return Wide_Wide_String + is + begin + return UTF_Encoding.Wide_Wide_Strings.Decode (Get_UTF_8 (Buffer)); + end Wide_Wide_Get; + + function Get_UTF_8 + (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_8_String + is + begin + return + Result : constant UTF_Encoding.UTF_8_String := + UTF_Encoding.UTF_8_String + (Buffer.Chars (1 .. Text_Buffer_Count (Buffer.UTF_8_Length))) + do + -- Reset buffer to default initial value. + declare + Defaulted : Buffer_Type (0); + + -- 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 => <>, + Indent_Pending => <>, UTF_8_Length => <>, UTF_8_Column => <>, + All_7_Bits => <>, All_8_Bits => <>, Truncated => <>)); + begin + Buffer.Indentation := Defaulted.Indentation; + Buffer.Indent_Pending := Defaulted.Indent_Pending; + Buffer.UTF_8_Length := Defaulted.UTF_8_Length; + Buffer.UTF_8_Column := Defaulted.UTF_8_Column; + Buffer.All_7_Bits := Defaulted.All_7_Bits; + Buffer.All_8_Bits := Defaulted.All_8_Bits; + Buffer.Truncated := Defaulted.Truncated; + end; + end return; + end Get_UTF_8; + + function Wide_Get_UTF_16 + (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_16_Wide_String + is + begin + return + UTF_Encoding.Conversions.Convert + (Get_UTF_8 (Buffer), Input_Scheme => UTF_Encoding.UTF_8); + end Wide_Get_UTF_16; + + procedure Put_UTF_8_Implementation + (Buffer : in out Root_Buffer_Type'Class; + Item : UTF_Encoding.UTF_8_String) + is + procedure Buffer_Type_Implementation (Buffer : in out Buffer_Type); + -- View the passed-in Buffer parameter as being of type Buffer_Type, + -- not of Root_Buffer_Type'Class. + + procedure Buffer_Type_Implementation (Buffer : in out Buffer_Type) is + begin + for Char of Item loop + if Buffer.UTF_8_Length = Integer (Buffer.Max_Characters) then + Buffer.Truncated := True; + return; + end if; + + Buffer.All_7_Bits := @ and then Character'Pos (Char) < 128; + + Buffer.UTF_8_Length := @ + 1; + Buffer.UTF_8_Column := @ + 1; + Buffer.Chars (Text_Buffer_Count (Buffer.UTF_8_Length)) := Char; + end loop; + end Buffer_Type_Implementation; + begin + if Item'Length > 0 then + Buffer_Type_Implementation (Buffer_Type (Buffer)); + end if; + end Put_UTF_8_Implementation; + +end Ada.Strings.Text_Buffers.Bounded; diff --git a/gcc/ada/libgnat/a-stbubo.ads b/gcc/ada/libgnat/a-stbubo.ads new file mode 100644 index 0000000..aef7ccf --- /dev/null +++ b/gcc/ada/libgnat/a-stbubo.ads @@ -0,0 +1,73 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- ADA.STRINGS.TEXT_BUFFERS.BOUNDED -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2020-2021, 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 -- +-- copy and modify this specification, provided that if you redistribute a -- +-- modified version, any changes that you have made are clearly indicated. -- +-- -- +------------------------------------------------------------------------------ + +package Ada.Strings.Text_Buffers.Bounded with + Pure +is + + type Buffer_Type (Max_Characters : Text_Buffer_Count) is + new Root_Buffer_Type with private with + Default_Initial_Condition => not Text_Truncated (Buffer_Type); + + function Text_Truncated (Buffer : Buffer_Type) return Boolean; + + function Get (Buffer : in out Buffer_Type) return String with + Post'Class => Get'Result'First = 1 and then Current_Indent (Buffer) = 0; + + function Wide_Get (Buffer : in out Buffer_Type) return Wide_String with + Post'Class => Wide_Get'Result'First = 1 + and then Current_Indent (Buffer) = 0; + + function Wide_Wide_Get + (Buffer : in out Buffer_Type) return Wide_Wide_String with + Post'Class => Wide_Wide_Get'Result'First = 1 + and then Current_Indent (Buffer) = 0; + + function Get_UTF_8 + (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_8_String with + Post'Class => Get_UTF_8'Result'First = 1 + and then Current_Indent (Buffer) = 0; + + function Wide_Get_UTF_16 + (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_16_Wide_String with + Post'Class => Wide_Get_UTF_16'Result'First = 1 + and then Current_Indent (Buffer) = 0; + +private + + procedure Put_UTF_8_Implementation + (Buffer : in out Root_Buffer_Type'Class; + Item : UTF_Encoding.UTF_8_String) + with Pre => Buffer in Buffer_Type'Class; + + package Mapping is new Output_Mapping (Put_UTF_8_Implementation); + + subtype Positive_Text_Buffer_Count is + Text_Buffer_Count range 1 .. Text_Buffer_Count'Last; + + type Convertible_To_UTF_8_String is + array (Positive_Text_Buffer_Count range <>) of Character; + + type Buffer_Type (Max_Characters : Text_Buffer_Count) + is new Mapping.Buffer_Type with record + Truncated : Boolean := False; + -- True if we ran out of space on a Put + + Chars : Convertible_To_UTF_8_String (1 .. Max_Characters); + end record; + +end Ada.Strings.Text_Buffers.Bounded; diff --git a/gcc/ada/libgnat/a-stbufi.adb b/gcc/ada/libgnat/a-stbufi.adb new file mode 100644 index 0000000..0a8feab --- /dev/null +++ b/gcc/ada/libgnat/a-stbufi.adb @@ -0,0 +1,82 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- ADA.STRINGS.TEXT_BUFFERS.FILES -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 2020-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. -- +-- -- +------------------------------------------------------------------------------ + +package body Ada.Strings.Text_Buffers.Files is + + procedure Put_UTF_8_Implementation + (Buffer : in out Root_Buffer_Type'Class; + Item : UTF_Encoding.UTF_8_String) is + Result : Integer; + begin + Result := OS.Write (File_Buffer (Buffer).FD, + Item (Item'First)'Address, + Item'Length); + if Result /= Item'Length then + raise Program_Error with OS.Errno_Message; + end if; + end Put_UTF_8_Implementation; + + function Create_From_FD + (FD : GNAT.OS_Lib.File_Descriptor; + Close_Upon_Finalization : Boolean := True) return File_Buffer + is + use OS; + begin + if FD = Invalid_FD then + raise Program_Error with OS.Errno_Message; + end if; + return Result : File_Buffer do + Result.FD := FD; + Result.Close_Upon_Finalization := Close_Upon_Finalization; + end return; + end Create_From_FD; + + function Create_File (Name : String) return File_Buffer is + begin + return Create_From_FD (OS.Create_File (Name, Fmode => OS.Binary)); + end Create_File; + + procedure Finalize (Ref : in out Self_Ref) is + Success : Boolean; + use OS; + begin + if Ref.Self.FD /= OS.Invalid_FD + and then Ref.Self.Close_Upon_Finalization + then + Close (Ref.Self.FD, Success); + if not Success then + raise Program_Error with OS.Errno_Message; + end if; + end if; + Ref.Self.FD := OS.Invalid_FD; + end Finalize; + +end Ada.Strings.Text_Buffers.Files; diff --git a/gcc/ada/libgnat/a-stoufi.ads b/gcc/ada/libgnat/a-stbufi.ads index 0bff45a..2a2db90 100644 --- a/gcc/ada/libgnat/a-stoufi.ads +++ b/gcc/ada/libgnat/a-stbufi.ads @@ -2,11 +2,11 @@ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- --- ADA.STRINGS.TEXT_OUTPUT.FILES -- +-- ADA.STRINGS.TEXT_BUFFERS.FILES -- -- -- -- S p e c -- -- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -29,44 +29,47 @@ -- -- ------------------------------------------------------------------------------ -private with GNAT.OS_Lib; -private with Ada.Finalization; -package Ada.Strings.Text_Output.Files is - -- This package supports a Sink type that sends output to a file. The file - -- is automatically closed when finalized. +with Ada.Finalization; +with GNAT.OS_Lib; - function Standard_Output return Sink_Access; - function Standard_Error return Sink_Access; +package Ada.Strings.Text_Buffers.Files is - type File (<>) is new Sink with private; + type File_Buffer is new Root_Buffer_Type with private; + -- Output written to a File_Buffer is written to the associated file. - function Create_File - (Name : String; - Indent_Amount : Natural := Default_Indent_Amount; - Chunk_Length : Positive := Default_Chunk_Length) return File; - function Create_New_File - (Name : String; - Indent_Amount : Natural := Default_Indent_Amount; - Chunk_Length : Positive := Default_Chunk_Length) return File; - -- Create a file. Create_New_File raises an exception if the file already - -- exists; Create_File overwrites. + function Create_From_FD + (FD : GNAT.OS_Lib.File_Descriptor; + Close_Upon_Finalization : Boolean := True) + return File_Buffer; + -- file closed upon finalization if specified - procedure Close (S : in out File'Class); + function Create_File (Name : String) return File_Buffer; + -- file closed upon finalization + + function Create_Standard_Output_Buffer return File_Buffer is + (Create_From_FD (GNAT.OS_Lib.Standout, Close_Upon_Finalization => False)); + function Create_Standard_Error_Buffer return File_Buffer is + (Create_From_FD (GNAT.OS_Lib.Standerr, Close_Upon_Finalization => False)); private + procedure Put_UTF_8_Implementation + (Buffer : in out Root_Buffer_Type'Class; + Item : UTF_Encoding.UTF_8_String) + with Pre => Buffer in File_Buffer'Class; + + package Mapping is new Output_Mapping (Put_UTF_8_Implementation); + package OS renames GNAT.OS_Lib; - type Self_Ref (Self : access File) is new Finalization.Limited_Controlled - with null record; + type Self_Ref (Self : not null access File_Buffer) + is new Finalization.Limited_Controlled with null record; overriding procedure Finalize (Ref : in out Self_Ref); - type File is new Sink with record - FD : OS.File_Descriptor := OS.Invalid_FD; - Ref : Self_Ref (File'Access); + type File_Buffer is new Mapping.Buffer_Type with record + FD : OS.File_Descriptor := OS.Invalid_FD; + Ref : Self_Ref (File_Buffer'Access); + Close_Upon_Finalization : Boolean := False; end record; - overriding procedure Full_Method (S : in out File); - overriding procedure Flush_Method (S : in out File); - -end Ada.Strings.Text_Output.Files; +end Ada.Strings.Text_Buffers.Files; diff --git a/gcc/ada/libgnat/a-stoufo.adb b/gcc/ada/libgnat/a-stbufo.adb index f80b30a..8ac5512 100644 --- a/gcc/ada/libgnat/a-stoufo.adb +++ b/gcc/ada/libgnat/a-stbufo.adb @@ -2,11 +2,11 @@ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- --- ADA.STRINGS.TEXT_OUTPUT.FORMATTING -- +-- ADA.STRINGS.TEXT_BUFFERS.FORMATTING -- -- -- -- B o d y -- -- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -29,14 +29,17 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Strings.Text_Output.Files; -with Ada.Strings.Text_Output.Buffers; use Ada.Strings.Text_Output.Buffers; -with Ada.Strings.Text_Output.Utils; use Ada.Strings.Text_Output.Utils; -package body Ada.Strings.Text_Output.Formatting is +with Ada.Strings.Text_Buffers.Unbounded; +with Ada.Strings.Text_Buffers.Files; + +package body Ada.Strings.Text_Buffers.Formatting is + + use Ada.Strings.Text_Buffers.Files; + use Ada.Strings.Text_Buffers.Utils; procedure Put - (S : in out Sink'Class; T : Template; - X1, X2, X3, X4, X5, X6, X7, X8, X9 : UTF_8_Lines := "") + (S : in out Root_Buffer_Type'Class; T : Template; + 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); @@ -50,13 +53,13 @@ package body Ada.Strings.Text_Output.Formatting is when '\' => Put_7bit (S, '\'); when 'i' => - Indent (S); + Increase_Indent (S); when 'o' => - Outdent (S); + Decrease_Indent (S); when 'I' => - Indent (S, 1); + Increase_Indent (S, 1); when 'O' => - Outdent (S, 1); + Decrease_Indent (S, 1); when '1' => Used (1) := True; @@ -123,33 +126,33 @@ package body Ada.Strings.Text_Output.Formatting is if not Used (9) then pragma Assert (X9 = ""); end if; - - Flush (S); end Put; + function Format + (T : Template; + X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "") + return Utils.UTF_8_Lines + is + Buffer : Unbounded.Buffer_Type; + begin + Put (Buffer, T, X1, X2, X3, X4, X5, X6, X7, X8, X9); + return Buffer.Get_UTF_8; + end Format; + procedure Put (T : Template; - X1, X2, X3, X4, X5, X6, X7, X8, X9 : UTF_8_Lines := "") is + X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "") is + Buffer : File_Buffer := Create_Standard_Output_Buffer; begin - Put (Files.Standard_Output.all, T, X1, X2, X3, X4, X5, X6, X7, X8, X9); + Put (Buffer, T, X1, X2, X3, X4, X5, X6, X7, X8, X9); end Put; procedure Err (T : Template; - X1, X2, X3, X4, X5, X6, X7, X8, X9 : UTF_8_Lines := "") is + X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "") is + Buffer : File_Buffer := Create_Standard_Error_Buffer; begin - Put (Files.Standard_Error.all, T, X1, X2, X3, X4, X5, X6, X7, X8, X9); + Put (Buffer, T, X1, X2, X3, X4, X5, X6, X7, X8, X9); end Err; - function Format - (T : Template; - X1, X2, X3, X4, X5, X6, X7, X8, X9 : UTF_8_Lines := "") - return UTF_8_Lines - is - Buf : Buffer := New_Buffer; - begin - Put (Buf, T, X1, X2, X3, X4, X5, X6, X7, X8, X9); - return Get_UTF_8 (Buf); - end Format; - -end Ada.Strings.Text_Output.Formatting; +end Ada.Strings.Text_Buffers.Formatting; diff --git a/gcc/ada/libgnat/a-stoufo.ads b/gcc/ada/libgnat/a-stbufo.ads index 3b44bd8..8c0d476 100644 --- a/gcc/ada/libgnat/a-stoufo.ads +++ b/gcc/ada/libgnat/a-stbufo.ads @@ -2,11 +2,11 @@ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- --- ADA.STRINGS.TEXT_OUTPUT.FORMATTING -- +-- ADA.STRINGS.TEXT_BUFFERS.FORMATTING -- -- -- -- S p e c -- -- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -29,19 +29,20 @@ -- -- ------------------------------------------------------------------------------ -package Ada.Strings.Text_Output.Formatting is +with Ada.Strings.Text_Buffers.Utils; + +package Ada.Strings.Text_Buffers.Formatting is -- Template-based output, based loosely on C's printf family. Unlike -- printf, it is type safe. We don't support myriad formatting options; the -- caller is expected to call 'Image, or other functions that might have -- various formatting capabilities. - -- - -- Each of the following calls Flush - type Template is new UTF_8; + type Template is new Utils.UTF_8; + procedure Put - (S : in out Sink'Class; T : Template; - X1, X2, X3, X4, X5, X6, X7, X8, X9 : UTF_8_Lines := ""); + (S : in out Root_Buffer_Type'Class; T : Template; + X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := ""); -- Prints the template as is, except for the following escape sequences: -- "\n" is end of line. -- "\i" indents by the default amount, and "\o" outdents. @@ -55,18 +56,18 @@ package Ada.Strings.Text_Output.Formatting is procedure Put (T : Template; - X1, X2, X3, X4, X5, X6, X7, X8, X9 : UTF_8_Lines := ""); + X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := ""); -- Sends to standard output procedure Err (T : Template; - X1, X2, X3, X4, X5, X6, X7, X8, X9 : UTF_8_Lines := ""); + X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := ""); -- Sends to standard error function Format (T : Template; - X1, X2, X3, X4, X5, X6, X7, X8, X9 : UTF_8_Lines := "") - return UTF_8_Lines; + X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "") + return Utils.UTF_8_Lines; -- Returns a UTF-8-encoded String -end Ada.Strings.Text_Output.Formatting; +end Ada.Strings.Text_Buffers.Formatting; diff --git a/gcc/ada/libgnat/a-stbuun.adb b/gcc/ada/libgnat/a-stbuun.adb new file mode 100644 index 0000000..9ae3d28 --- /dev/null +++ b/gcc/ada/libgnat/a-stbuun.adb @@ -0,0 +1,193 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- ADA.STRINGS.TEXT_BUFFERS.UNBOUNDED -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 2020-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. -- +-- -- +------------------------------------------------------------------------------ + +with Ada.Unchecked_Deallocation; +with Ada.Strings.UTF_Encoding.Conversions; +with Ada.Strings.UTF_Encoding.Strings; +with Ada.Strings.UTF_Encoding.Wide_Strings; +with Ada.Strings.UTF_Encoding.Wide_Wide_Strings; +package body Ada.Strings.Text_Buffers.Unbounded is + + function Get (Buffer : in out Buffer_Type) return String is + -- If all characters are 7 bits, we don't need to decode; + -- this is an optimization. + -- Otherwise, if all are 8 bits, we need to decode to get Latin-1. + -- Otherwise, the result is implementation defined, so we return a + -- String encoded as UTF-8. Note that the RM says "if any character + -- in the sequence is not defined in Character, the result is + -- implementation-defined", so we are not obliged to decode ANY + -- Latin-1 characters if ANY character is bigger than 8 bits. + begin + if Buffer.All_8_Bits and not Buffer.All_7_Bits then + return UTF_Encoding.Strings.Decode (Get_UTF_8 (Buffer)); + else + return Get_UTF_8 (Buffer); + end if; + end Get; + + function Wide_Get (Buffer : in out Buffer_Type) return Wide_String is + begin + return UTF_Encoding.Wide_Strings.Decode (Get_UTF_8 (Buffer)); + end Wide_Get; + + function Wide_Wide_Get (Buffer : in out Buffer_Type) return Wide_Wide_String + is + begin + return UTF_Encoding.Wide_Wide_Strings.Decode (Get_UTF_8 (Buffer)); + end Wide_Wide_Get; + + function Get_UTF_8 + (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_8_String + is + begin + return Result : UTF_Encoding.UTF_8_String (1 .. Buffer.UTF_8_Length) do + declare + Target_First : Positive := 1; + Ptr : Chunk_Access := Buffer.List.First_Chunk'Unchecked_Access; + Target_Last : Positive; + begin + while Ptr /= null loop + Target_Last := Target_First + Ptr.Chars'Length - 1; + if Target_Last <= Result'Last then + -- all of chunk is assigned to Result + Result (Target_First .. Target_Last) := Ptr.Chars; + Target_First := Target_First + Ptr.Chars'Length; + else + -- only part of (last) chunk is assigned to Result + declare + Final_Target : UTF_Encoding.UTF_8_String renames + Result (Target_First .. Result'Last); + begin + Final_Target := Ptr.Chars (1 .. Final_Target'Length); + end; + pragma Assert (Ptr.Next = null); + Target_First := Integer'Last; + end if; + + Ptr := Ptr.Next; + end loop; + end; + + -- Reset buffer to default initial value. + declare + Defaulted : Buffer_Type; + + -- 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 => <>, + UTF_8_Column => <>, All_7_Bits => <>, All_8_Bits => <>, + List => <>, Last_Used => <>)); + begin + Buffer.Indentation := Defaulted.Indentation; + Buffer.Indent_Pending := Defaulted.Indent_Pending; + Buffer.UTF_8_Length := Defaulted.UTF_8_Length; + Buffer.UTF_8_Column := Defaulted.UTF_8_Column; + Buffer.All_7_Bits := Defaulted.All_7_Bits; + Buffer.All_8_Bits := Defaulted.All_8_Bits; + Buffer.Last_Used := Defaulted.Last_Used; + Finalize (Buffer.List); -- free any allocated chunks + end; + end return; + end Get_UTF_8; + + function Wide_Get_UTF_16 + (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_16_Wide_String + is + begin + return + UTF_Encoding.Conversions.Convert + (Get_UTF_8 (Buffer), Input_Scheme => UTF_Encoding.UTF_8); + end Wide_Get_UTF_16; + + procedure Put_UTF_8_Implementation + (Buffer : in out Root_Buffer_Type'Class; + Item : UTF_Encoding.UTF_8_String) + is + procedure Buffer_Type_Implementation (Buffer : in out Buffer_Type); + -- View the passed-in Buffer parameter as being of type Buffer_Type, + -- not of type Root_Buffer_Type'Class. + + procedure Buffer_Type_Implementation (Buffer : in out Buffer_Type) is + begin + for Char of Item loop + Buffer.All_7_Bits := @ and then Character'Pos (Char) < 128; + + if Buffer.Last_Used = Buffer.List.Current_Chunk.Length then + -- Current chunk is full; allocate a new one with doubled size + + declare + Cc : Chunk renames Buffer.List.Current_Chunk.all; + Max : constant Positive := Integer'Last / 2; + Length : constant Natural := + Integer'Min (Max, 2 * Cc.Length); + begin + pragma Assert (Cc.Next = null); + Cc.Next := new Chunk (Length => Length); + Buffer.List.Current_Chunk := Cc.Next; + Buffer.Last_Used := 0; + end; + end if; + + Buffer.UTF_8_Length := @ + 1; + Buffer.UTF_8_Column := @ + 1; + Buffer.Last_Used := @ + 1; + Buffer.List.Current_Chunk.Chars (Buffer.Last_Used) := Char; + end loop; + end Buffer_Type_Implementation; + begin + Buffer_Type_Implementation (Buffer_Type (Buffer)); + end Put_UTF_8_Implementation; + + procedure Initialize (List : in out Managed_Chunk_List) is + begin + List.Current_Chunk := List.First_Chunk'Unchecked_Access; + end Initialize; + + procedure Finalize (List : in out Managed_Chunk_List) is + procedure Free is new Ada.Unchecked_Deallocation (Chunk, Chunk_Access); + Ptr : Chunk_Access := List.First_Chunk.Next; + begin + while Ptr /= null loop + declare + Old_Ptr : Chunk_Access := Ptr; + begin + Ptr := Ptr.Next; + Free (Old_Ptr); + end; + end loop; + + List.First_Chunk.Next := null; + Initialize (List); + end Finalize; + +end Ada.Strings.Text_Buffers.Unbounded; diff --git a/gcc/ada/libgnat/a-stbuun.ads b/gcc/ada/libgnat/a-stbuun.ads new file mode 100644 index 0000000..3c6ad3a --- /dev/null +++ b/gcc/ada/libgnat/a-stbuun.ads @@ -0,0 +1,87 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- ADA.STRINGS.TEXT_BUFFERS.UNBOUNDED -- +-- -- +-- S p e c -- +-- -- +-- This specification is derived from the Ada Reference Manual for use with -- +-- GNAT. In accordance with the copyright of that document, you can freely -- +-- copy and modify this specification, provided that if you redistribute a -- +-- modified version, any changes that you have made are clearly indicated. -- +-- -- +------------------------------------------------------------------------------ + +with Ada.Finalization; +package Ada.Strings.Text_Buffers.Unbounded with + Preelaborate + -- , Nonblocking + -- , Global => null +is + + type Buffer_Type is new Root_Buffer_Type with private; + + function Get (Buffer : in out Buffer_Type) return String with + Post'Class => Get'Result'First = 1 and then Current_Indent (Buffer) = 0; + + function Wide_Get (Buffer : in out Buffer_Type) return Wide_String with + Post'Class => Wide_Get'Result'First = 1 + and then Current_Indent (Buffer) = 0; + + function Wide_Wide_Get + (Buffer : in out Buffer_Type) return Wide_Wide_String with + Post'Class => Wide_Wide_Get'Result'First = 1 + and then Current_Indent (Buffer) = 0; + + function Get_UTF_8 + (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_8_String with + Post'Class => Get_UTF_8'Result'First = 1 + and then Current_Indent (Buffer) = 0; + + function Wide_Get_UTF_16 + (Buffer : in out Buffer_Type) return UTF_Encoding.UTF_16_Wide_String with + Post'Class => Wide_Get_UTF_16'Result'First = 1 + and then Current_Indent (Buffer) = 0; + +private + + procedure Put_UTF_8_Implementation + (Buffer : in out Root_Buffer_Type'Class; + Item : UTF_Encoding.UTF_8_String) + with Pre => Buffer in Buffer_Type'Class; + + package Mapping is new Output_Mapping (Put_UTF_8_Implementation); + + type Chunk; + type Chunk_Access is access all Chunk; + type Chunk (Length : Positive) is record + Next : Chunk_Access := null; + Chars : UTF_Encoding.UTF_8_String (1 .. Length); + end record; + + type Managed_Chunk_List is new Ada.Finalization.Limited_Controlled with + record + First_Chunk : aliased Chunk (64); + -- First chunk in list is not created by an allocator; it is + -- large enough to suffice for many common images. + + Current_Chunk : Chunk_Access; + -- Chunk we are currrently writing to. + -- Initialized to Managed_Chunk_List.First'Access. + end record; + + overriding procedure Initialize (List : in out Managed_Chunk_List); + -- List.Current_Chunk := List.First_Chunk'Unchecked_Access; + + overriding procedure Finalize (List : in out Managed_Chunk_List); + -- Free any allocated chunks. + + type Buffer_Type is new Mapping.Buffer_Type with record + List : Managed_Chunk_List; + + Last_Used : Natural := 0; + -- Index of last used char in List.Current_Chunk.all; 0 if none used. + end record; + +end Ada.Strings.Text_Buffers.Unbounded; diff --git a/gcc/ada/libgnat/a-stobfi.ads b/gcc/ada/libgnat/a-stbuut.adb index 65e8e24..b32b2d3 100644 --- a/gcc/ada/libgnat/a-stobfi.ads +++ b/gcc/ada/libgnat/a-stbuut.adb @@ -2,11 +2,11 @@ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- --- ADA.STRINGS.TEXT_OUTPUT.BASIC_FILES -- +-- ADA.STRINGS.TEXT_BUFFERS.UTILS -- -- -- --- S p e c -- +-- B o d y -- -- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -29,38 +29,53 @@ -- -- ------------------------------------------------------------------------------ -private with GNAT.OS_Lib; -package Ada.Strings.Text_Output.Basic_Files is - -- Normally, you should use Ada.Strings.Text_Output.Files, which - -- automatically Closes files via finalization. If you don't want to use - -- finalization, use this package instead. You must then Close the file by - -- hand. The semantics is otherwise the same as Files. +package body Ada.Strings.Text_Buffers.Utils is - function Standard_Output return Sink_Access; - function Standard_Error return Sink_Access; + procedure Put_7bit + (Buffer : in out Root_Buffer_Type'Class; Item : Character_7) + is + begin + Put (Buffer, (1 => Item)); + end Put_7bit; - type File (<>) is new Sink with private; + procedure Put_Character + (Buffer : in out Root_Buffer_Type'Class; Item : Character) + is + begin + Put (Buffer, (1 => Item)); + end Put_Character; - function Create_File - (Name : String; - Indent_Amount : Natural := Default_Indent_Amount; - Chunk_Length : Positive := Default_Chunk_Length) return File; - function Create_New_File - (Name : String; - Indent_Amount : Natural := Default_Indent_Amount; - Chunk_Length : Positive := Default_Chunk_Length) return File; + procedure Put_Wide_Character + (Buffer : in out Root_Buffer_Type'Class; Item : Wide_Character) + is + begin + Wide_Put (Buffer, (1 => Item)); + end Put_Wide_Character; - procedure Close (S : in out File'Class); + procedure Put_Wide_Wide_Character + (Buffer : in out Root_Buffer_Type'Class; Item : Wide_Wide_Character) + is + begin + Wide_Wide_Put (Buffer, (1 => Item)); + end Put_Wide_Wide_Character; -private + procedure Put_UTF_8_Lines + (Buffer : in out Root_Buffer_Type'Class; Item : UTF_8_Lines) + is + begin + Put (Buffer, Item); + end Put_UTF_8_Lines; - package OS renames GNAT.OS_Lib; + function Column (Buffer : Root_Buffer_Type'Class) return Positive is + begin + return Buffer.UTF_8_Column; + end Column; - type File is new Sink with record - FD : OS.File_Descriptor := OS.Invalid_FD; - end record; + procedure Tab_To_Column + (Buffer : in out Root_Buffer_Type'Class; Column : Positive) + is + begin + Put (Buffer, String'(1 .. Column - Utils.Column (Buffer) => ' ')); + end Tab_To_Column; - overriding procedure Full_Method (S : in out File); - overriding procedure Flush_Method (S : in out File); - -end Ada.Strings.Text_Output.Basic_Files; +end Ada.Strings.Text_Buffers.Utils; diff --git a/gcc/ada/libgnat/a-stoubu.ads b/gcc/ada/libgnat/a-stbuut.ads index faec897..d76b8cf 100644 --- a/gcc/ada/libgnat/a-stoubu.ads +++ b/gcc/ada/libgnat/a-stbuut.ads @@ -2,11 +2,11 @@ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- --- ADA.STRINGS.TEXT_OUTPUT.BUFFERS -- +-- ADA.STRINGS.TEXT_BUFFERS.UTILS -- -- -- -- S p e c -- -- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -29,45 +29,54 @@ -- -- ------------------------------------------------------------------------------ -package Ada.Strings.Text_Output.Buffers is +with Ada.Strings.UTF_Encoding.Wide_Wide_Strings; - type Buffer (<>) is new Sink with private; +package Ada.Strings.Text_Buffers.Utils with Pure is - function New_Buffer - (Indent_Amount : Natural := Default_Indent_Amount; - Chunk_Length : Positive := Default_Chunk_Length) return Buffer; + -- Ada.Strings.Text_Buffers is a predefined unit (see Ada RM A.4.12). + -- This is a GNAT-defined child unit of that parent. - procedure Destroy (S : in out Buffer); - -- Reclaim any heap-allocated data, and render the Buffer unusable. - -- It would make sense to do this via finalization, but we wish to - -- avoid controlled types in the generated code for 'Image. + subtype Character_7 is + Character range Character'Val (0) .. Character'Val (2**7 - 1); - function Get_UTF_8 (S : Buffer'Class) return UTF_8_Lines; - -- Get the characters in S, encoded as UTF-8. + procedure Put_7bit + (Buffer : in out Root_Buffer_Type'Class; Item : Character_7); + procedure Put_Character + (Buffer : in out Root_Buffer_Type'Class; Item : Character); + procedure Put_Wide_Character + (Buffer : in out Root_Buffer_Type'Class; Item : Wide_Character); + procedure Put_Wide_Wide_Character + (Buffer : in out Root_Buffer_Type'Class; Item : Wide_Wide_Character); + -- Single character output procedures. - function UTF_8_Length (S : Buffer'Class) return Natural; - procedure Get_UTF_8 - (S : Buffer'Class; Result : out UTF_8_Lines) with - Pre => Result'First = 1 and Result'Last = UTF_8_Length (S); - -- This is a procedure version of the Get_UTF_8 function, for - -- efficiency. The Result String must be the exact right length. + function Column (Buffer : Root_Buffer_Type'Class) return Positive with + Inline; + -- Current output column. The Column is initially 1, and is incremented for + -- each 8-bit character output. A call to New_Line sets Column back to 1. + -- The next character to be output will go in this column. - function Get (S : Buffer'Class) return String; - function Wide_Get (S : Buffer'Class) return Wide_String; - function Wide_Wide_Get (S : Buffer'Class) return Wide_Wide_String; - -- Get the characters in S, decoded as [[Wide_]Wide_]String. - -- There is no need for procedure versions of these, because - -- they are intended primarily to implement the [[Wide_]Wide_]Image - -- attribute, which is already a function. + procedure Tab_To_Column + (Buffer : in out Root_Buffer_Type'Class; Column : Positive); + -- Put spaces until we're at or past Column. -private - type Chunk_Count is new Natural; - type Buffer is new Sink with record - Num_Extra_Chunks : Natural := 0; - -- Number of chunks in the linked list, not including Initial_Chunk. - end record; + subtype Sink is Root_Buffer_Type; + + function NL return Character is (ASCII.LF) with Inline; + + function UTF_8_Length (Buffer : Root_Buffer_Type'Class) return Natural; - overriding procedure Full_Method (S : in out Buffer); - overriding procedure Flush_Method (S : in out Buffer) is null; + subtype UTF_8_Lines is UTF_Encoding.UTF_8_String with + Predicate => + UTF_Encoding.Wide_Wide_Strings.Encode + (UTF_Encoding.Wide_Wide_Strings.Decode (UTF_8_Lines)) = UTF_8_Lines; -end Ada.Strings.Text_Output.Buffers; + subtype UTF_8 is UTF_8_Lines with + Predicate => (for all UTF_8_Char of UTF_8 => UTF_8_Char /= NL); + + procedure Put_UTF_8_Lines + (Buffer : in out Root_Buffer_Type'Class; Item : UTF_8_Lines); + +private + function UTF_8_Length (Buffer : Root_Buffer_Type'Class) return Natural + is (Buffer.UTF_8_Length); +end Ada.Strings.Text_Buffers.Utils; diff --git a/gcc/ada/libgnat/a-stmaco.ads b/gcc/ada/libgnat/a-stmaco.ads index 8493bb3..4d280ec 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-stobfi.adb b/gcc/ada/libgnat/a-stobfi.adb deleted file mode 100644 index dd485ba..0000000 --- a/gcc/ada/libgnat/a-stobfi.adb +++ /dev/null @@ -1,118 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- ADA.STRINGS.TEXT_OUTPUT.BASIC_FILES -- --- -- --- B o d y -- --- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- --- -- --- GNAT is 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. -- --- -- ------------------------------------------------------------------------------- - -with Ada.Strings.Text_Output.Utils; use Ada.Strings.Text_Output.Utils; -package body Ada.Strings.Text_Output.Basic_Files is - use type OS.File_Descriptor; - - function Create_From_FD - (FD : OS.File_Descriptor; - Indent_Amount : Natural; - Chunk_Length : Positive) return File; - -- Create a file from an OS file descriptor - - function Create_From_FD - (FD : OS.File_Descriptor; - Indent_Amount : Natural; - Chunk_Length : Positive) return File - is - begin - if FD = OS.Invalid_FD then - raise Program_Error with OS.Errno_Message; - end if; - return Result : File (Chunk_Length) do - Result.Indent_Amount := Indent_Amount; - Result.Cur_Chunk := Result.Initial_Chunk'Unchecked_Access; - Result.FD := FD; - end return; - end Create_From_FD; - - function Create_File - (Name : String; - Indent_Amount : Natural := Default_Indent_Amount; - Chunk_Length : Positive := Default_Chunk_Length) return File - is - begin - return Create_From_FD - (OS.Create_File (Name, Fmode => OS.Text), - Indent_Amount, Chunk_Length); - end Create_File; - - function Create_New_File - (Name : String; - Indent_Amount : Natural := Default_Indent_Amount; - Chunk_Length : Positive := Default_Chunk_Length) return File - is - begin - return Create_From_FD - (OS.Create_New_File (Name, Fmode => OS.Text), - Indent_Amount, Chunk_Length); - end Create_New_File; - - procedure Close (S : in out File'Class) is - Status : Boolean; - begin - Flush (S); - - if S.FD not in OS.Standout | OS.Standerr then -- Don't close these - OS.Close (S.FD, Status); - if not Status then - raise Program_Error with OS.Errno_Message; - end if; - end if; - end Close; - - overriding procedure Full_Method (S : in out File) renames Flush_Method; - - overriding procedure Flush_Method (S : in out File) is - pragma Assert (S.Cur_Chunk = S.Initial_Chunk'Unchecked_Access); - Res : constant Integer := - OS.Write (S.FD, S.Cur_Chunk.Chars'Address, S.Last); - begin - if Res /= S.Last then - raise Program_Error with OS.Errno_Message; - end if; - S.Last := 0; - end Flush_Method; - - The_Stdout : aliased File := - Create_From_FD (OS.Standout, - Indent_Amount => Default_Indent_Amount, - Chunk_Length => Default_Chunk_Length); - The_Stderr : aliased File := - Create_From_FD (OS.Standerr, - Indent_Amount => Default_Indent_Amount, - Chunk_Length => Default_Chunk_Length); - - function Standard_Output return Sink_Access is (The_Stdout'Access); - function Standard_Error return Sink_Access is (The_Stderr'Access); - -end Ada.Strings.Text_Output.Basic_Files; diff --git a/gcc/ada/libgnat/a-storio.adb b/gcc/ada/libgnat/a-storio.adb index 5c68082..424526d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stoubu.adb b/gcc/ada/libgnat/a-stoubu.adb deleted file mode 100644 index 663d4ba..0000000 --- a/gcc/ada/libgnat/a-stoubu.adb +++ /dev/null @@ -1,148 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- ADA.STRINGS.TEXT_OUTPUT.BUFFERS -- --- -- --- B o d y -- --- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- --- -- --- GNAT is 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. -- --- -- ------------------------------------------------------------------------------- - -with Unchecked_Deallocation; -with Ada.Strings.UTF_Encoding.Strings; -with Ada.Strings.UTF_Encoding.Wide_Strings; -with Ada.Strings.UTF_Encoding.Wide_Wide_Strings; -package body Ada.Strings.Text_Output.Buffers is - - type Chunk_Access is access all Chunk; - - function New_Buffer - (Indent_Amount : Natural := Default_Indent_Amount; - Chunk_Length : Positive := Default_Chunk_Length) return Buffer - is - begin - return Result : Buffer (Chunk_Length) do - Result.Indent_Amount := Indent_Amount; - Result.Cur_Chunk := Result.Initial_Chunk'Unchecked_Access; - end return; - end New_Buffer; - - -- We need type conversions of Chunk_Access values in the following two - -- procedures, because the one in Text_Output has Storage_Size => 0, - -- because Text_Output is Pure. We do not run afoul of 13.11.2(16/3), - -- which requires the allocation and deallocation to have the same pool, - -- because the allocation in Full_Method and the deallocation in Destroy - -- use the same access type, and therefore the same pool. - - procedure Destroy (S : in out Buffer) is - procedure Free is new Unchecked_Deallocation (Chunk, Chunk_Access); - Cur : Chunk_Access := Chunk_Access (S.Initial_Chunk.Next); - begin - while Cur /= null loop - declare - Temp : constant Chunk_Access := Chunk_Access (Cur.Next); - begin - Free (Cur); - Cur := Temp; - end; - end loop; - - S.Cur_Chunk := null; - end Destroy; - - overriding procedure Full_Method (S : in out Buffer) is - begin - pragma Assert (S.Cur_Chunk.Next = null); - pragma Assert (S.Last = S.Cur_Chunk.Chars'Length); - S.Cur_Chunk.Next := - Text_Output.Chunk_Access (Chunk_Access'(new Chunk (S.Chunk_Length))); - S.Cur_Chunk := S.Cur_Chunk.Next; - S.Num_Extra_Chunks := @ + 1; - S.Last := 0; - end Full_Method; - - function UTF_8_Length (S : Buffer'Class) return Natural is - begin - return S.Num_Extra_Chunks * S.Chunk_Length + S.Last; - end UTF_8_Length; - - procedure Get_UTF_8 - (S : Buffer'Class; Result : out UTF_8_Lines) - is - Cur : access constant Chunk := S.Initial_Chunk'Access; - First : Positive := 1; - begin - loop - if Cur.Next = null then - pragma Assert (Result'Last = First + S.Last - 1); - Result (First .. Result'Last) := Cur.Chars (1 .. S.Last); - exit; - end if; - - pragma Assert (S.Chunk_Length = Cur.Chars'Length); - Result (First .. First + S.Chunk_Length - 1) := Cur.Chars; - First := First + S.Chunk_Length; - Cur := Cur.Next; - end loop; - end Get_UTF_8; - - function Get_UTF_8 (S : Buffer'Class) return UTF_8_Lines is - begin - return Result : String (1 .. UTF_8_Length (S)) do - Get_UTF_8 (S, Result); - end return; - end Get_UTF_8; - - function Get (S : Buffer'Class) return String is - begin - -- If all characters are 7 bits, we don't need to decode; - -- this is an optimization. - - -- Otherwise, if all are 8 bits, we need to decode to get Latin-1. - -- Otherwise, the result is implementation defined, so we return a - -- String encoded as UTF-8. (Note that the AI says "if any character - -- in the sequence is not defined in Character, the result is - -- implementation-defined", so we are not obliged to decode ANY - -- Latin-1 characters if ANY character is bigger than 8 bits. - - if S.All_7_Bits then - return Get_UTF_8 (S); - elsif S.All_8_Bits then - return UTF_Encoding.Strings.Decode (Get_UTF_8 (S)); - else - return Get_UTF_8 (S); - end if; - end Get; - - function Wide_Get (S : Buffer'Class) return Wide_String is - begin - return UTF_Encoding.Wide_Strings.Decode (Get_UTF_8 (S)); - end Wide_Get; - - function Wide_Wide_Get (S : Buffer'Class) return Wide_Wide_String is - begin - return UTF_Encoding.Wide_Wide_Strings.Decode (Get_UTF_8 (S)); - end Wide_Wide_Get; - -end Ada.Strings.Text_Output.Buffers; diff --git a/gcc/ada/libgnat/a-stoufi.adb b/gcc/ada/libgnat/a-stoufi.adb deleted file mode 100644 index 34086bb..0000000 --- a/gcc/ada/libgnat/a-stoufi.adb +++ /dev/null @@ -1,123 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- ADA.STRINGS.TEXT_OUTPUT.FILES -- --- -- --- B o d y -- --- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- --- -- --- GNAT is 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. -- --- -- ------------------------------------------------------------------------------- - -with Ada.Strings.Text_Output.Utils; use Ada.Strings.Text_Output.Utils; -package body Ada.Strings.Text_Output.Files is - use type OS.File_Descriptor; - - function Create_From_FD - (FD : OS.File_Descriptor; - Indent_Amount : Natural; - Chunk_Length : Positive) return File; - -- Create a file from an OS file descriptor - - function Create_From_FD - (FD : OS.File_Descriptor; - Indent_Amount : Natural; - Chunk_Length : Positive) return File - is - begin - if FD = OS.Invalid_FD then - raise Program_Error with OS.Errno_Message; - end if; - return Result : File (Chunk_Length) do - Result.Indent_Amount := Indent_Amount; - Result.Cur_Chunk := Result.Initial_Chunk'Unchecked_Access; - Result.FD := FD; - end return; - end Create_From_FD; - - function Create_File - (Name : String; - Indent_Amount : Natural := Default_Indent_Amount; - Chunk_Length : Positive := Default_Chunk_Length) return File - is - begin - return Create_From_FD - (OS.Create_File (Name, Fmode => OS.Text), - Indent_Amount, Chunk_Length); - end Create_File; - - function Create_New_File - (Name : String; - Indent_Amount : Natural := Default_Indent_Amount; - Chunk_Length : Positive := Default_Chunk_Length) return File - is - begin - return Create_From_FD - (OS.Create_New_File (Name, Fmode => OS.Text), - Indent_Amount, Chunk_Length); - end Create_New_File; - - overriding procedure Finalize (Ref : in out Self_Ref) is - begin - Close (Ref.Self.all); - end Finalize; - - procedure Close (S : in out File'Class) is - Status : Boolean; - begin - Flush (S); - - if S.FD not in OS.Standout | OS.Standerr then -- Don't close these - OS.Close (S.FD, Status); - if not Status then - raise Program_Error with OS.Errno_Message; - end if; - end if; - end Close; - - overriding procedure Full_Method (S : in out File) renames Flush_Method; - - overriding procedure Flush_Method (S : in out File) is - pragma Assert (S.Cur_Chunk = S.Initial_Chunk'Unchecked_Access); - Res : constant Integer := - OS.Write (S.FD, S.Cur_Chunk.Chars'Address, S.Last); - begin - if Res /= S.Last then - raise Program_Error with OS.Errno_Message; - end if; - S.Last := 0; - end Flush_Method; - - The_Stdout : aliased File := - Create_From_FD (OS.Standout, - Indent_Amount => Default_Indent_Amount, - Chunk_Length => Default_Chunk_Length); - The_Stderr : aliased File := - Create_From_FD (OS.Standerr, - Indent_Amount => Default_Indent_Amount, - Chunk_Length => Default_Chunk_Length); - - function Standard_Output return Sink_Access is (The_Stdout'Access); - function Standard_Error return Sink_Access is (The_Stderr'Access); - -end Ada.Strings.Text_Output.Files; diff --git a/gcc/ada/libgnat/a-stouut.adb b/gcc/ada/libgnat/a-stouut.adb deleted file mode 100644 index 2011408..0000000 --- a/gcc/ada/libgnat/a-stouut.adb +++ /dev/null @@ -1,272 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- ADA.STRINGS.TEXT_OUTPUT.UTILS -- --- -- --- B o d y -- --- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- --- -- --- GNAT is 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. -- --- -- ------------------------------------------------------------------------------- - -with Ada.Strings.UTF_Encoding.Wide_Wide_Strings; - -package body Ada.Strings.Text_Output.Utils is - - procedure Put_Octet (S : in out Sink'Class; Item : Character) with Inline; - -- Send a single octet to the current Chunk - - procedure Adjust_Column (S : in out Sink'Class) with Inline; - -- Adjust the column for a non-NL character. - - procedure Put_UTF_8_Outline (S : in out Sink'Class; Item : UTF_8); - -- Out-of-line portion of Put_UTF_8. This exists solely to make Put_UTF_8 - -- small enough to reasonably inline it. - - procedure Full (S : in out Sink'Class) is - begin - pragma Assert (S.Last = S.Chunk_Length); - Full_Method (S); - pragma Assert (S.Last = 0); - end Full; - - procedure Flush (S : in out Sink'Class) is - begin - Flush_Method (S); - end Flush; - - procedure Put_Octet (S : in out Sink'Class; Item : Character) is - begin - S.Last := @ + 1; - S.Cur_Chunk.Chars (S.Last) := Item; - pragma Assert (S.Chunk_Length = S.Cur_Chunk.Chars'Length); - if S.Last = S.Chunk_Length then - Full (S); - end if; - end Put_Octet; - - procedure Adjust_Column (S : in out Sink'Class) is - begin - -- If we're in the first column, indent. This is handled here, rather - -- than when we see NL, because we don't want spaces in a blank line. - -- The character we're about to put is not NL; NL is handled in - -- New_Line. So after indenting, we simply increment the Column. - - if S.Column = 1 then - Tab_To_Column (S, S.Indentation + 1); - end if; - S.Column := @ + 1; - end Adjust_Column; - - procedure Put_7bit (S : in out Sink'Class; Item : Character_7) is - begin - Adjust_Column (S); - Put_Octet (S, Item); - end Put_7bit; - - procedure Put_7bit_NL (S : in out Sink'Class; Item : Character_7) is - begin - if Item = NL then - New_Line (S); - else - Put_7bit (S, Item); - end if; - end Put_7bit_NL; - - procedure Put_Character (S : in out Sink'Class; Item : Character) is - begin - if Character'Pos (Item) < 2**7 then - Put_7bit_NL (S, Item); - else - Put_Wide_Wide_Character (S, To_Wide_Wide (Item)); - end if; - end Put_Character; - - procedure Put_Wide_Character - (S : in out Sink'Class; Item : Wide_Character) is - begin - if Wide_Character'Pos (Item) < 2**7 then - Put_7bit_NL (S, From_Wide (Item)); - else - Put_Wide_Wide_Character (S, To_Wide_Wide (Item)); - end if; - end Put_Wide_Character; - - procedure Put_Wide_Wide_Character - (S : in out Sink'Class; Item : Wide_Wide_Character) is - begin - if Wide_Wide_Character'Pos (Item) < 2**7 then - Put_7bit_NL (S, From_Wide_Wide (Item)); - else - S.All_7_Bits := False; - if Wide_Wide_Character'Pos (Item) >= 2**8 then - S.All_8_Bits := False; - end if; - declare - Temp : constant UTF_8_Lines := - UTF_Encoding.Wide_Wide_Strings.Encode ((1 => Item)); - begin - for X of Temp loop - pragma Assert (X /= NL); - Adjust_Column (S); - Put_Octet (S, X); - end loop; - end; - end if; - end Put_Wide_Wide_Character; - - procedure Put_UTF_8_Outline (S : in out Sink'Class; Item : UTF_8) is - begin - if S.Last + Item'Length = S.Chunk_Length then - -- Item fits exactly in current chunk - - S.Cur_Chunk.Chars (S.Last + 1 .. S.Last + Item'Length) := Item; - S.Last := S.Last + Item'Length; - S.Column := S.Column + Item'Length; - Full (S); - -- ???Seems like maybe we shouldn't call Full until we have MORE - -- characters. But then we can't pass Chunk_Length => 1 to - -- Create_File to get unbuffered output. - else - -- We get here only if Item doesn't fit in the current chunk, which - -- should be fairly rare. We split Item into Left and Right, where - -- Left exactly fills the current chunk, and recurse on Left and - -- Right. Right will fit into the next chunk unless it's very long, - -- so another level of recursion will be extremely rare. - - declare - Left_Length : constant Natural := S.Chunk_Length - S.Last; - Right_First : constant Natural := Item'First + Left_Length; - Left : UTF_8 renames Item (Item'First .. Right_First - 1); - Right : UTF_8 renames Item (Right_First .. Item'Last); - pragma Assert (Left & Right = Item); - begin - Put_UTF_8 (S, Left); -- This will call Full. - Put_UTF_8 (S, Right); -- This might call Full, but probably not. - end; - end if; - end Put_UTF_8_Outline; - - procedure Put_UTF_8 (S : in out Sink'Class; Item : UTF_8) is - begin - Adjust_Column (S); - - if S.Last + Item'Length < S.Chunk_Length then - -- Item fits in current chunk - - S.Cur_Chunk.Chars (S.Last + 1 .. S.Last + Item'Length) := Item; - S.Last := S.Last + Item'Length; - S.Column := S.Column + Item'Length; - else - Put_UTF_8_Outline (S, Item); - end if; - end Put_UTF_8; - - procedure Put_UTF_8_Lines (S : in out Sink'Class; Item : UTF_8_Lines) is - Line_Start, Index : Integer := Item'First; - -- Needs to be Integer, because Item'First might be negative for empty - -- Items. - begin - while Index <= Item'Last loop - if Item (Index) = NL then - if Index > Line_Start then - Put_UTF_8 (S, Item (Line_Start .. Index - 1)); - end if; - New_Line (S); - Line_Start := Index + 1; - end if; - - Index := @ + 1; - end loop; - - if Index > Line_Start then - Put_UTF_8 (S, Item (Line_Start .. Index - 1)); - end if; - end Put_UTF_8_Lines; - - procedure Put_String (S : in out Sink'Class; Item : String) is - begin - for X of Item loop - Put_Character (S, X); - end loop; - end Put_String; - - procedure Put_Wide_String (S : in out Sink'Class; Item : Wide_String) is - begin - for X of Item loop - Put_Wide_Character (S, X); - end loop; - end Put_Wide_String; - - procedure Put_Wide_Wide_String - (S : in out Sink'Class; Item : Wide_Wide_String) is - begin - for X of Item loop - Put_Wide_Wide_Character (S, X); - end loop; - end Put_Wide_Wide_String; - - procedure New_Line (S : in out Sink'Class) is - begin - S.Column := 1; - Put_Octet (S, NL); - end New_Line; - - function Column (S : Sink'Class) return Positive is (S.Column); - - procedure Tab_To_Column (S : in out Sink'Class; Column : Positive) is - begin - if S.Column < Column then - for X in 1 .. Column - S.Column loop - Put_Octet (S, ' '); - end loop; - S.Column := Column; - end if; - end Tab_To_Column; - - procedure Set_Indentation (S : in out Sink'Class; Amount : Natural) is - begin - S.Indentation := Amount; - end Set_Indentation; - - function Indentation (S : Sink'Class) return Natural is (S.Indentation); - - procedure Indent - (S : in out Sink'Class; Amount : Optional_Indentation := Default) - is - By : constant Natural := - (if Amount = Default then S.Indent_Amount else Amount); - begin - Set_Indentation (S, Indentation (S) + By); - end Indent; - - procedure Outdent - (S : in out Sink'Class; Amount : Optional_Indentation := Default) - is - By : constant Natural := - (if Amount = Default then S.Indent_Amount else Amount); - begin - Set_Indentation (S, Indentation (S) - By); - end Outdent; - -end Ada.Strings.Text_Output.Utils; diff --git a/gcc/ada/libgnat/a-stouut.ads b/gcc/ada/libgnat/a-stouut.ads deleted file mode 100644 index 5056080..0000000 --- a/gcc/ada/libgnat/a-stouut.ads +++ /dev/null @@ -1,107 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- ADA.STRINGS.TEXT_OUTPUT.UTILS -- --- -- --- S p e c -- --- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- --- -- --- GNAT is 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. -- --- -- ------------------------------------------------------------------------------- - -package Ada.Strings.Text_Output.Utils with Pure is - - -- This package provides utility functions on Sink'Class. These are - -- intended for use by Put_Image attributes, both the default versions - -- generated by the compiler, and user-defined ones. - - procedure Full (S : in out Sink'Class) with Inline; - -- Must be called when the current chunk is full. Dispatches to - -- Full_Method. - - procedure Flush (S : in out Sink'Class) with Inline; - -- Dispatches to Flush_Method - - -- Full_Method and Flush_Method should be called only via Full and Flush - - procedure Put_Character (S : in out Sink'Class; Item : Character); - procedure Put_Wide_Character (S : in out Sink'Class; Item : Wide_Character); - procedure Put_Wide_Wide_Character - (S : in out Sink'Class; Item : Wide_Wide_Character); - procedure Put_String (S : in out Sink'Class; Item : String); - procedure Put_Wide_String (S : in out Sink'Class; Item : Wide_String); - procedure Put_Wide_Wide_String - (S : in out Sink'Class; Item : Wide_Wide_String); - -- Encode characters or strings as UTF-8, and send them to S. - - subtype Character_7 is - Character range Character'Val (0) .. Character'Val (2**7 - 1); - -- 7-bit character. These are the same in both Latin-1 and UTF-8. - - procedure Put_7bit (S : in out Sink'Class; Item : Character_7) - with Inline, Pre => Item /= NL; - procedure Put_7bit_NL (S : in out Sink'Class; Item : Character_7) - with Inline; - -- Put a 7-bit character, and adjust the Column. For Put_7bit_NL, Item can - -- be NL. - - procedure Put_UTF_8 (S : in out Sink'Class; Item : UTF_8) with Inline; - procedure Put_UTF_8_Lines (S : in out Sink'Class; Item : UTF_8_Lines); - -- Send data that is already UTF-8 encoded (including 7-bit ASCII) to - -- S. These are more efficient than Put_String. - - procedure New_Line (S : in out Sink'Class) with - Inline, Post => Column (S) = 1; - -- Puts the new-line character. - - function Column (S : Sink'Class) return Positive with Inline; - -- Current output column. The Column is initially 1, and is incremented for - -- each 7-bit character output, except for the new-line character, which - -- sets Column back to 1. The next character to be output will go in this - -- column. - - procedure Tab_To_Column (S : in out Sink'Class; Column : Positive); - -- Put spaces until we're at or past Column. - - procedure Set_Indentation (S : in out Sink'Class; Amount : Natural) - with Inline; - function Indentation (S : Sink'Class) return Natural with Inline; - -- Indentation is initially 0. Set_Indentation sets it, and Indentation - -- returns it. This number of space characters are put at the start of - -- each nonempty line. - - subtype Optional_Indentation is Integer range -1 .. Natural'Last; - Default : constant Optional_Indentation := -1; - - procedure Indent - (S : in out Sink'Class; Amount : Optional_Indentation := Default) - with Inline; - procedure Outdent - (S : in out Sink'Class; Amount : Optional_Indentation := Default) - with Inline; - -- Increase/decrease Indentation by Amount. If Amount = Default, the amount - -- specified by the Indent_Amount parameter of the sink creation function - -- is used. The sink creation functions are New_Buffer, Create_File, and - -- Create_New_File. - -end Ada.Strings.Text_Output.Utils; diff --git a/gcc/ada/libgnat/a-strbou.adb b/gcc/ada/libgnat/a-strbou.adb index d48798b..61b3d73 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-strbou.ads b/gcc/ada/libgnat/a-strbou.ads index ebde112..f0cf7b2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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.adb b/gcc/ada/libgnat/a-stream.adb index 67d70c5..a7ef308 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2021, 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 9a76ee3..a88d44f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 8105f30..ee72b6b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -145,30 +145,26 @@ package body Ada.Strings.Fixed is (Left : Natural; Right : Character) return String is - Result : String (1 .. Left); - begin - for J in Result'Range loop - Result (J) := Right; - end loop; - - return Result; + return Result : String (1 .. Left) do + for J in Result'Range loop + Result (J) := Right; + end loop; + end return; end "*"; function "*" (Left : Natural; Right : String) return String is - Result : String (1 .. Left * Right'Length); Ptr : Integer := 1; - begin - for J in 1 .. Left loop - Result (Ptr .. Ptr + Right'Length - 1) := Right; - Ptr := Ptr + Right'Length; - end loop; - - return Result; + return Result : String (1 .. Left * Right'Length) do + for J in 1 .. Left loop + Result (Ptr .. Ptr + Right'Length - 1) := Right; + Ptr := Ptr + Right'Length; + end loop; + end return; end "*"; ------------ @@ -180,6 +176,7 @@ package body Ada.Strings.Fixed is From : Positive; Through : Natural) return String is + Front : Integer; begin if From > Through then declare @@ -207,18 +204,13 @@ package body Ada.Strings.Fixed is end if; else - declare - Front : constant Integer := From - Source'First; - Result : String (1 .. Source'Length - (Through - From + 1)); - - begin + Front := From - Source'First; + return Result : String (1 .. Source'Length - (Through - From + 1)) do Result (1 .. Front) := Source (Source'First .. From - 1); Result (Front + 1 .. Result'Last) := Source (Through + 1 .. Source'Last); - - return Result; - end; + end return; end if; end Delete; @@ -253,18 +245,13 @@ package body Ada.Strings.Fixed is Result_Type (Source (Source'First .. Source'First + Count - 1)); else - declare - Result : Result_Type; - - begin + return Result : Result_Type do Result (1 .. Source'Length) := Source; for J in Source'Length + 1 .. Count loop Result (J) := Pad; end loop; - - return Result; - end; + end return; end if; end Head; @@ -291,7 +278,6 @@ package body Ada.Strings.Fixed is Before : Positive; New_Item : String) return String is - Result : String (1 .. Source'Length + New_Item'Length); Front : constant Integer := Before - Source'First; begin @@ -299,14 +285,14 @@ package body Ada.Strings.Fixed is raise Index_Error; end if; - Result (1 .. Front) := - Source (Source'First .. Before - 1); - Result (Front + 1 .. Front + New_Item'Length) := - New_Item; - Result (Front + New_Item'Length + 1 .. Result'Last) := - Source (Before .. Source'Last); - - return Result; + return Result : String (1 .. Source'Length + New_Item'Length) do + Result (1 .. Front) := + Source (Source'First .. Before - 1); + Result (Front + 1 .. Front + New_Item'Length) := + New_Item; + Result (Front + New_Item'Length + 1 .. Result'Last) := + Source (Before .. Source'Last); + end return; end Insert; procedure Insert @@ -435,8 +421,7 @@ package body Ada.Strings.Fixed is function Overwrite (Source : String; Position : Positive; - New_Item : String) return String - is + New_Item : String) return String is begin if Position not in Source'First .. Source'Last + 1 then raise Index_Error; @@ -444,21 +429,17 @@ package body Ada.Strings.Fixed is declare Result_Length : constant Natural := - Integer'Max - (Source'Length, - Position - Source'First + New_Item'Length); - - Result : String (1 .. Result_Length); - Front : constant Integer := Position - Source'First; + Integer'Max (Source'Length, + Position - Source'First + New_Item'Length); + Front : constant Integer := Position - Source'First; begin - Result (1 .. Front) := - Source (Source'First .. Position - 1); - Result (Front + 1 .. Front + New_Item'Length) := - New_Item; - Result (Front + New_Item'Length + 1 .. Result'Length) := - Source (Position + New_Item'Length .. Source'Last); - return Result; + return Result : String (1 .. Result_Length) do + Result (1 .. Front) := Source (Source'First .. Position - 1); + Result (Front + 1 .. Front + New_Item'Length) := New_Item; + Result (Front + New_Item'Length + 1 .. Result'Length) := + Source (Position + New_Item'Length .. Source'Last); + end return; end; end Overwrite; @@ -495,24 +476,21 @@ package body Ada.Strings.Fixed is Integer'Max (0, Low - Source'First); -- Length of prefix of Source copied to result - Back_Len : constant Integer := - Integer'Max (0, Source'Last - High); + Back_Len : constant Integer := Integer'Max (0, Source'Last - High); -- Length of suffix of Source copied to result Result_Length : constant Integer := Front_Len + By'Length + Back_Len; -- Length of result - Result : String (1 .. Result_Length); - begin - Result (1 .. Front_Len) := Source (Source'First .. Low - 1); - Result (Front_Len + 1 .. Front_Len + By'Length) := By; - Result (Front_Len + By'Length + 1 .. Result'Length) := - Source (High + 1 .. Source'Last); - return Result; + return Result : String (1 .. Result_Length) do + Result (1 .. Front_Len) := Source (Source'First .. Low - 1); + Result (Front_Len + 1 .. Front_Len + By'Length) := By; + Result (Front_Len + By'Length + 1 .. Result'Length) := + Source (High + 1 .. Source'Last); + end return; end; - else return Insert (Source, Before => Low, New_Item => By); end if; @@ -549,17 +527,13 @@ package body Ada.Strings.Fixed is -- Pad on left else - declare - Result : Result_Type; - - begin + return Result : Result_Type do for J in 1 .. Count - Source'Length loop Result (J) := Pad; end loop; Result (Count - Source'Length + 1 .. Count) := Source; - return Result; - end; + end return; end if; end Tail; @@ -585,14 +559,12 @@ package body Ada.Strings.Fixed is (Source : String; Mapping : Maps.Character_Mapping) return String is - Result : String (1 .. Source'Length); - begin - for J in Source'Range loop - Result (J - (Source'First - 1)) := Value (Mapping, Source (J)); - end loop; - - return Result; + return Result : String (1 .. Source'Length) do + for J in Source'Range loop + Result (J - (Source'First - 1)) := Value (Mapping, Source (J)); + end loop; + end return; end Translate; procedure Translate @@ -609,15 +581,13 @@ package body Ada.Strings.Fixed is (Source : String; Mapping : Maps.Character_Mapping_Function) return String is - Result : String (1 .. Source'Length); pragma Unsuppress (Access_Check); - begin - for J in Source'Range loop - Result (J - (Source'First - 1)) := Mapping.all (Source (J)); - end loop; - - return Result; + return Result : String (1 .. Source'Length) do + for J in Source'Range loop + Result (J - (Source'First - 1)) := Mapping.all (Source (J)); + end loop; + end return; end Translate; procedure Translate diff --git a/gcc/ada/libgnat/a-strhas.adb b/gcc/ada/libgnat/a-strhas.adb index 572b766..1732941 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-strmap.adb b/gcc/ada/libgnat/a-strmap.adb index 9f6e857..8ad9f12 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-strmap.ads b/gcc/ada/libgnat/a-strmap.ads index c922f4e..c35c392 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-strsea.adb b/gcc/ada/libgnat/a-strsea.adb index b779090..d96a4c7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-strsea.ads b/gcc/ada/libgnat/a-strsea.ads index 668b2e1..623c0f4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-strsto.ads b/gcc/ada/libgnat/a-strsto.ads index ae38b2d..2c6fa7d 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2021, 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 e11df76..1e85cc2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- diff --git a/gcc/ada/libgnat/a-strsup.ads b/gcc/ada/libgnat/a-strsup.ads index 50607ae..9e568a8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- diff --git a/gcc/ada/libgnat/a-strunb.adb b/gcc/ada/libgnat/a-strunb.adb index 7d1e6dd..4727f965 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -783,7 +783,8 @@ package body Ada.Strings.Unbounded is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Unbounded_String) is + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; + V : Unbounded_String) is begin String'Put_Image (S, To_String (V)); end Put_Image; diff --git a/gcc/ada/libgnat/a-strunb.ads b/gcc/ada/libgnat/a-strunb.ads index 7de9bbc..13c7612 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 -- @@ -41,7 +41,7 @@ pragma Assertion_Policy (Pre => Ignore); with Ada.Strings.Maps; with Ada.Finalization; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; -- The language-defined package Strings.Unbounded provides a private type -- Unbounded_String and a set of operations. An object of type @@ -81,7 +81,7 @@ is -------------------------------------------------------- function To_Unbounded_String - (Source : String) return Unbounded_String + (Source : String) return Unbounded_String with Post => Length (To_Unbounded_String'Result) = Source'Length, Global => null; @@ -91,8 +91,7 @@ is (Length : Natural) return Unbounded_String with Post => - Ada.Strings.Unbounded.Length (To_Unbounded_String'Result) - = Length, + Ada.Strings.Unbounded.Length (To_Unbounded_String'Result) = Length, Global => null; -- Returns an Unbounded_String that represents an uninitialized String -- whose length is Length. @@ -524,11 +523,11 @@ is with Pre => Low - 1 <= Length (Source) - and then (if High >= Low - then Low - 1 - <= Natural'Last - By'Length - - Natural'Max (Length (Source) - High, 0) - else Length (Source) <= Natural'Last - By'Length), + and then (if High >= Low + then Low - 1 + <= Natural'Last - By'Length + - Natural'Max (Length (Source) - High, 0) + else Length (Source) <= Natural'Last - By'Length), Contract_Cases => (High >= Low => Length (Replace_Slice'Result) @@ -545,11 +544,11 @@ is with Pre => Low - 1 <= Length (Source) - and then (if High >= Low - then Low - 1 - <= Natural'Last - By'Length - - Natural'Max (Length (Source) - High, 0) - else Length (Source) <= Natural'Last - By'Length), + and then (if High >= Low + then Low - 1 + <= Natural'Last - By'Length + - Natural'Max (Length (Source) - High, 0) + else Length (Source) <= Natural'Last - By'Length), Contract_Cases => (High >= Low => Length (Source) @@ -586,7 +585,7 @@ is Pre => Position - 1 <= Length (Source) and then (if New_Item'Length /= 0 then - New_Item'Length <= Natural'Last - (Position - 1)), + New_Item'Length <= Natural'Last - (Position - 1)), Post => Length (Overwrite'Result) = Natural'Max (Length (Source), Position - 1 + New_Item'Length), @@ -600,7 +599,7 @@ is Pre => Position - 1 <= Length (Source) and then (if New_Item'Length /= 0 then - New_Item'Length <= Natural'Last - (Position - 1)), + New_Item'Length <= Natural'Last - (Position - 1)), Post => Length (Source) = Natural'Max (Length (Source)'Old, Position - 1 + New_Item'Length), @@ -748,7 +747,8 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Unbounded_String); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; + V : Unbounded_String); -- The Unbounded_String is using a buffered implementation to increase -- speed of the Append/Delete/Insert procedures. The Reference string diff --git a/gcc/ada/libgnat/a-strunb__shared.adb b/gcc/ada/libgnat/a-strunb__shared.adb index 54a2932..506b614 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -50,11 +50,13 @@ package body Ada.Strings.Unbounded is -- align the returned memory on the maximum alignment as malloc does not -- know the target alignment. - function Aligned_Max_Length (Max_Length : Natural) return Natural; + function Aligned_Max_Length + (Required_Length : Natural; + Reserved_Length : Natural) return Natural; -- Returns recommended length of the shared string which is greater or - -- equal to specified length. Calculation take in sense alignment of the - -- allocated memory segments to use memory effectively by Append/Insert/etc - -- operations. + -- equal to specified required length and desired reserved length. + -- Calculation takes into account alignment of the allocated memory + -- segments to use memory effectively by Append/Insert/etc operations. function Sum (Left : Natural; Right : Integer) return Natural with Inline; -- Returns summary of Left and Right, raise Constraint_Error on overflow @@ -63,11 +65,6 @@ package body Ada.Strings.Unbounded is -- Returns multiplication of Left and Right, raise Constraint_Error on -- overflow - function Allocate - (Length, Growth : Natural) return not null Shared_String_Access; - -- Allocates new Shared_String with at least specified Length plus optional - -- Growth. - --------- -- "&" -- --------- @@ -490,17 +487,24 @@ package body Ada.Strings.Unbounded is -- Aligned_Max_Length -- ------------------------ - function Aligned_Max_Length (Max_Length : Natural) return Natural is + function Aligned_Max_Length + (Required_Length : Natural; + Reserved_Length : Natural) return Natural + is Static_Size : constant Natural := Empty_Shared_String'Size / Standard'Storage_Unit; -- Total size of all Shared_String static components begin - if Max_Length > Natural'Last - Static_Size then + if Required_Length > Natural'Last - Static_Size - Reserved_Length then + -- Total requested length is larger than maximum possible length. + -- Use of Static_Size needed to avoid overflows in expression to + -- compute aligned length. return Natural'Last; + else return - ((Static_Size + Max_Length - 1) / Min_Mul_Alloc + 2) * Min_Mul_Alloc - - Static_Size; + ((Static_Size + Required_Length + Reserved_Length - 1) + / Min_Mul_Alloc + 2) * Min_Mul_Alloc - Static_Size; end if; end Aligned_Max_Length; @@ -509,35 +513,21 @@ package body Ada.Strings.Unbounded is -------------- function Allocate - (Max_Length : Natural) return not null Shared_String_Access + (Required_Length : Natural; + Reserved_Length : Natural := 0) return not null Shared_String_Access is begin -- Empty string requested, return shared empty string - if Max_Length = 0 then + if Required_Length = 0 then return Empty_Shared_String'Access; -- Otherwise, allocate requested space (and probably some more room) else - return new Shared_String (Aligned_Max_Length (Max_Length)); - end if; - end Allocate; - - -------------- - -- Allocate -- - -------------- - - function Allocate - (Length, Growth : Natural) return not null Shared_String_Access is - begin - if Natural'Last - Growth < Length then - -- Then Length + Growth would be more than Natural'Last - - return new Shared_String (Integer'Last); - - else - return Allocate (Length + Growth); + return + new Shared_String + (Aligned_Max_Length (Required_Length, Reserved_Length)); end if; end Allocate; @@ -657,7 +647,7 @@ package body Ada.Strings.Unbounded is System.Atomic_Counters.Is_One (Item.Counter) and then Item.Max_Length >= Length and then Item.Max_Length <= - Aligned_Max_Length (Length + Length / Growth_Factor); + Aligned_Max_Length (Length, Length / Growth_Factor); end Can_Be_Reused; ----------- @@ -1301,7 +1291,8 @@ package body Ada.Strings.Unbounded is --------------- procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Unbounded_String) is + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; + V : Unbounded_String) is begin String'Put_Image (S, To_String (V)); end Put_Image; diff --git a/gcc/ada/libgnat/a-strunb__shared.ads b/gcc/ada/libgnat/a-strunb__shared.ads index 2cd8166..2091bde 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 -- @@ -78,7 +78,7 @@ pragma Assertion_Policy (Pre => Ignore); with Ada.Strings.Maps; private with Ada.Finalization; private with System.Atomic_Counters; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; package Ada.Strings.Unbounded with Initial_Condition => Length (Null_Unbounded_String) = 0 @@ -363,9 +363,8 @@ is Going : Direction := Forward; Mapping : Maps.Character_Mapping := Maps.Identity) return Natural with - Pre => (if Length (Source) /= 0 - then From <= Length (Source)) - and then Pattern'Length /= 0, + Pre => (if Length (Source) /= 0 then From <= Length (Source)) + and then Pattern'Length /= 0, Global => null; pragma Ada_05 (Index); @@ -376,11 +375,9 @@ is Going : Direction := Forward; Mapping : Maps.Character_Mapping_Function) return Natural with - Pre => (if Length (Source) /= 0 - then From <= Length (Source)) - and then Pattern'Length /= 0, + Pre => (if Length (Source) /= 0 then From <= Length (Source)) + and then Pattern'Length /= 0, Global => null; - pragma Ada_05 (Index); function Index @@ -725,10 +722,12 @@ private -- store string with specified length effectively. function Allocate - (Max_Length : Natural) return not null Shared_String_Access; - -- Allocates new Shared_String with at least specified maximum length. - -- Actual maximum length of the allocated Shared_String can be slightly - -- greater. Returns reference to Empty_Shared_String when requested length + (Required_Length : Natural; + Reserved_Length : Natural := 0) return not null Shared_String_Access; + -- Allocates new Shared_String. Actual maximum length of allocated object + -- is at least the specified required length. Additional storage is + -- allocated to allow to store up to the specified reserved length when + -- possible. Returns reference to Empty_Shared_String when requested length -- is zero. Empty_Shared_String : aliased Shared_String (0); @@ -742,7 +741,8 @@ private end record with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : Unbounded_String); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; + V : Unbounded_String); pragma Stream_Convert (Unbounded_String, To_Unbounded, To_String); -- Provide stream routines without dragging in Ada.Streams diff --git a/gcc/ada/libgnat/a-ststbo.adb b/gcc/ada/libgnat/a-ststbo.adb index 16c6d00..59dec1c 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/a-ststbo.ads b/gcc/ada/libgnat/a-ststbo.ads index fe41c2c..0cece80 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2021, 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 5ed5e00..176dabf 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ststio.ads b/gcc/ada/libgnat/a-ststio.ads index 71482a4..22f37f9 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 cf3a250..9b4cc61 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/a-ststun.ads b/gcc/ada/libgnat/a-ststun.ads index 2945bca..3d00e7f 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-2021, 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 new file mode 100644 index 0000000..bc0c6ce --- /dev/null +++ b/gcc/ada/libgnat/a-sttebu.adb @@ -0,0 +1,121 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- ADA.STRINGS.TEXT_BUFFERS -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 2020-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. -- +-- -- +------------------------------------------------------------------------------ + +with Ada.Strings.UTF_Encoding.Wide_Strings; +with Ada.Strings.UTF_Encoding.Wide_Wide_Strings; + +package body Ada.Strings.Text_Buffers is + function Current_Indent + (Buffer : Root_Buffer_Type) return Text_Buffer_Count is + (Text_Buffer_Count (Buffer.Indentation)); + + procedure Increase_Indent + (Buffer : in out Root_Buffer_Type; + Amount : Text_Buffer_Count := Standard_Indent) + is + begin + Buffer.Indentation := @ + Natural (Amount); + end Increase_Indent; + + procedure Decrease_Indent + (Buffer : in out Root_Buffer_Type; + Amount : Text_Buffer_Count := Standard_Indent) + is + begin + Buffer.Indentation := @ - Natural (Amount); + end Decrease_Indent; + + package body Output_Mapping is + -- Implement indentation in Put_UTF_8 and New_Line. + -- Implement other output procedures using Put_UTF_8. + + procedure Put (Buffer : in out Buffer_Type; Item : String) is + begin + Put_UTF_8 (Buffer, Item); + end Put; + + procedure Wide_Put (Buffer : in out Buffer_Type; Item : Wide_String) is + begin + Buffer.All_8_Bits := + @ and then + (for all WChar of Item => Wide_Character'Pos (WChar) < 256); + + Put_UTF_8 (Buffer, UTF_Encoding.Wide_Strings.Encode (Item)); + end Wide_Put; + + procedure Wide_Wide_Put + (Buffer : in out Buffer_Type; Item : Wide_Wide_String) + is + begin + Buffer.All_8_Bits := + @ and then + (for all WWChar of Item => Wide_Wide_Character'Pos (WWChar) < 256); + + Put_UTF_8 (Buffer, UTF_Encoding.Wide_Wide_Strings.Encode (Item)); + end Wide_Wide_Put; + + procedure Put_UTF_8 + (Buffer : in out Buffer_Type; + Item : UTF_Encoding.UTF_8_String) is + begin + if Item'Length = 0 then + return; + end if; + + if Buffer.Indent_Pending then + Buffer.Indent_Pending := False; + if Buffer.Indentation > 0 then + Put_UTF_8_Implementation + (Buffer, (1 .. Buffer.Indentation => ' ')); + end if; + end if; + + Put_UTF_8_Implementation (Buffer, Item); + end Put_UTF_8; + + procedure Wide_Put_UTF_16 + (Buffer : in out Buffer_Type; Item : UTF_Encoding.UTF_16_Wide_String) + is + begin + Wide_Wide_Put (Buffer, UTF_Encoding.Wide_Wide_Strings.Decode (Item)); + end Wide_Put_UTF_16; + + procedure New_Line (Buffer : in out Buffer_Type) is + begin + Buffer.Indent_Pending := False; -- just for a moment + Put (Buffer, (1 => ASCII.LF)); + Buffer.Indent_Pending := True; + Buffer.UTF_8_Column := 1; + end New_Line; + + end Output_Mapping; + +end Ada.Strings.Text_Buffers; diff --git a/gcc/ada/libgnat/a-sttebu.ads b/gcc/ada/libgnat/a-sttebu.ads new file mode 100644 index 0000000..39144a6 --- /dev/null +++ b/gcc/ada/libgnat/a-sttebu.ads @@ -0,0 +1,136 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- ADA.STRINGS.TEXT_BUFFERS -- +-- -- +-- S p e c -- +-- -- +-- This specification is derived from the Ada Reference Manual for use with -- +-- GNAT. In accordance with the copyright of that document, you can freely -- +-- copy and modify this specification, provided that if you redistribute a -- +-- modified version, any changes that you have made are clearly indicated. -- +-- -- +------------------------------------------------------------------------------ + +with Ada.Strings.UTF_Encoding; +package Ada.Strings.Text_Buffers with + Pure +is + + type Text_Buffer_Count is range 0 .. Integer'Last; + + New_Line_Count : constant Text_Buffer_Count := 1; + -- There is no support for two-character CR/LF line endings. + + type Root_Buffer_Type is abstract tagged limited private with + Default_Initial_Condition => Current_Indent (Root_Buffer_Type) = 0; + + procedure Put (Buffer : in out Root_Buffer_Type; Item : String) is abstract; + + procedure Wide_Put + (Buffer : in out Root_Buffer_Type; Item : Wide_String) is abstract; + + procedure Wide_Wide_Put + (Buffer : in out Root_Buffer_Type; Item : Wide_Wide_String) is abstract; + + procedure Put_UTF_8 + (Buffer : in out Root_Buffer_Type; + Item : UTF_Encoding.UTF_8_String) is abstract; + + procedure Wide_Put_UTF_16 + (Buffer : in out Root_Buffer_Type; + Item : UTF_Encoding.UTF_16_Wide_String) is abstract; + + procedure New_Line (Buffer : in out Root_Buffer_Type) is abstract; + + Standard_Indent : constant Text_Buffer_Count := 3; + + function Current_Indent + (Buffer : Root_Buffer_Type) return Text_Buffer_Count; + + procedure Increase_Indent + (Buffer : in out Root_Buffer_Type; + Amount : Text_Buffer_Count := Standard_Indent) with + Post'Class => Current_Indent (Buffer) = + Current_Indent (Buffer)'Old + Amount; + + procedure Decrease_Indent + (Buffer : in out Root_Buffer_Type; + Amount : Text_Buffer_Count := Standard_Indent) with + Pre'Class => Current_Indent (Buffer) >= Amount + -- or else raise Constraint_Error, + or else Boolean'Val (Current_Indent (Buffer) - Amount), + Post'Class => Current_Indent (Buffer) = + Current_Indent (Buffer)'Old - Amount; + +private + + type Root_Buffer_Type is abstract tagged limited record + Indentation : Natural := 0; + -- Current indentation + + Indent_Pending : Boolean := True; + -- Set by calls to New_Line, cleared when indentation emitted. + + UTF_8_Length : Natural := 0; + -- Count of UTF_8 characters in the buffer + + UTF_8_Column : Positive := 1; + -- Column in which next character will be written. + -- Calling New_Line resets to 1. + + All_7_Bits : Boolean := True; + -- True if all characters seen so far fit in 7 bits + All_8_Bits : Boolean := True; + -- True if all characters seen so far fit in 8 bits + + end record; + + generic + -- This generic allows a client to extend Root_Buffer_Type without + -- having to implement any of the abstract subprograms other than + -- Put_UTF_8 (i.e., Put, Wide_Put, Wide_Wide_Put, Wide_Put_UTF_16, + -- and New_Line). Without this generic, each client would have to + -- duplicate the implementations of those 5 subprograms. + -- This generic also takes care of handling indentation, thereby + -- avoiding further code duplication. The name "Output_Mapping" isn't + -- wonderful, but it refers to the idea that this package knows how + -- to implement all the other output operations in terms of + -- just Put_UTF_8. + -- + -- The classwide parameter type here is somewhat tricky; + -- there are no dispatching calls associated with this parameter. + -- It would be more accurate to say that the parameter is of type + -- Output_Mapping.Buffer_Type'Class, but that type hasn't been declared + -- yet. Instantiators will typically declare a non-abstract extension, + -- B2, of the buffer type, B1, declared in their instantiation. The + -- actual Put_UTF_8_Implementation parameter may then have a + -- precondition "Buffer in B2'Class" and that subprogram can safely + -- access components declared as part of the declaration of B2. + + with procedure Put_UTF_8_Implementation + (Buffer : in out Root_Buffer_Type'Class; + Item : UTF_Encoding.UTF_8_String); + package Output_Mapping is + type Buffer_Type is abstract new Root_Buffer_Type with null record; + + overriding procedure Put (Buffer : in out Buffer_Type; Item : String); + + overriding procedure Wide_Put + (Buffer : in out Buffer_Type; Item : Wide_String); + + overriding procedure Wide_Wide_Put + (Buffer : in out Buffer_Type; Item : Wide_Wide_String); + + overriding procedure Put_UTF_8 + (Buffer : in out Buffer_Type; + Item : UTF_Encoding.UTF_8_String); + + overriding procedure Wide_Put_UTF_16 + (Buffer : in out Buffer_Type; Item : UTF_Encoding.UTF_16_Wide_String); + + overriding procedure New_Line (Buffer : in out Buffer_Type); + end Output_Mapping; + +end Ada.Strings.Text_Buffers; diff --git a/gcc/ada/libgnat/a-stteou.ads b/gcc/ada/libgnat/a-stteou.ads deleted file mode 100644 index 9eaf98a..0000000 --- a/gcc/ada/libgnat/a-stteou.ads +++ /dev/null @@ -1,193 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- ADA.STRINGS.TEXT_OUTPUT -- --- -- --- S p e c -- --- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- --- -- --- GNAT is 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. -- --- -- ------------------------------------------------------------------------------- - -with Ada.Strings.UTF_Encoding; -with Ada.Strings.UTF_Encoding.Wide_Wide_Strings; - -package Ada.Strings.Text_Output with Pure is - - -- This package provides a "Sink" abstraction, to which characters of type - -- Character, Wide_Character, and Wide_Wide_Character can be sent. This - -- type is used by the Put_Image attribute. In particular, T'Put_Image has - -- the following parameter types: - -- - -- procedure T'Put_Image (S : in out Sink'Class; V : T); - -- - -- The default generated code for Put_Image of a composite type will - -- typically call Put_Image on the components. - -- - -- This is not a fully general abstraction that can be arbitrarily - -- extended. It is designed with particular extensions in mind, and these - -- extensions are declared in child packages of this package, because they - -- depend on implementation details in the private part of this - -- package. - -- - -- Users are not expected to extend type Sink. - -- - -- The primary extensions of Sink are: - -- - -- Buffer. The characters sent to a Buffer are stored in memory, and can - -- be retrieved via Get functions. This is intended for the - -- implementation of the 'Image attribute. The compiler will generate a - -- T'Image function that declares a local Buffer, sends characters to - -- it, and then returns a call to Get, Destroying the Buffer on return. - -- - -- function T'Image (V : T) return String is - -- Buf : Buffer := New_Buffer (...); - -- begin - -- T'Put_Image (Buf, V); - -- return Result : constant String := Get (Buf) do - -- Destroy (Buf); - -- end return; - -- end T'Image; - -- ????Perhaps Buffer should be controlled; if you don't like - -- controlled types, call Put_Image directly. - -- - -- File. The characters are sent to a file, possibly opened by file - -- name, or possibly standard output or standard error. 'Put_Image - -- can be called directly on a File, thus avoiding any heap allocation. - - type Sink (<>) is abstract tagged limited private; - type Sink_Access is access all Sink'Class with Storage_Size => 0; - -- Sink is a character sink; you can send characters to a Sink. - -- UTF-8 encoding is used. - - procedure Full_Method (S : in out Sink) is abstract; - procedure Flush_Method (S : in out Sink) is abstract; - -- There is an internal buffer to store the characters. Full_Method is - -- called when the buffer is full, and Flush_Method may be called to flush - -- the buffer. For Buffer, Full_Method allocates more space for more - -- characters, and Flush_Method does nothing. For File, Full_Method and - -- Flush_Method do the same thing: write the characters to the file, and - -- empty the internal buffer. - -- - -- These are the only dispatching subprograms on Sink. This is for - -- efficiency; we don't dispatch on every write to the Sink, but only when - -- the internal buffer is full (or upon client request). - -- - -- Full_Method and Flush_Method must make the current chunk empty. - -- - -- Additional operations operating on Sink'Class are declared in the Utils - -- child, including Full and Flush, which call the above. - - function To_Wide (C : Character) return Wide_Character is - (Wide_Character'Val (Character'Pos (C))); - function To_Wide_Wide (C : Character) return Wide_Wide_Character is - (Wide_Wide_Character'Val (Character'Pos (C))); - function To_Wide_Wide (C : Wide_Character) return Wide_Wide_Character is - (Wide_Wide_Character'Val (Wide_Character'Pos (C))); - -- Conversions [Wide_]Character --> [Wide_]Wide_Character. - -- These cannot fail. - - function From_Wide (C : Wide_Character) return Character is - (Character'Val (Wide_Character'Pos (C))); - function From_Wide_Wide (C : Wide_Wide_Character) return Character is - (Character'Val (Wide_Wide_Character'Pos (C))); - function From_Wide_Wide (C : Wide_Wide_Character) return Wide_Character is - (Wide_Character'Val (Wide_Wide_Character'Pos (C))); - -- Conversions [Wide_]Wide_Character --> [Wide_]Character. - -- These fail if the character is out of range. - - function NL return Character is (ASCII.LF) with Inline; - function Wide_NL return Wide_Character is (To_Wide (Character'(NL))) - with Inline; - function Wide_Wide_NL return Wide_Wide_Character is - (To_Wide_Wide (Character'(NL))) with Inline; - -- Character representing new line. There is no support for CR/LF line - -- endings. - - -- We have two subtypes of String that are encoded in UTF-8. UTF_8 cannot - -- contain newline characters; UTF_8_Lines can. Sending UTF_8 data to a - -- Sink is more efficient, because end-of-line processing is not needed. - -- Both of these are more efficient than [[Wide_]Wide_]String, because no - -- encoding is needed. - - subtype UTF_8_Lines is UTF_Encoding.UTF_8_String with - Predicate => - UTF_Encoding.Wide_Wide_Strings.Encode - (UTF_Encoding.Wide_Wide_Strings.Decode (UTF_8_Lines)) = UTF_8_Lines; - - subtype UTF_8 is UTF_8_Lines with - Predicate => (for all UTF_8_Char of UTF_8 => UTF_8_Char /= NL); - - Default_Indent_Amount : constant Natural := 4; - - Default_Chunk_Length : constant Positive := 500; - -- Experiment shows this value to be reasonably efficient; decreasing it - -- slows things down, but increasing it doesn't gain much. - -private - -- For Buffer, the "internal buffer" mentioned above is implemented as a - -- linked list of chunks. When the current chunk is full, we allocate a new - -- one. For File, there is only one chunk. When it is full, we send the - -- data to the file, and empty it. - - type Chunk; - type Chunk_Access is access all Chunk with Storage_Size => 0; - type Chunk (Length : Positive) is limited record - Next : Chunk_Access := null; - Chars : UTF_8_Lines (1 .. Length); - end record; - - type Sink (Chunk_Length : Positive) is abstract tagged limited record - Indent_Amount : Natural; - Column : Positive := 1; - Indentation : Natural := 0; - - All_7_Bits : Boolean := True; - -- For optimization of Text_Output.Buffers.Get (cf). - -- True if all characters seen so far fit in 7 bits. - -- 7-bit characters are represented the same in Character - -- and in UTF-8, so they don't need translation. - - All_8_Bits : Boolean := True; - -- True if all characters seen so far fit in 8 bits. - -- This is needed in Text_Output.Buffers.Get to distinguish - -- the case where all characters are Latin-1 (so it should - -- decode) from the case where some characters are bigger than - -- 8 bits (so the result is implementation defined). - - Cur_Chunk : Chunk_Access; - -- Points to the chunk we are currently sending characters to. - -- We want to say: - -- Cur_Chunk : Chunk_Access := Initial_Chunk'Access; - -- but that's illegal, so we have some horsing around to do. - - Last : Natural := 0; - -- Last-used character in Cur_Chunk.all. - - Initial_Chunk : aliased Chunk (Length => Chunk_Length); - -- For Buffer, this is the first chunk. Subsequent chunks are allocated - -- on the heap. For File, this is the only chunk, and there is no heap - -- allocation. - end record; - -end Ada.Strings.Text_Output; diff --git a/gcc/ada/libgnat/a-stunau.adb b/gcc/ada/libgnat/a-stunau.adb index a0e2eda..28aee55 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -52,11 +52,17 @@ package body Ada.Strings.Unbounded.Aux is -- Set_String -- ---------------- - procedure Set_String (UP : in out Unbounded_String; S : String_Access) is + procedure Set_String + (U : out Unbounded_String; + Length : Positive; + Set : not null access procedure (S : out String)) + is + Old : String_Access := U.Reference; begin - Finalize (UP); - UP.Reference := S; - UP.Last := UP.Reference'Length; + U.Last := Length; + U.Reference := new String (1 .. Length); + Set (U.Reference.all); + Free (Old); end Set_String; end Ada.Strings.Unbounded.Aux; diff --git a/gcc/ada/libgnat/a-stunau.ads b/gcc/ada/libgnat/a-stunau.ads index bac37ef..f313187 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -56,22 +56,24 @@ package Ada.Strings.Unbounded.Aux is S : out Big_String_Access; L : out Natural); pragma Inline (Get_String); - -- This procedure returns the internal string pointer used in the - -- representation of an unbounded string as well as the actual current - -- length (which may be less than S.all'Length because in general there - -- can be extra space assigned). The characters of this string may be - -- not be modified via the returned pointer, and are valid only as - -- long as the original unbounded string is not accessed or modified. + -- Return the internal string pointer used in the representation of an + -- unbounded string as well as the actual current length (which may be less + -- than S.all'Length because in general there can be extra space assigned). + -- The characters of this string may be not be modified via the returned + -- pointer, and are valid only as long as the original unbounded string is + -- not accessed or modified. -- -- This procedure is much more efficient than the use of To_String -- since it avoids the need to copy the string. The lower bound of the -- referenced string returned by this call is always one, so the actual -- string data is always accessible as S (1 .. L). - procedure Set_String (UP : in out Unbounded_String; S : String_Access); + procedure Set_String + (U : out Unbounded_String; + Length : Positive; + Set : not null access procedure (S : out String)); pragma Inline (Set_String); - -- This version of Set_Unbounded_String takes a string access value, rather - -- than a string. The lower bound of the string value is required to be - -- one, and this requirement is not checked. + -- Create an unbounded string U with the given Length, using Set to fill + -- the contents of U. end Ada.Strings.Unbounded.Aux; diff --git a/gcc/ada/libgnat/a-stunau__shared.adb b/gcc/ada/libgnat/a-stunau__shared.adb index 5f903f1..3160e14 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -51,12 +51,30 @@ package body Ada.Strings.Unbounded.Aux is -- Set_String -- ---------------- - procedure Set_String (UP : in out Unbounded_String; S : String_Access) is - X : String_Access := S; - + procedure Set_String + (U : out Unbounded_String; + Length : Positive; + Set : not null access procedure (S : out String)) + is + TR : constant Shared_String_Access := U.Reference; + DR : Shared_String_Access; begin - Set_Unbounded_String (UP, S.all); - Free (X); + -- Try to reuse existing shared string + + if Can_Be_Reused (TR, Length) then + Reference (TR); + DR := TR; + + -- Otherwise allocate new shared string + + else + DR := Allocate (Length); + U.Reference := DR; + end if; + + Set (DR.Data (1 .. Length)); + DR.Last := Length; + Unreference (TR); end Set_String; end Ada.Strings.Unbounded.Aux; diff --git a/gcc/ada/libgnat/a-stunha.adb b/gcc/ada/libgnat/a-stunha.adb index e92ad27..32f4e6d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-stuten.adb b/gcc/ada/libgnat/a-stuten.adb index d6654b2..04321a6 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- diff --git a/gcc/ada/libgnat/a-stwibo.adb b/gcc/ada/libgnat/a-stwibo.adb index 46e1b41..f045a3c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stwibo.ads b/gcc/ada/libgnat/a-stwibo.ads index ba35134..9b3d0ad 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-stwifi.adb b/gcc/ada/libgnat/a-stwifi.adb index 05e58e9..456e907 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stwiha.adb b/gcc/ada/libgnat/a-stwiha.adb index b25614a..d02b641 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-stwima.adb b/gcc/ada/libgnat/a-stwima.adb index 1cc7d67..09b192f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stwima.ads b/gcc/ada/libgnat/a-stwima.ads index 24c6bb84..fba510a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-stwise.adb b/gcc/ada/libgnat/a-stwise.adb index f93c5cb..e9ce76c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stwise.ads b/gcc/ada/libgnat/a-stwise.ads index 0573157..3d3ef63 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stwisu.adb b/gcc/ada/libgnat/a-stwisu.adb index 8c343fe..b81be14 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- diff --git a/gcc/ada/libgnat/a-stwisu.ads b/gcc/ada/libgnat/a-stwisu.ads index 387e012..9761bcc 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- diff --git a/gcc/ada/libgnat/a-stwiun.adb b/gcc/ada/libgnat/a-stwiun.adb index 912af42..269c8c9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stwiun.ads b/gcc/ada/libgnat/a-stwiun.ads index 00d5c3d..40f2796 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 b61139b1..1d0521c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -76,7 +76,7 @@ package body Ada.Strings.Wide_Unbounded is Reference (Empty_Shared_Wide_String'Access); DR := Empty_Shared_Wide_String'Access; - -- Left string is empty, return Rigth string + -- Left string is empty, return Right string elsif LR.Last = 0 then Reference (RR); diff --git a/gcc/ada/libgnat/a-stwiun__shared.ads b/gcc/ada/libgnat/a-stwiun__shared.ads index 3d29939..a88c4ec 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 60afeec..cbf3f5e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stzbou.ads b/gcc/ada/libgnat/a-stzbou.ads index f5bbcf3..d49d577 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-stzfix.adb b/gcc/ada/libgnat/a-stzfix.adb index ea97b13..55599ea 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stzhas.adb b/gcc/ada/libgnat/a-stzhas.adb index c055de6..091bdfe 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/a-stzmap.adb b/gcc/ada/libgnat/a-stzmap.adb index 2e1cd5d..b2c9ee5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stzmap.ads b/gcc/ada/libgnat/a-stzmap.ads index 9cfa5ed..14650da 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-stzsea.adb b/gcc/ada/libgnat/a-stzsea.adb index 9982b75..3d990c9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stzsea.ads b/gcc/ada/libgnat/a-stzsea.ads index bdd27d5..1eb7ad4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stzsup.adb b/gcc/ada/libgnat/a-stzsup.adb index e4558e5..92790a1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- diff --git a/gcc/ada/libgnat/a-stzsup.ads b/gcc/ada/libgnat/a-stzsup.ads index b128010..24ab18c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- diff --git a/gcc/ada/libgnat/a-stzunb.adb b/gcc/ada/libgnat/a-stzunb.adb index f32b3ed..5bd5408 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-stzunb.ads b/gcc/ada/libgnat/a-stzunb.ads index 7ee8a56..8ef5cb6 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 86bed5c..99a545e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -76,7 +76,7 @@ package body Ada.Strings.Wide_Wide_Unbounded is Reference (Empty_Shared_Wide_Wide_String'Access); DR := Empty_Shared_Wide_Wide_String'Access; - -- Left string is empty, return Rigth string + -- Left string is empty, return Right string elsif LR.Last = 0 then Reference (RR); diff --git a/gcc/ada/libgnat/a-stzunb__shared.ads b/gcc/ada/libgnat/a-stzunb__shared.ads index 5079d63..8a7fd5c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 4336538..c64dcb1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-suecin.ads b/gcc/ada/libgnat/a-suecin.ads index 6578191..7aaccb7 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 0b10a63..c135358 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- diff --git a/gcc/ada/libgnat/a-suenst.adb b/gcc/ada/libgnat/a-suenst.adb index ff730e8..8ac078c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- diff --git a/gcc/ada/libgnat/a-suewst.adb b/gcc/ada/libgnat/a-suewst.adb index 25a671a..7acabb4 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- diff --git a/gcc/ada/libgnat/a-suezst.adb b/gcc/ada/libgnat/a-suezst.adb index 951a171..389709e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- diff --git a/gcc/ada/libgnat/a-suhcin.adb b/gcc/ada/libgnat/a-suhcin.adb index 98de7a1..7af768b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-suhcin.ads b/gcc/ada/libgnat/a-suhcin.ads index 20aa236..d8d8495 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 10df730..b201ad4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-sulcin.ads b/gcc/ada/libgnat/a-sulcin.ads index 174ec4b..e77faa3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 28d8435..7c7b735 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/a-suteio.ads b/gcc/ada/libgnat/a-suteio.ads index fda5b3c..34b8016 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/a-suteio__shared.adb b/gcc/ada/libgnat/a-suteio__shared.adb index fc28aaa..6bb8e03 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/a-swbwha.adb b/gcc/ada/libgnat/a-swbwha.adb index 7ad420c..6c9a5bf 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-swmwco.ads b/gcc/ada/libgnat/a-swmwco.ads index 9e71851..0f92502 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-swunau.adb b/gcc/ada/libgnat/a-swunau.adb index e77a34c..e6e9ed9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-swunau.ads b/gcc/ada/libgnat/a-swunau.ads index a2bf6d1..de76b79 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-swunau__shared.adb b/gcc/ada/libgnat/a-swunau__shared.adb index 16ffd82..87eb9f0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-swuwha.adb b/gcc/ada/libgnat/a-swuwha.adb index 2ff28b0..9276942 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-swuwti.adb b/gcc/ada/libgnat/a-swuwti.adb index e664d3d..8149ba6 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/a-swuwti.ads b/gcc/ada/libgnat/a-swuwti.ads index 6eb9e58..0dd04c4 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/a-swuwti__shared.adb b/gcc/ada/libgnat/a-swuwti__shared.adb index 96680e2..165c97e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/a-szbzha.adb b/gcc/ada/libgnat/a-szbzha.adb index e6f6936..292e566 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-szmzco.ads b/gcc/ada/libgnat/a-szmzco.ads index eaaf116..82f0a6b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-szunau.adb b/gcc/ada/libgnat/a-szunau.adb index f9c263e..744190e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-szunau.ads b/gcc/ada/libgnat/a-szunau.ads index 2795dbe..8a8ed81 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-szunau__shared.adb b/gcc/ada/libgnat/a-szunau__shared.adb index fcd14eb..980fb8b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-szuzha.adb b/gcc/ada/libgnat/a-szuzha.adb index 00cad7c..8958154 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/a-szuzti.adb b/gcc/ada/libgnat/a-szuzti.adb index 239d319..bccaf09 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/a-szuzti.ads b/gcc/ada/libgnat/a-szuzti.ads index 0e7f1f5..53297ef 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/a-szuzti__shared.adb b/gcc/ada/libgnat/a-szuzti__shared.adb index 9f486e2..c506a3c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/a-tags.adb b/gcc/ada/libgnat/a-tags.adb index 7138f76..c6a9d25 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tags.ads b/gcc/ada/libgnat/a-tags.ads index 203f7ca..0c9afff 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 f3b0928..6f198e5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-teioed.ads b/gcc/ada/libgnat/a-teioed.ads index 273291e..110b613 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 b36d28b..717f529 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -171,15 +171,15 @@ is -- is required (RM A.10.3(23)) but it seems reasonable, and besides -- ACVC test CE3208A expects this behavior. - if File_Type (File) = Current_In then + if File = Current_In then Current_In := null; - elsif File_Type (File) = Current_Out then + elsif File = Current_Out then Current_Out := null; - elsif File_Type (File) = Current_Err then + elsif File = Current_Err then Current_Err := null; end if; - Terminate_Line (File_Type (File)); + Terminate_Line (File.all'Access); end AFCB_Close; --------------- @@ -187,10 +187,9 @@ is --------------- procedure AFCB_Free (File : not null access Text_AFCB) is - type FCB_Ptr is access all Text_AFCB; - FT : FCB_Ptr := FCB_Ptr (File); + FT : File_Type := File.all'Access; - procedure Free is new Ada.Unchecked_Deallocation (Text_AFCB, FCB_Ptr); + procedure Free is new Ada.Unchecked_Deallocation (Text_AFCB, File_Type); begin Free (FT); diff --git a/gcc/ada/libgnat/a-textio.ads b/gcc/ada/libgnat/a-textio.ads index 36a4b65..a06a35c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 -- @@ -85,9 +85,6 @@ is -- Line and page length subtype Field is Integer range 0 .. 255; - -- Note: if for any reason, there is a need to increase this value, then it - -- will be necessary to change the corresponding value in System.Img_Real - -- in file s-imgrea.adb. subtype Number_Base is Integer range 2 .. 16; @@ -718,7 +715,7 @@ private -- Returns the system-specific character indicating the end of a text file. -- This is exported for use by child packages such as Enumeration_Aux to -- eliminate their needing to depend directly on Interfaces.C_Streams, - -- which is not available in certain target environments (such as AAMP). + -- which might not be available in certain target environments. procedure Initialize_Standard_Files; -- Initializes the file control blocks for the standard files. Called from diff --git a/gcc/ada/libgnat/a-tiboio.adb b/gcc/ada/libgnat/a-tiboio.adb index e212356..340199c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/a-ticoau.adb b/gcc/ada/libgnat/a-ticoau.adb index cf94305..1fa9364 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -31,8 +31,6 @@ with Ada.Text_IO.Generic_Aux; use Ada.Text_IO.Generic_Aux; -with System.Img_Real; use System.Img_Real; - package body Ada.Text_IO.Complex_Aux is --------- @@ -171,9 +169,9 @@ package body Ada.Text_IO.Complex_Aux is -- Both parts are initially converted with a Fore of 0 Rptr := 0; - Set_Image_Real (Long_Long_Float (ItemR), R_String, Rptr, 0, Aft, Exp); + Aux.Set_Image (ItemR, R_String, Rptr, 0, Aft, Exp); Iptr := 0; - Set_Image_Real (Long_Long_Float (ItemI), I_String, Iptr, 0, Aft, Exp); + Aux.Set_Image (ItemI, I_String, Iptr, 0, Aft, Exp); -- Check room for both parts plus parens plus comma (RM G.1.3(34)) diff --git a/gcc/ada/libgnat/a-ticoau.ads b/gcc/ada/libgnat/a-ticoau.ads index 22555cf..2b5ea66 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -42,7 +42,7 @@ private generic type Num is digits <>; - with package Aux is new Ada.Text_IO.Float_Aux (Num, <>); + with package Aux is new Ada.Text_IO.Float_Aux (Num, <>, <>); package Ada.Text_IO.Complex_Aux is diff --git a/gcc/ada/libgnat/a-ticoio.adb b/gcc/ada/libgnat/a-ticoio.adb index e35a745..a94c826 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -31,6 +31,9 @@ with Ada.Text_IO.Complex_Aux; with Ada.Text_IO.Float_Aux; +with System.Img_Flt; use System.Img_Flt; +with System.Img_LFlt; use System.Img_LFlt; +with System.Img_LLF; use System.Img_LLF; with System.Val_Flt; use System.Val_Flt; with System.Val_LFlt; use System.Val_LFlt; with System.Val_LLF; use System.Val_LLF; @@ -40,22 +43,24 @@ package body Ada.Text_IO.Complex_IO is use Complex_Types; package Scalar_Float is new - Ada.Text_IO.Float_Aux (Float, Scan_Float); + Ada.Text_IO.Float_Aux (Float, Scan_Float, Set_Image_Float); package Scalar_Long_Float is new - Ada.Text_IO.Float_Aux (Long_Float, Scan_Long_Float); + Ada.Text_IO.Float_Aux + (Long_Float, Scan_Long_Float, Set_Image_Long_Float); package Scalar_Long_Long_Float is new - Ada.Text_IO.Float_Aux (Long_Long_Float, Scan_Long_Long_Float); + Ada.Text_IO.Float_Aux + (Long_Long_Float, Scan_Long_Long_Float, Set_Image_Long_Long_Float); package Aux_Float is new - Ada.Text_IO.Complex_Aux (Float, Scalar_Float); + Ada.Text_IO.Complex_Aux (Float, Scalar_Float); package Aux_Long_Float is new - Ada.Text_IO.Complex_Aux (Long_Float, Scalar_Long_Float); + Ada.Text_IO.Complex_Aux (Long_Float, Scalar_Long_Float); package Aux_Long_Long_Float is new - Ada.Text_IO.Complex_Aux (Long_Long_Float, Scalar_Long_Long_Float); + Ada.Text_IO.Complex_Aux (Long_Long_Float, Scalar_Long_Long_Float); -- Throughout this generic body, we distinguish between the case where type -- Float is OK, where type Long_Float is OK and where type Long_Long_Float diff --git a/gcc/ada/libgnat/a-ticoio.ads b/gcc/ada/libgnat/a-ticoio.ads index b0e3d8c..1463478 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 ac751c1..9be119d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tideau.ads b/gcc/ada/libgnat/a-tideau.ads index 522e351..469e7c9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tideio.adb b/gcc/ada/libgnat/a-tideio.adb index f71cf2d..5987d71 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tideio.ads b/gcc/ada/libgnat/a-tideio.ads index 83e72aa..3d9a4f2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 a8cdf9f..76c69e2 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/a-tienau.adb b/gcc/ada/libgnat/a-tienau.adb index 87dce4b..af30fef 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tienau.ads b/gcc/ada/libgnat/a-tienau.ads index 27b15c1..f1a8ea7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tienio.adb b/gcc/ada/libgnat/a-tienio.adb index adc93db..c64d713 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tifiau.adb b/gcc/ada/libgnat/a-tifiau.adb index c6f4430..baec136 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/a-tifiau.ads b/gcc/ada/libgnat/a-tifiau.ads index 32701c5..6ce8b2c 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/a-tifiio.adb b/gcc/ada/libgnat/a-tifiio.adb index 412740e..d51abb4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -158,16 +158,17 @@ with Ada.Text_IO.Fixed_Aux; with Ada.Text_IO.Float_Aux; with System.Img_Fixed_32; use System.Img_Fixed_32; with System.Img_Fixed_64; use System.Img_Fixed_64; +with System.Img_LFlt; use System.Img_LFlt; with System.Val_Fixed_32; use System.Val_Fixed_32; with System.Val_Fixed_64; use System.Val_Fixed_64; -with System.Val_LLF; use System.Val_LLF; +with System.Val_LFlt; use System.Val_LFlt; package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is -- Note: we still use the floating-point I/O routines for types whose small -- is not the ratio of two sufficiently small integers. This will result in -- inaccuracies for fixed point types that require more precision than is - -- available in Long_Long_Float. + -- available in Long_Float. subtype Int32 is Interfaces.Integer_32; use type Int32; subtype Int64 is Interfaces.Integer_64; use type Int64; @@ -178,8 +179,8 @@ package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is package Aux64 is new Ada.Text_IO.Fixed_Aux (Int64, Scan_Fixed64, Set_Image_Fixed64); - package Aux_Long_Long_Float is new - Ada.Text_IO.Float_Aux (Long_Long_Float, Scan_Long_Long_Float); + package Aux_Long_Float is new + Ada.Text_IO.Float_Aux (Long_Float, Scan_Long_Float, Set_Image_Long_Float); -- Throughout this generic body, we distinguish between the case where type -- Int32 is OK and where type Int64 is OK. These boolean constants are used @@ -283,7 +284,7 @@ package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is -Num'Small_Numerator, -Num'Small_Denominator)); else - Aux_Long_Long_Float.Get (File, Long_Long_Float (Item), Width); + Aux_Long_Float.Get (File, Long_Float (Item), Width); end if; exception @@ -317,7 +318,7 @@ package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is -Num'Small_Numerator, -Num'Small_Denominator)); else - Aux_Long_Long_Float.Gets (From, Long_Long_Float (Item), Last); + Aux_Long_Float.Gets (From, Long_Float (Item), Last); end if; exception @@ -345,8 +346,7 @@ package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is -Num'Small_Numerator, -Num'Small_Denominator, For0, Num'Aft); else - Aux_Long_Long_Float.Put - (File, Long_Long_Float (Item), Fore, Aft, Exp); + Aux_Long_Float.Put (File, Long_Float (Item), Fore, Aft, Exp); end if; end Put; @@ -376,7 +376,7 @@ package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is -Num'Small_Numerator, -Num'Small_Denominator, For0, Num'Aft); else - Aux_Long_Long_Float.Puts (To, Long_Long_Float (Item), Aft, Exp); + Aux_Long_Float.Puts (To, Long_Float (Item), Aft, Exp); end if; end Put; diff --git a/gcc/ada/libgnat/a-tifiio__128.adb b/gcc/ada/libgnat/a-tifiio__128.adb index f50e4c9..b161e89 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -159,17 +159,18 @@ with Ada.Text_IO.Float_Aux; with System.Img_Fixed_32; use System.Img_Fixed_32; with System.Img_Fixed_64; use System.Img_Fixed_64; with System.Img_Fixed_128; use System.Img_Fixed_128; +with System.Img_LFlt; use System.Img_LFlt; with System.Val_Fixed_32; use System.Val_Fixed_32; with System.Val_Fixed_64; use System.Val_Fixed_64; with System.Val_Fixed_128; use System.Val_Fixed_128; -with System.Val_LLF; use System.Val_LLF; +with System.Val_LFlt; use System.Val_LFlt; package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is -- Note: we still use the floating-point I/O routines for types whose small -- is not the ratio of two sufficiently small integers. This will result in -- inaccuracies for fixed point types that require more precision than is - -- available in Long_Long_Float. + -- available in Long_Float. subtype Int32 is Interfaces.Integer_32; use type Int32; subtype Int64 is Interfaces.Integer_64; use type Int64; @@ -184,8 +185,8 @@ package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is package Aux128 is new Ada.Text_IO.Fixed_Aux (Int128, Scan_Fixed128, Set_Image_Fixed128); - package Aux_Long_Long_Float is new - Ada.Text_IO.Float_Aux (Long_Long_Float, Scan_Long_Long_Float); + package Aux_Long_Float is new + Ada.Text_IO.Float_Aux (Long_Float, Scan_Long_Float, Set_Image_Long_Float); -- Throughout this generic body, we distinguish between the case where type -- Int32 is OK, where type Int64 is OK and where type Int128 is OK. These @@ -323,7 +324,7 @@ package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is -Num'Small_Numerator, -Num'Small_Denominator)); else - Aux_Long_Long_Float.Get (File, Long_Long_Float (Item), Width); + Aux_Long_Float.Get (File, Long_Float (Item), Width); end if; exception @@ -362,7 +363,7 @@ package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is -Num'Small_Numerator, -Num'Small_Denominator)); else - Aux_Long_Long_Float.Gets (From, Long_Long_Float (Item), Last); + Aux_Long_Float.Gets (From, Long_Float (Item), Last); end if; exception @@ -394,8 +395,7 @@ package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is -Num'Small_Numerator, -Num'Small_Denominator, For0, Num'Aft); else - Aux_Long_Long_Float.Put - (File, Long_Long_Float (Item), Fore, Aft, Exp); + Aux_Long_Float.Put (File, Long_Float (Item), Fore, Aft, Exp); end if; end Put; @@ -429,7 +429,7 @@ package body Ada.Text_IO.Fixed_IO with SPARK_Mode => Off is -Num'Small_Numerator, -Num'Small_Denominator, For0, Num'Aft); else - Aux_Long_Long_Float.Puts (To, Long_Long_Float (Item), Aft, Exp); + Aux_Long_Float.Puts (To, Long_Float (Item), Aft, Exp); end if; end Put; diff --git a/gcc/ada/libgnat/a-tiflau.adb b/gcc/ada/libgnat/a-tiflau.adb index 4955a99..fa10f3f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -31,7 +31,7 @@ with Ada.Text_IO.Generic_Aux; use Ada.Text_IO.Generic_Aux; -with System.Img_Real; use System.Img_Real; +with System.Img_Util; use System.Img_Util; package body Ada.Text_IO.Float_Aux is @@ -96,7 +96,7 @@ package body Ada.Text_IO.Float_Aux is Ptr : Natural := 0; begin - Set_Image_Real (Long_Long_Float (Item), Buf, Ptr, Fore, Aft, Exp); + Set_Image (Item, Buf, Ptr, Fore, Aft, Exp); Put_Item (File, Buf (1 .. Ptr)); end Put; @@ -114,8 +114,7 @@ package body Ada.Text_IO.Float_Aux is Ptr : Natural := 0; begin - Set_Image_Real - (Long_Long_Float (Item), Buf, Ptr, Fore => 1, Aft => Aft, Exp => Exp); + Set_Image (Item, Buf, Ptr, Fore => 1, Aft => Aft, Exp => Exp); if Ptr > To'Length then raise Layout_Error; diff --git a/gcc/ada/libgnat/a-tiflau.ads b/gcc/ada/libgnat/a-tiflau.ads index 2dfe76d..a095846 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -45,6 +45,14 @@ private generic Ptr : not null access Integer; Max : Integer) return Num; + with procedure Set_Image + (V : Num; + S : in out String; + P : in out Natural; + Fore : Natural; + Aft : Natural; + Exp : Natural); + package Ada.Text_IO.Float_Aux is procedure Get diff --git a/gcc/ada/libgnat/a-tiflio.adb b/gcc/ada/libgnat/a-tiflio.adb index db1cea2..1df3590 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -30,6 +30,9 @@ ------------------------------------------------------------------------------ with Ada.Text_IO.Float_Aux; +with System.Img_Flt; use System.Img_Flt; +with System.Img_LFlt; use System.Img_LFlt; +with System.Img_LLF; use System.Img_LLF; with System.Val_Flt; use System.Val_Flt; with System.Val_LFlt; use System.Val_LFlt; with System.Val_LLF; use System.Val_LLF; @@ -37,13 +40,15 @@ with System.Val_LLF; use System.Val_LLF; package body Ada.Text_IO.Float_IO with SPARK_Mode => Off is package Aux_Float is new - Ada.Text_IO.Float_Aux (Float, Scan_Float); + Ada.Text_IO.Float_Aux (Float, Scan_Float, Set_Image_Float); package Aux_Long_Float is new - Ada.Text_IO.Float_Aux (Long_Float, Scan_Long_Float); + Ada.Text_IO.Float_Aux + (Long_Float, Scan_Long_Float, Set_Image_Long_Float); package Aux_Long_Long_Float is new - Ada.Text_IO.Float_Aux (Long_Long_Float, Scan_Long_Long_Float); + Ada.Text_IO.Float_Aux + (Long_Long_Float, Scan_Long_Long_Float, Set_Image_Long_Long_Float); -- Throughout this generic body, we distinguish between the case where type -- Float is OK, where type Long_Float is OK and where type Long_Long_Float diff --git a/gcc/ada/libgnat/a-tiflio.ads b/gcc/ada/libgnat/a-tiflio.ads index d61b9e7..9aab165 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 5e13dae..ef86ae0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tigeau.ads b/gcc/ada/libgnat/a-tigeau.ads index d6acd8d..40753e7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tigeli.adb b/gcc/ada/libgnat/a-tigeli.adb index 3dad18b..9cd328c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tiinau.adb b/gcc/ada/libgnat/a-tiinau.adb index a0bb5c6..4aaa93d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tiinau.ads b/gcc/ada/libgnat/a-tiinau.ads index e149221..611849f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tiinio.adb b/gcc/ada/libgnat/a-tiinio.adb index 4133bec..495c652 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tiinio.ads b/gcc/ada/libgnat/a-tiinio.ads index 2998764..833136c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 e82b447..4c42818 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-timoio.adb b/gcc/ada/libgnat/a-timoio.adb index 83dbafa..3843d7b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-timoio.ads b/gcc/ada/libgnat/a-timoio.ads index aa1de6b..55c536b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2021, 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 45856e2..d475ce5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tiocst.adb b/gcc/ada/libgnat/a-tiocst.adb index aea0995..b870878 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tiocst.ads b/gcc/ada/libgnat/a-tiocst.ads index 0f4f8a5..c2a05f0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-tirsfi.adb b/gcc/ada/libgnat/a-tirsfi.adb index a5d217c..5c00c77 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/a-tirsfi.ads b/gcc/ada/libgnat/a-tirsfi.ads index e3f8caa..7aed7ba 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/a-titest.adb b/gcc/ada/libgnat/a-titest.adb index e0d13dc..db51b9e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-uncdea.ads b/gcc/ada/libgnat/a-uncdea.ads index a61cd50..439fa61 100644 --- a/gcc/ada/libgnat/a-uncdea.ads +++ b/gcc/ada/libgnat/a-uncdea.ads @@ -17,7 +17,10 @@ generic type Object (<>) is limited private; type Name is access Object; -procedure Ada.Unchecked_Deallocation (X : in out Name); +procedure Ada.Unchecked_Deallocation (X : in out Name) with + Depends => (X => null, -- X on exit does not depend on its input value + null => X), -- X's input value has no effect + Post => X = null; -- X's output value is null pragma Preelaborate (Unchecked_Deallocation); pragma Import (Intrinsic, Ada.Unchecked_Deallocation); diff --git a/gcc/ada/libgnat/a-undesu.adb b/gcc/ada/libgnat/a-undesu.adb index 8fd8a77..4728048 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wichha.adb b/gcc/ada/libgnat/a-wichha.adb index feccc23..da8e39f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- diff --git a/gcc/ada/libgnat/a-wichun.adb b/gcc/ada/libgnat/a-wichun.adb index 09cbad2..9bfb589 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-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- -- diff --git a/gcc/ada/libgnat/a-wichun.ads b/gcc/ada/libgnat/a-wichun.ads index 9e42749..27ce111 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-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- -- diff --git a/gcc/ada/libgnat/a-witeio.adb b/gcc/ada/libgnat/a-witeio.adb index 6bc3f48..7dbd3b3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -136,15 +136,15 @@ package body Ada.Wide_Text_IO is -- is required (RM A.10.3(23)) but it seems reasonable, and besides -- ACVC test CE3208A expects this behavior. - if File_Type (File) = Current_In then + if File = Current_In then Current_In := null; - elsif File_Type (File) = Current_Out then + elsif File = Current_Out then Current_Out := null; - elsif File_Type (File) = Current_Err then + elsif File = Current_Err then Current_Err := null; end if; - Terminate_Line (File_Type (File)); + Terminate_Line (File.all'Access); end AFCB_Close; --------------- @@ -152,11 +152,10 @@ package body Ada.Wide_Text_IO is --------------- procedure AFCB_Free (File : not null access Wide_Text_AFCB) is - type FCB_Ptr is access all Wide_Text_AFCB; - FT : FCB_Ptr := FCB_Ptr (File); + FT : File_Type := File.all'Access; procedure Free is - new Ada.Unchecked_Deallocation (Wide_Text_AFCB, FCB_Ptr); + new Ada.Unchecked_Deallocation (Wide_Text_AFCB, File_Type); begin Free (FT); diff --git a/gcc/ada/libgnat/a-witeio.ads b/gcc/ada/libgnat/a-witeio.ads index 9dcfda0..910154d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 -- @@ -73,9 +73,6 @@ package Ada.Wide_Text_IO is -- Line and page length subtype Field is Integer range 0 .. 255; - -- Note: if for any reason, there is a need to increase this value, then it - -- will be necessary to change the corresponding value in System.Img_Real - -- in file s-imgrea.adb. subtype Number_Base is Integer range 2 .. 16; diff --git a/gcc/ada/libgnat/a-wrstfi.adb b/gcc/ada/libgnat/a-wrstfi.adb index 95e66ba..ce8ce44 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/a-wrstfi.ads b/gcc/ada/libgnat/a-wrstfi.ads index e8bf4d1..b389bc7 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/a-wtcoau.adb b/gcc/ada/libgnat/a-wtcoau.adb index 05a6d9d..d8dd79f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -31,8 +31,6 @@ with Ada.Wide_Text_IO.Generic_Aux; use Ada.Wide_Text_IO.Generic_Aux; -with System.Img_Real; use System.Img_Real; - package body Ada.Wide_Text_IO.Complex_Aux is --------- @@ -171,9 +169,9 @@ package body Ada.Wide_Text_IO.Complex_Aux is -- Both parts are initially converted with a Fore of 0 Rptr := 0; - Set_Image_Real (Long_Long_Float (ItemR), R_String, Rptr, 0, Aft, Exp); + Aux.Set_Image (ItemR, R_String, Rptr, 0, Aft, Exp); Iptr := 0; - Set_Image_Real (Long_Long_Float (ItemI), I_String, Iptr, 0, Aft, Exp); + Aux.Set_Image (ItemI, I_String, Iptr, 0, Aft, Exp); -- Check room for both parts plus parens plus comma (RM G.1.3(34)) diff --git a/gcc/ada/libgnat/a-wtcoau.ads b/gcc/ada/libgnat/a-wtcoau.ads index affb969..5541983 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -42,7 +42,7 @@ private generic type Num is digits <>; - with package Aux is new Ada.Wide_Text_IO.Float_Aux (Num, <>); + with package Aux is new Ada.Wide_Text_IO.Float_Aux (Num, <>, <>); package Ada.Wide_Text_IO.Complex_Aux is diff --git a/gcc/ada/libgnat/a-wtcoio.adb b/gcc/ada/libgnat/a-wtcoio.adb index 8e9ff7a..fcca1bb 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -31,6 +31,9 @@ with Ada.Wide_Text_IO.Complex_Aux; with Ada.Wide_Text_IO.Float_Aux; +with System.Img_Flt; use System.Img_Flt; +with System.Img_LFlt; use System.Img_LFlt; +with System.Img_LLF; use System.Img_LLF; with System.Val_Flt; use System.Val_Flt; with System.Val_LFlt; use System.Val_LFlt; with System.Val_LLF; use System.Val_LLF; @@ -42,22 +45,24 @@ package body Ada.Wide_Text_IO.Complex_IO is use Complex_Types; package Scalar_Float is new - Ada.Wide_Text_IO.Float_Aux (Float, Scan_Float); + Ada.Wide_Text_IO.Float_Aux (Float, Scan_Float, Set_Image_Float); package Scalar_Long_Float is new - Ada.Wide_Text_IO.Float_Aux (Long_Float, Scan_Long_Float); + Ada.Wide_Text_IO.Float_Aux + (Long_Float, Scan_Long_Float, Set_Image_Long_Float); package Scalar_Long_Long_Float is new - Ada.Wide_Text_IO.Float_Aux (Long_Long_Float, Scan_Long_Long_Float); + Ada.Wide_Text_IO.Float_Aux + (Long_Long_Float, Scan_Long_Long_Float, Set_Image_Long_Long_Float); package Aux_Float is new - Ada.Wide_Text_IO.Complex_Aux (Float, Scalar_Float); + Ada.Wide_Text_IO.Complex_Aux (Float, Scalar_Float); package Aux_Long_Float is new - Ada.Wide_Text_IO.Complex_Aux (Long_Float, Scalar_Long_Float); + Ada.Wide_Text_IO.Complex_Aux (Long_Float, Scalar_Long_Float); package Aux_Long_Long_Float is new - Ada.Wide_Text_IO.Complex_Aux (Long_Long_Float, Scalar_Long_Long_Float); + Ada.Wide_Text_IO.Complex_Aux (Long_Long_Float, Scalar_Long_Long_Float); -- Throughout this generic body, we distinguish between the case where type -- Float is OK, where type Long_Float is OK and where type Long_Long_Float diff --git a/gcc/ada/libgnat/a-wtcstr.adb b/gcc/ada/libgnat/a-wtcstr.adb index c039677..acb6cc5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtcstr.ads b/gcc/ada/libgnat/a-wtcstr.ads index 414a5e9..e062d09 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtdeau.adb b/gcc/ada/libgnat/a-wtdeau.adb index 57fcc92..f1a65e0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtdeau.ads b/gcc/ada/libgnat/a-wtdeau.ads index 5c0c4d6..00fbca59 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtdeio.adb b/gcc/ada/libgnat/a-wtdeio.adb index c503a20..f8c91d1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtdeio__128.adb b/gcc/ada/libgnat/a-wtdeio__128.adb index 796c724..6a483e2 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/a-wtedit.adb b/gcc/ada/libgnat/a-wtedit.adb index e8a4b57..57ed1dd 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtedit.ads b/gcc/ada/libgnat/a-wtedit.ads index 4d74578..1736a15 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 6dcda30..8a4dde9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtenau.ads b/gcc/ada/libgnat/a-wtenau.ads index b9b7566..b26bc8a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtenio.adb b/gcc/ada/libgnat/a-wtenio.adb index f89359c..5a406f8 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtfiau.adb b/gcc/ada/libgnat/a-wtfiau.adb index 611b76d..66376b7 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/a-wtfiau.ads b/gcc/ada/libgnat/a-wtfiau.ads index f487931..e557283 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/a-wtfiio.adb b/gcc/ada/libgnat/a-wtfiio.adb index e2537ae..954ab95 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -34,9 +34,10 @@ with Ada.Wide_Text_IO.Fixed_Aux; with Ada.Wide_Text_IO.Float_Aux; with System.Img_Fixed_32; use System.Img_Fixed_32; with System.Img_Fixed_64; use System.Img_Fixed_64; +with System.Img_LFlt; use System.Img_LFlt; with System.Val_Fixed_32; use System.Val_Fixed_32; with System.Val_Fixed_64; use System.Val_Fixed_64; -with System.Val_LLF; use System.Val_LLF; +with System.Val_LFlt; use System.Val_LFlt; with System.WCh_Con; use System.WCh_Con; with System.WCh_WtS; use System.WCh_WtS; @@ -45,7 +46,7 @@ package body Ada.Wide_Text_IO.Fixed_IO is -- Note: we still use the floating-point I/O routines for types whose small -- is not the ratio of two sufficiently small integers. This will result in -- inaccuracies for fixed point types that require more precision than is - -- available in Long_Long_Float. + -- available in Long_Float. subtype Int32 is Interfaces.Integer_32; use type Int32; subtype Int64 is Interfaces.Integer_64; use type Int64; @@ -56,8 +57,9 @@ package body Ada.Wide_Text_IO.Fixed_IO is package Aux64 is new Ada.Wide_Text_IO.Fixed_Aux (Int64, Scan_Fixed64, Set_Image_Fixed64); - package Aux_Long_Long_Float is new - Ada.Wide_Text_IO.Float_Aux (Long_Long_Float, Scan_Long_Long_Float); + package Aux_Long_Float is new + Ada.Wide_Text_IO.Float_Aux + (Long_Float, Scan_Long_Float, Set_Image_Long_Float); -- Throughout this generic body, we distinguish between the case where type -- Int32 is OK and where type Int64 is OK. These boolean constants are used @@ -161,7 +163,7 @@ package body Ada.Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator)); else - Aux_Long_Long_Float.Get (File, Long_Long_Float (Item), Width); + Aux_Long_Float.Get (File, Long_Float (Item), Width); end if; exception @@ -201,7 +203,7 @@ package body Ada.Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator)); else - Aux_Long_Long_Float.Gets (S, Long_Long_Float (Item), Last); + Aux_Long_Float.Gets (S, Long_Float (Item), Last); end if; exception @@ -229,8 +231,7 @@ package body Ada.Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator, For0, Num'Aft); else - Aux_Long_Long_Float.Put - (File, Long_Long_Float (Item), Fore, Aft, Exp); + Aux_Long_Float.Put (File, Long_Float (Item), Fore, Aft, Exp); end if; end Put; @@ -262,7 +263,7 @@ package body Ada.Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator, For0, Num'Aft); else - Aux_Long_Long_Float.Puts (S, Long_Long_Float (Item), Aft, Exp); + Aux_Long_Float.Puts (S, Long_Float (Item), Aft, Exp); end if; for J in S'Range loop diff --git a/gcc/ada/libgnat/a-wtfiio__128.adb b/gcc/ada/libgnat/a-wtfiio__128.adb index a5801be..d74902e 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -35,10 +35,11 @@ with Ada.Wide_Text_IO.Float_Aux; with System.Img_Fixed_32; use System.Img_Fixed_32; with System.Img_Fixed_64; use System.Img_Fixed_64; with System.Img_Fixed_128; use System.Img_Fixed_128; +with System.Img_LFlt; use System.Img_LFlt; with System.Val_Fixed_32; use System.Val_Fixed_32; with System.Val_Fixed_64; use System.Val_Fixed_64; with System.Val_Fixed_128; use System.Val_Fixed_128; -with System.Val_LLF; use System.Val_LLF; +with System.Val_LFlt; use System.Val_LFlt; with System.WCh_Con; use System.WCh_Con; with System.WCh_WtS; use System.WCh_WtS; @@ -47,7 +48,7 @@ package body Ada.Wide_Text_IO.Fixed_IO is -- Note: we still use the floating-point I/O routines for types whose small -- is not the ratio of two sufficiently small integers. This will result in -- inaccuracies for fixed point types that require more precision than is - -- available in Long_Long_Float. + -- available in Long_Float. subtype Int32 is Interfaces.Integer_32; use type Int32; subtype Int64 is Interfaces.Integer_64; use type Int64; @@ -62,8 +63,9 @@ package body Ada.Wide_Text_IO.Fixed_IO is package Aux128 is new Ada.Wide_Text_IO.Fixed_Aux (Int128, Scan_Fixed128, Set_Image_Fixed128); - package Aux_Long_Long_Float is new - Ada.Wide_Text_IO.Float_Aux (Long_Long_Float, Scan_Long_Long_Float); + package Aux_Long_Float is new + Ada.Wide_Text_IO.Float_Aux + (Long_Float, Scan_Long_Float, Set_Image_Long_Float); -- Throughout this generic body, we distinguish between the case where type -- Int32 is OK, where type Int64 is OK and where type Int128 is OK. These @@ -201,7 +203,7 @@ package body Ada.Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator)); else - Aux_Long_Long_Float.Get (File, Long_Long_Float (Item), Width); + Aux_Long_Float.Get (File, Long_Float (Item), Width); end if; exception @@ -246,7 +248,7 @@ package body Ada.Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator)); else - Aux_Long_Long_Float.Gets (S, Long_Long_Float (Item), Last); + Aux_Long_Float.Gets (S, Long_Float (Item), Last); end if; exception @@ -278,8 +280,7 @@ package body Ada.Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator, For0, Num'Aft); else - Aux_Long_Long_Float.Put - (File, Long_Long_Float (Item), Fore, Aft, Exp); + Aux_Long_Float.Put (File, Long_Float (Item), Fore, Aft, Exp); end if; end Put; @@ -315,7 +316,7 @@ package body Ada.Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator, For0, Num'Aft); else - Aux_Long_Long_Float.Puts (S, Long_Long_Float (Item), Aft, Exp); + Aux_Long_Float.Puts (S, Long_Float (Item), Aft, Exp); end if; for J in S'Range loop diff --git a/gcc/ada/libgnat/a-wtflau.adb b/gcc/ada/libgnat/a-wtflau.adb index 7db1b78..6f486b7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -31,7 +31,7 @@ with Ada.Wide_Text_IO.Generic_Aux; use Ada.Wide_Text_IO.Generic_Aux; -with System.Img_Real; use System.Img_Real; +with System.Img_Util; use System.Img_Util; package body Ada.Wide_Text_IO.Float_Aux is @@ -96,7 +96,7 @@ package body Ada.Wide_Text_IO.Float_Aux is Ptr : Natural := 0; begin - Set_Image_Real (Long_Long_Float (Item), Buf, Ptr, Fore, Aft, Exp); + Set_Image (Item, Buf, Ptr, Fore, Aft, Exp); Put_Item (File, Buf (1 .. Ptr)); end Put; @@ -114,8 +114,7 @@ package body Ada.Wide_Text_IO.Float_Aux is Ptr : Natural := 0; begin - Set_Image_Real - (Long_Long_Float (Item), Buf, Ptr, Fore => 1, Aft => Aft, Exp => Exp); + Set_Image (Item, Buf, Ptr, Fore => 1, Aft => Aft, Exp => Exp); if Ptr > To'Length then raise Layout_Error; diff --git a/gcc/ada/libgnat/a-wtflau.ads b/gcc/ada/libgnat/a-wtflau.ads index 82ace79..0303b63 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -45,6 +45,14 @@ private generic Ptr : not null access Integer; Max : Integer) return Num; + with procedure Set_Image + (V : Num; + S : in out String; + P : in out Natural; + Fore : Natural; + Aft : Natural; + Exp : Natural); + package Ada.Wide_Text_IO.Float_Aux is procedure Get diff --git a/gcc/ada/libgnat/a-wtflio.adb b/gcc/ada/libgnat/a-wtflio.adb index 3691786..acbe1f5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -30,6 +30,9 @@ ------------------------------------------------------------------------------ with Ada.Wide_Text_IO.Float_Aux; +with System.Img_Flt; use System.Img_Flt; +with System.Img_LFlt; use System.Img_LFlt; +with System.Img_LLF; use System.Img_LLF; with System.Val_Flt; use System.Val_Flt; with System.Val_LFlt; use System.Val_LFlt; with System.Val_LLF; use System.Val_LLF; @@ -39,13 +42,15 @@ with System.WCh_WtS; use System.WCh_WtS; package body Ada.Wide_Text_IO.Float_IO is package Aux_Float is new - Ada.Wide_Text_IO.Float_Aux (Float, Scan_Float); + Ada.Wide_Text_IO.Float_Aux (Float, Scan_Float, Set_Image_Float); package Aux_Long_Float is new - Ada.Wide_Text_IO.Float_Aux (Long_Float, Scan_Long_Float); + Ada.Wide_Text_IO.Float_Aux + (Long_Float, Scan_Long_Float, Set_Image_Long_Float); package Aux_Long_Long_Float is new - Ada.Wide_Text_IO.Float_Aux (Long_Long_Float, Scan_Long_Long_Float); + Ada.Wide_Text_IO.Float_Aux + (Long_Long_Float, Scan_Long_Long_Float, Set_Image_Long_Long_Float); -- Throughout this generic body, we distinguish between the case where type -- Float is OK, where type Long_Float is OK and where type Long_Long_Float diff --git a/gcc/ada/libgnat/a-wtgeau.adb b/gcc/ada/libgnat/a-wtgeau.adb index bc9b459..ed823f1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtgeau.ads b/gcc/ada/libgnat/a-wtgeau.ads index 7c89971..b3c1fa4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtinau.adb b/gcc/ada/libgnat/a-wtinau.adb index b614b39..1630428 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtinau.ads b/gcc/ada/libgnat/a-wtinau.ads index f139f77..661f25e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtinio.adb b/gcc/ada/libgnat/a-wtinio.adb index b322433..336b591 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtinio__128.adb b/gcc/ada/libgnat/a-wtinio__128.adb index 0eea7b5..8c0191d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtmoio.adb b/gcc/ada/libgnat/a-wtmoio.adb index efab035..ffefa13 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wtmoio.ads b/gcc/ada/libgnat/a-wtmoio.ads index b28aacd..d772c41 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 a32eaf2..155f312 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wttest.adb b/gcc/ada/libgnat/a-wttest.adb index 01b6688..69eb6be 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-wwboio.adb b/gcc/ada/libgnat/a-wwboio.adb index 4602596..a5c85a1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/a-zchhan.adb b/gcc/ada/libgnat/a-zchhan.adb index 6930121..3f2a91b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- diff --git a/gcc/ada/libgnat/a-zchuni.adb b/gcc/ada/libgnat/a-zchuni.adb index 203c3aa..2bbe584 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-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- -- diff --git a/gcc/ada/libgnat/a-zchuni.ads b/gcc/ada/libgnat/a-zchuni.ads index 7f4a30b..51f7c92 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-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- -- diff --git a/gcc/ada/libgnat/a-zrstfi.adb b/gcc/ada/libgnat/a-zrstfi.adb index aa73032..ba07af8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/a-zrstfi.ads b/gcc/ada/libgnat/a-zrstfi.ads index 86a6fc5..56d3ef4 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/a-ztcoau.adb b/gcc/ada/libgnat/a-ztcoau.adb index bb33680..a367827 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -31,8 +31,6 @@ with Ada.Wide_Wide_Text_IO.Generic_Aux; use Ada.Wide_Wide_Text_IO.Generic_Aux; -with System.Img_Real; use System.Img_Real; - package body Ada.Wide_Wide_Text_IO.Complex_Aux is --------- @@ -171,9 +169,9 @@ package body Ada.Wide_Wide_Text_IO.Complex_Aux is -- Both parts are initially converted with a Fore of 0 Rptr := 0; - Set_Image_Real (Long_Long_Float (ItemR), R_String, Rptr, 0, Aft, Exp); + Aux.Set_Image (ItemR, R_String, Rptr, 0, Aft, Exp); Iptr := 0; - Set_Image_Real (Long_Long_Float (ItemI), I_String, Iptr, 0, Aft, Exp); + Aux.Set_Image (ItemI, I_String, Iptr, 0, Aft, Exp); -- Check room for both parts plus parens plus comma (RM G.1.3(34)) diff --git a/gcc/ada/libgnat/a-ztcoau.ads b/gcc/ada/libgnat/a-ztcoau.ads index 43546d8..953ed5d 100644 --- a/gcc/ada/libgnat/a-ztcoau.ads +++ b/gcc/ada/libgnat/a-ztcoau.ads @@ -26,7 +26,7 @@ private generic type Num is digits <>; - with package Aux is new Ada.Wide_Wide_Text_IO.Float_Aux (Num, <>); + with package Aux is new Ada.Wide_Wide_Text_IO.Float_Aux (Num, <>, <>); package Ada.Wide_Wide_Text_IO.Complex_Aux is diff --git a/gcc/ada/libgnat/a-ztcoio.adb b/gcc/ada/libgnat/a-ztcoio.adb index 5103191..9ec590a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -31,36 +31,39 @@ with Ada.Wide_Wide_Text_IO.Complex_Aux; with Ada.Wide_Wide_Text_IO.Float_Aux; +with System.Img_Flt; use System.Img_Flt; +with System.Img_LFlt; use System.Img_LFlt; +with System.Img_LLF; use System.Img_LLF; with System.Val_Flt; use System.Val_Flt; with System.Val_LFlt; use System.Val_LFlt; with System.Val_LLF; use System.Val_LLF; with System.WCh_Con; use System.WCh_Con; with System.WCh_WtS; use System.WCh_WtS; -with Ada.Unchecked_Conversion; - package body Ada.Wide_Wide_Text_IO.Complex_IO is use Complex_Types; package Scalar_Float is new - Ada.Wide_Wide_Text_IO.Float_Aux (Float, Scan_Float); + Ada.Wide_Wide_Text_IO.Float_Aux (Float, Scan_Float, Set_Image_Float); package Scalar_Long_Float is new - Ada.Wide_Wide_Text_IO.Float_Aux (Long_Float, Scan_Long_Float); + Ada.Wide_Wide_Text_IO.Float_Aux + (Long_Float, Scan_Long_Float, Set_Image_Long_Float); package Scalar_Long_Long_Float is new - Ada.Wide_Wide_Text_IO.Float_Aux (Long_Long_Float, Scan_Long_Long_Float); + Ada.Wide_Wide_Text_IO.Float_Aux + (Long_Long_Float, Scan_Long_Long_Float, Set_Image_Long_Long_Float); package Aux_Float is new - Ada.Wide_Wide_Text_IO.Complex_Aux (Float, Scalar_Float); + Ada.Wide_Wide_Text_IO.Complex_Aux (Float, Scalar_Float); package Aux_Long_Float is new - Ada.Wide_Wide_Text_IO.Complex_Aux (Long_Float, Scalar_Long_Float); + Ada.Wide_Wide_Text_IO.Complex_Aux (Long_Float, Scalar_Long_Float); package Aux_Long_Long_Float is new - Ada.Wide_Wide_Text_IO.Complex_Aux - (Long_Long_Float, Scalar_Long_Long_Float); + Ada.Wide_Wide_Text_IO.Complex_Aux + (Long_Long_Float, Scalar_Long_Long_Float); -- Throughout this generic body, we distinguish between the case where type -- Float is OK, where type Long_Float is OK and where type Long_Long_Float diff --git a/gcc/ada/libgnat/a-ztcstr.adb b/gcc/ada/libgnat/a-ztcstr.adb index 8ce9d66..e4aa3c1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztcstr.ads b/gcc/ada/libgnat/a-ztcstr.ads index 80c30fc..86c65d79 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztdeau.adb b/gcc/ada/libgnat/a-ztdeau.adb index ec6431b..71e214c1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztdeau.ads b/gcc/ada/libgnat/a-ztdeau.ads index 962f479..b70fb21 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztdeio.adb b/gcc/ada/libgnat/a-ztdeio.adb index 1d9f5d8..c8bf59f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztdeio__128.adb b/gcc/ada/libgnat/a-ztdeio__128.adb index 156a66d..11cbb01 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/a-ztedit.adb b/gcc/ada/libgnat/a-ztedit.adb index a23074d..b044621 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztedit.ads b/gcc/ada/libgnat/a-ztedit.ads index 54cd24a..d846432 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 f3b11af..f4bffec 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztenau.ads b/gcc/ada/libgnat/a-ztenau.ads index dd31182..263072f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztenio.adb b/gcc/ada/libgnat/a-ztenio.adb index 6c35b9f..998632b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztexio.adb b/gcc/ada/libgnat/a-ztexio.adb index dcd6f9e..71d733e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -136,15 +136,15 @@ package body Ada.Wide_Wide_Text_IO is -- is required (RM A.10.3(23)) but it seems reasonable, and besides -- ACVC test CE3208A expects this behavior. - if File_Type (File) = Current_In then + if File = Current_In then Current_In := null; - elsif File_Type (File) = Current_Out then + elsif File = Current_Out then Current_Out := null; - elsif File_Type (File) = Current_Err then + elsif File = Current_Err then Current_Err := null; end if; - Terminate_Line (File_Type (File)); + Terminate_Line (File.all'Access); end AFCB_Close; --------------- @@ -152,11 +152,10 @@ package body Ada.Wide_Wide_Text_IO is --------------- procedure AFCB_Free (File : not null access Wide_Wide_Text_AFCB) is - type FCB_Ptr is access all Wide_Wide_Text_AFCB; - FT : FCB_Ptr := FCB_Ptr (File); + FT : File_Type := File.all'Access; procedure Free is new - Ada.Unchecked_Deallocation (Wide_Wide_Text_AFCB, FCB_Ptr); + Ada.Unchecked_Deallocation (Wide_Wide_Text_AFCB, File_Type); begin Free (FT); diff --git a/gcc/ada/libgnat/a-ztexio.ads b/gcc/ada/libgnat/a-ztexio.ads index 85ea6b5..5983e0e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 -- @@ -73,9 +73,6 @@ package Ada.Wide_Wide_Text_IO is -- Line and page length subtype Field is Integer range 0 .. 255; - -- Note: if for any reason, there is a need to increase this value, then it - -- will be necessary to change the corresponding value in System.Img_Real - -- in file s-imgrea.adb. subtype Number_Base is Integer range 2 .. 16; diff --git a/gcc/ada/libgnat/a-ztfiau.adb b/gcc/ada/libgnat/a-ztfiau.adb index 1e94fef..340b90a 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/a-ztfiau.ads b/gcc/ada/libgnat/a-ztfiau.ads index aac4e42..23a7ee9 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/a-ztfiio.adb b/gcc/ada/libgnat/a-ztfiio.adb index 53ed45b..5c12e2a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -34,9 +34,10 @@ with Ada.Wide_Wide_Text_IO.Fixed_Aux; with Ada.Wide_Wide_Text_IO.Float_Aux; with System.Img_Fixed_32; use System.Img_Fixed_32; with System.Img_Fixed_64; use System.Img_Fixed_64; +with System.Img_LFlt; use System.Img_LFlt; with System.Val_Fixed_32; use System.Val_Fixed_32; with System.Val_Fixed_64; use System.Val_Fixed_64; -with System.Val_LLF; use System.Val_LLF; +with System.Val_LFlt; use System.Val_LFlt; with System.WCh_Con; use System.WCh_Con; with System.WCh_WtS; use System.WCh_WtS; @@ -45,7 +46,7 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is -- Note: we still use the floating-point I/O routines for types whose small -- is not the ratio of two sufficiently small integers. This will result in -- inaccuracies for fixed point types that require more precision than is - -- available in Long_Long_Float. + -- available in Long_Float. subtype Int32 is Interfaces.Integer_32; use type Int32; subtype Int64 is Interfaces.Integer_64; use type Int64; @@ -56,8 +57,9 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is package Aux64 is new Ada.Wide_Wide_Text_IO.Fixed_Aux (Int64, Scan_Fixed64, Set_Image_Fixed64); - package Aux_Long_Long_Float is new - Ada.Wide_Wide_Text_IO.Float_Aux (Long_Long_Float, Scan_Long_Long_Float); + package Aux_Long_Float is new + Ada.Wide_Wide_Text_IO.Float_Aux + (Long_Float, Scan_Long_Float, Set_Image_Long_Float); -- Throughout this generic body, we distinguish between the case where type -- Int32 is OK and where type Int64 is OK. These boolean constants are used @@ -161,7 +163,7 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator)); else - Aux_Long_Long_Float.Get (File, Long_Long_Float (Item), Width); + Aux_Long_Float.Get (File, Long_Float (Item), Width); end if; exception @@ -201,7 +203,7 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator)); else - Aux_Long_Long_Float.Gets (S, Long_Long_Float (Item), Last); + Aux_Long_Float.Gets (S, Long_Float (Item), Last); end if; exception @@ -229,8 +231,7 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator, For0, Num'Aft); else - Aux_Long_Long_Float.Put - (File, Long_Long_Float (Item), Fore, Aft, Exp); + Aux_Long_Float.Put (File, Long_Float (Item), Fore, Aft, Exp); end if; end Put; @@ -262,7 +263,7 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator, For0, Num'Aft); else - Aux_Long_Long_Float.Puts (S, Long_Long_Float (Item), Aft, Exp); + Aux_Long_Float.Puts (S, Long_Float (Item), Aft, Exp); end if; for J in S'Range loop diff --git a/gcc/ada/libgnat/a-ztfiio__128.adb b/gcc/ada/libgnat/a-ztfiio__128.adb index 13ed410..f089fd6 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -35,10 +35,11 @@ with Ada.Wide_Wide_Text_IO.Float_Aux; with System.Img_Fixed_32; use System.Img_Fixed_32; with System.Img_Fixed_64; use System.Img_Fixed_64; with System.Img_Fixed_128; use System.Img_Fixed_128; +with System.Img_LFlt; use System.Img_LFlt; with System.Val_Fixed_32; use System.Val_Fixed_32; with System.Val_Fixed_64; use System.Val_Fixed_64; with System.Val_Fixed_128; use System.Val_Fixed_128; -with System.Val_LLF; use System.Val_LLF; +with System.Val_LFlt; use System.Val_LFlt; with System.WCh_Con; use System.WCh_Con; with System.WCh_WtS; use System.WCh_WtS; @@ -47,7 +48,7 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is -- Note: we still use the floating-point I/O routines for types whose small -- is not the ratio of two sufficiently small integers. This will result in -- inaccuracies for fixed point types that require more precision than is - -- available in Long_Long_Float. + -- available in Long_Float. subtype Int32 is Interfaces.Integer_32; use type Int32; subtype Int64 is Interfaces.Integer_64; use type Int64; @@ -63,8 +64,9 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is Ada.Wide_Wide_Text_IO.Fixed_Aux (Int128, Scan_Fixed128, Set_Image_Fixed128); - package Aux_Long_Long_Float is new - Ada.Wide_Wide_Text_IO.Float_Aux (Long_Long_Float, Scan_Long_Long_Float); + package Aux_Long_Float is new + Ada.Wide_Wide_Text_IO.Float_Aux + (Long_Float, Scan_Long_Float, Set_Image_Long_Float); -- Throughout this generic body, we distinguish between the case where type -- Int32 is OK, where type Int64 is OK and where type Int128 is OK. These @@ -202,7 +204,7 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator)); else - Aux_Long_Long_Float.Get (File, Long_Long_Float (Item), Width); + Aux_Long_Float.Get (File, Long_Float (Item), Width); end if; exception @@ -247,7 +249,7 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator)); else - Aux_Long_Long_Float.Gets (S, Long_Long_Float (Item), Last); + Aux_Long_Float.Gets (S, Long_Float (Item), Last); end if; exception @@ -279,8 +281,7 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator, For0, Num'Aft); else - Aux_Long_Long_Float.Put - (File, Long_Long_Float (Item), Fore, Aft, Exp); + Aux_Long_Float.Put (File, Long_Float (Item), Fore, Aft, Exp); end if; end Put; @@ -316,7 +317,7 @@ package body Ada.Wide_Wide_Text_IO.Fixed_IO is -Num'Small_Numerator, -Num'Small_Denominator, For0, Num'Aft); else - Aux_Long_Long_Float.Puts (S, Long_Long_Float (Item), Aft, Exp); + Aux_Long_Float.Puts (S, Long_Float (Item), Aft, Exp); end if; for J in S'Range loop diff --git a/gcc/ada/libgnat/a-ztflau.adb b/gcc/ada/libgnat/a-ztflau.adb index 1bddcd8..d7dd9e2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -31,7 +31,7 @@ with Ada.Wide_Wide_Text_IO.Generic_Aux; use Ada.Wide_Wide_Text_IO.Generic_Aux; -with System.Img_Real; use System.Img_Real; +with System.Img_Util; use System.Img_Util; package body Ada.Wide_Wide_Text_IO.Float_Aux is @@ -96,7 +96,7 @@ package body Ada.Wide_Wide_Text_IO.Float_Aux is Ptr : Natural := 0; begin - Set_Image_Real (Long_Long_Float (Item), Buf, Ptr, Fore, Aft, Exp); + Set_Image (Item, Buf, Ptr, Fore, Aft, Exp); Put_Item (File, Buf (1 .. Ptr)); end Put; @@ -114,8 +114,7 @@ package body Ada.Wide_Wide_Text_IO.Float_Aux is Ptr : Natural := 0; begin - Set_Image_Real - (Long_Long_Float (Item), Buf, Ptr, Fore => 1, Aft => Aft, Exp => Exp); + Set_Image (Item, Buf, Ptr, Fore => 1, Aft => Aft, Exp => Exp); if Ptr > To'Length then raise Layout_Error; diff --git a/gcc/ada/libgnat/a-ztflau.ads b/gcc/ada/libgnat/a-ztflau.ads index 48fba82..769e20e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -45,6 +45,14 @@ private generic Ptr : not null access Integer; Max : Integer) return Num; + with procedure Set_Image + (V : Num; + S : in out String; + P : in out Natural; + Fore : Natural; + Aft : Natural; + Exp : Natural); + package Ada.Wide_Wide_Text_IO.Float_Aux is procedure Get diff --git a/gcc/ada/libgnat/a-ztflio.adb b/gcc/ada/libgnat/a-ztflio.adb index e491e62..7550695 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -30,6 +30,9 @@ ------------------------------------------------------------------------------ with Ada.Wide_Wide_Text_IO.Float_Aux; +with System.Img_Flt; use System.Img_Flt; +with System.Img_LFlt; use System.Img_LFlt; +with System.Img_LLF; use System.Img_LLF; with System.Val_Flt; use System.Val_Flt; with System.Val_LFlt; use System.Val_LFlt; with System.Val_LLF; use System.Val_LLF; @@ -39,13 +42,15 @@ with System.WCh_WtS; use System.WCh_WtS; package body Ada.Wide_Wide_Text_IO.Float_IO is package Aux_Float is new - Ada.Wide_Wide_Text_IO.Float_Aux (Float, Scan_Float); + Ada.Wide_Wide_Text_IO.Float_Aux (Float, Scan_Float, Set_Image_Float); package Aux_Long_Float is new - Ada.Wide_Wide_Text_IO.Float_Aux (Long_Float, Scan_Long_Float); + Ada.Wide_Wide_Text_IO.Float_Aux + (Long_Float, Scan_Long_Float, Set_Image_Long_Float); package Aux_Long_Long_Float is new - Ada.Wide_Wide_Text_IO.Float_Aux (Long_Long_Float, Scan_Long_Long_Float); + Ada.Wide_Wide_Text_IO.Float_Aux + (Long_Long_Float, Scan_Long_Long_Float, Set_Image_Long_Long_Float); -- Throughout this generic body, we distinguish between the case where type -- Float is OK, where type Long_Float is OK and where type Long_Long_Float diff --git a/gcc/ada/libgnat/a-ztgeau.adb b/gcc/ada/libgnat/a-ztgeau.adb index 6b5e4c5..9a4fdb0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztgeau.ads b/gcc/ada/libgnat/a-ztgeau.ads index 6b80ed4..c885028 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztinau.adb b/gcc/ada/libgnat/a-ztinau.adb index f7b49a1..8693557 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztinau.ads b/gcc/ada/libgnat/a-ztinau.ads index 914f120..dc40c7e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztinio.adb b/gcc/ada/libgnat/a-ztinio.adb index c19c8a6..5050188 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztinio__128.adb b/gcc/ada/libgnat/a-ztinio__128.adb index 19dcc34..942df64 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztmoio.adb b/gcc/ada/libgnat/a-ztmoio.adb index ba854ff..a312091 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-ztmoio__128.adb b/gcc/ada/libgnat/a-ztmoio__128.adb index 2101508..41991c2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-zttest.adb b/gcc/ada/libgnat/a-zttest.adb index 71004bb..d4c1ef0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/a-zzboio.adb b/gcc/ada/libgnat/a-zzboio.adb index a41aadc..8cdc027 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/g-allein.ads b/gcc/ada/libgnat/g-allein.ads index ab23380..9b381d3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/g-alleve.adb b/gcc/ada/libgnat/g-alleve.adb index a3aa5b6..5dc7230 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- @@ -258,7 +258,7 @@ package body GNAT.Altivec.Low_Level_Vectors is pragma Convention (LL_Altivec, vspltisx); type Bit_Operation is - access function + not null access function (Value : Component_Type; Amount : Natural) return Component_Type; diff --git a/gcc/ada/libgnat/g-alleve.ads b/gcc/ada/libgnat/g-alleve.ads index 3c39b11..cf0028a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/g-alleve__hard.adb b/gcc/ada/libgnat/g-alleve__hard.adb index 7934091..f2f8ac2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/g-alleve__hard.ads b/gcc/ada/libgnat/g-alleve__hard.ads index 318f72d..b8a3281 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/g-altcon.adb b/gcc/ada/libgnat/g-altcon.adb index 589ba6c..58975f4 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-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- -- diff --git a/gcc/ada/libgnat/g-altcon.ads b/gcc/ada/libgnat/g-altcon.ads index 173d0d0..ad84a80 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-altive.ads b/gcc/ada/libgnat/g-altive.ads index 455ebe7..32e603a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/g-alveop.adb b/gcc/ada/libgnat/g-alveop.adb index b889778..65a1115 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/g-alveop.ads b/gcc/ada/libgnat/g-alveop.ads index 644b3c4..3250fdf 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/g-alvety.ads b/gcc/ada/libgnat/g-alvety.ads index 66cac0c..3fec714 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/g-alvevi.ads b/gcc/ada/libgnat/g-alvevi.ads index adf463c..8c10959 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-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- -- diff --git a/gcc/ada/libgnat/g-arrspl.adb b/gcc/ada/libgnat/g-arrspl.adb index 8770030..6a8518b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/g-arrspl.ads b/gcc/ada/libgnat/g-arrspl.ads index 099d499..3d943c0 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/g-awk.adb b/gcc/ada/libgnat/g-awk.adb index cd2031f..c48d7ef 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 21b008b..b499101 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 95ef997..e10fb96 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-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- -- diff --git a/gcc/ada/libgnat/g-binenv.ads b/gcc/ada/libgnat/g-binenv.ads index dab454a..ba9a9b1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-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- -- diff --git a/gcc/ada/libgnat/g-brapre.ads b/gcc/ada/libgnat/g-brapre.ads index 3559b0a..21ae351 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-2020, AdaCore -- +-- Copyright (C) 2019-2021, 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 f36c5a9c..70d50fc 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 5eeb5dd..acf47ed 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 125afee..08317e7 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 11a3d75..670e7b6 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 543a197..0f74f59 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 fc6546a..64d6d03 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 635f4b4..451549d 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-2020, AdaCore -- +-- Copyright (C) 2006-2021, 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.ads b/gcc/ada/libgnat/g-byorma.ads index ac0d812..e7b6275 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-2020, AdaCore -- +-- Copyright (C) 2006-2021, 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.adb b/gcc/ada/libgnat/g-bytswa.adb index f34730f..c37073e 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-2020, AdaCore -- +-- Copyright (C) 2006-2021, 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 01d4501..d8bbb00 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-2020, AdaCore -- +-- Copyright (C) 2006-2021, 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 55fb181..8200b60 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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.ads b/gcc/ada/libgnat/g-calend.ads index e153e08..29f055f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-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- -- diff --git a/gcc/ada/libgnat/g-casuti.adb b/gcc/ada/libgnat/g-casuti.adb index 7baa43a..d18f452 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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,8 @@ -- -- ------------------------------------------------------------------------------ --- This is a dummy body, required because if we remove the body we have --- bootstrap path problems (this unit used to have a body, and if we do not --- supply a dummy body, the old incorrect body is picked up during the --- bootstrap process. +-- This package does not require a body, since it is a package renaming. We +-- provide a dummy file containing a No_Body pragma so that previous versions +-- of the body (which did exist) will not interfere. -package body GNAT.Case_Util is -end GNAT.Case_Util; +pragma No_Body; diff --git a/gcc/ada/libgnat/g-casuti.ads b/gcc/ada/libgnat/g-casuti.ads index 5468e25..f711711 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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,38 +40,4 @@ with System.Case_Util; -package GNAT.Case_Util is - pragma Pure; - pragma Elaborate_Body; - -- The elaborate body is because we have a dummy body to deal with - -- bootstrap path problems (we used to have a real body, and now we don't - -- need it any more, but the bootstrap requires that we have a dummy body, - -- since otherwise the old body gets picked up. - - -- Note: all the following functions handle the full Latin-1 set - - function To_Upper (A : Character) return Character - renames System.Case_Util.To_Upper; - -- 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) - renames System.Case_Util.To_Upper; - -- Folds all characters of string A to upper case - - function To_Lower (A : Character) return Character - renames System.Case_Util.To_Lower; - -- 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) - renames System.Case_Util.To_Lower; - -- Folds all characters of string A to lower case - - procedure To_Mixed (A : in out String) - renames System.Case_Util.To_Mixed; - -- 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. - -end GNAT.Case_Util; +package GNAT.Case_Util renames System.Case_Util; diff --git a/gcc/ada/libgnat/g-catiio.adb b/gcc/ada/libgnat/g-catiio.adb index cd2df6a..462e0d2 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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.ads b/gcc/ada/libgnat/g-catiio.ads index 6bb9847..3c2cef9 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 495b6dd..0c3b6a4 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 4b2b9dc..2108cda 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 0f4444a..4f5f120 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 42b79db..4e59abc 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 7ce04a1..f127ded 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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.ads b/gcc/ada/libgnat/g-cgideb.ads index 5ae3bdd..bb9a0f3 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 0ca82f8..7f7040b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-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- -- diff --git a/gcc/ada/libgnat/g-comlin.ads b/gcc/ada/libgnat/g-comlin.ads index aa25118..e5f493e 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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.adb b/gcc/ada/libgnat/g-comver.adb index fbc1469..575caac 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-2020, AdaCore -- +-- Copyright (C) 2002-2021, 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- -- @@ -33,6 +33,8 @@ -- GNAT compiler used to compile the program. It relies on the generated -- constant in the binder generated package that records this information. +with System; + package body GNAT.Compiler_Version is Ver_Len_Max : constant := 256; @@ -43,8 +45,15 @@ package body GNAT.Compiler_Version is -- This is logically a reference to Gnatvsn.Ver_Prefix but we cannot -- import this directly since run-time units cannot WITH compiler units. + GNAT_Version_Address : constant System.Address; + pragma Import (C, GNAT_Version_Address, "__gnat_version_address"); + GNAT_Version : constant String (1 .. Ver_Len_Max + Ver_Prefix'Length); - pragma Import (C, GNAT_Version, "__gnat_version"); + pragma Import (Ada, GNAT_Version); + for GNAT_Version'Address use GNAT_Version_Address; + -- Use a level of indirection via __gnat_version_address to avoid LTO + -- type mismtch warnings between two string objects of potentially + -- different size. ------------- -- Version -- diff --git a/gcc/ada/libgnat/g-comver.ads b/gcc/ada/libgnat/g-comver.ads index 0b56b78..7de2811 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-2020, AdaCore -- +-- Copyright (C) 2002-2021, 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 691780f..f20eb7e 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-2020, AdaCore -- +-- Copyright (C) 2013-2021, 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 3781c13..ddfa02c 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-2020, AdaCore -- +-- Copyright (C) 2013-2021, 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 3adcf60..16beef1 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 b3d6005..3b59c3c 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-2020, AdaCore -- +-- Copyright (C) 2004-2021, 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 82d66b9..d238781 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-2020, AdaCore -- +-- Copyright (C) 2002-2021, 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 c3f2cc8..d46e4e7 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-2020, AdaCore -- +-- Copyright (C) 2002-2021, 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 2af5cd8..82d1cd6 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-2020, AdaCore -- +-- Copyright (C) 1996-2021, 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 b6523ca..0092139 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -362,7 +362,7 @@ package body GNAT.Debug_Pools is -- These procedures are used as markers when computing the stacktraces, -- so that addresses in the debug pool itself are not reported to the user. - Code_Address_For_Allocate_End : System.Address; + Code_Address_For_Allocate_End : System.Address := System.Null_Address; Code_Address_For_Deallocate_End : System.Address; Code_Address_For_Dereference_End : System.Address; -- Taking the address of the above procedures will not work on some diff --git a/gcc/ada/libgnat/g-debpoo.ads b/gcc/ada/libgnat/g-debpoo.ads index 88cffe8..fce04c4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/g-debuti.adb b/gcc/ada/libgnat/g-debuti.adb index 5b1277d..d064401 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-2020, AdaCore -- +-- Copyright (C) 1997-2021, 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 dab5131..109f56a 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 64ae297..89824095 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 9e82b75..cf6f5c3 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 e4ae4e19..f8f9087 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 1e8627e..3090bee 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 952d795..9eec0f6 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 3078130..ba68626 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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 03a062f..3568f77 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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 4c8dda5..75d1e61 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-2020, AdaCore -- +-- Copyright (C) 2002-2021, 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 3e4f561..27ea715 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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-dyntab.adb b/gcc/ada/libgnat/g-dyntab.adb index 4c53f15..9f14b68 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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-dyntab.ads b/gcc/ada/libgnat/g-dyntab.ads index 7a6c9fa..1cb26b4 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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-eacodu.adb b/gcc/ada/libgnat/g-eacodu.adb index cb07631..c9e62ab 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- diff --git a/gcc/ada/libgnat/g-encstr.adb b/gcc/ada/libgnat/g-encstr.adb index 62fff77..e701bc6 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-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- -- diff --git a/gcc/ada/libgnat/g-encstr.ads b/gcc/ada/libgnat/g-encstr.ads index 0e2fdf4..fc1e97d 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 e5b20cf..06a1a99 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 202d9e2..7184559 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/g-excact.ads b/gcc/ada/libgnat/g-excact.ads index c38f6a0..d4bda84 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/g-except.ads b/gcc/ada/libgnat/g-except.ads index 6d13f5a..8e33a4e 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 1db76b7..819e204 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 3ae90f4..1cfe661 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 0f9d0b9..b945731 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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.ads b/gcc/ada/libgnat/g-expect.ads index 19e704b..985e73d 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 bc239e4..d5ad5bb 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 ede147c..7c7a7c7 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 bdc9b0e..cc8859b 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 94492e9..64c4cb6 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-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- -- diff --git a/gcc/ada/libgnat/g-forstr.ads b/gcc/ada/libgnat/g-forstr.ads index 9c15845..7ef5f7d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-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- -- diff --git a/gcc/ada/libgnat/g-graphs.adb b/gcc/ada/libgnat/g-graphs.adb index 410b6ca..2565204 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-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- -- diff --git a/gcc/ada/libgnat/g-graphs.ads b/gcc/ada/libgnat/g-graphs.ads index ec3fbbc..d593f9f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-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- -- diff --git a/gcc/ada/libgnat/g-heasor.adb b/gcc/ada/libgnat/g-heasor.adb index 449cf8d..4984a35 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 bab0c5b..6bc026f 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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,6 +46,8 @@ -- 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 f4610e2..28926dd 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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-hesora.ads b/gcc/ada/libgnat/g-hesora.ads index f7064e4..62dd10b 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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.adb b/gcc/ada/libgnat/g-hesorg.adb index 89de591..0575af2 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 e2a3b8e..e24e82d 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 31bce1d..4aeeb1d 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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.ads b/gcc/ada/libgnat/g-htable.ads index b7c464d..373b2e9 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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-put__vxworks.adb b/gcc/ada/libgnat/g-io-put__vxworks.adb index 135e435..29307f9 100644 --- a/gcc/ada/libgnat/g-io-put__vxworks.adb +++ b/gcc/ada/libgnat/g-io-put__vxworks.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1995-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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.adb b/gcc/ada/libgnat/g-io.adb index c2c1ffa..24b041f 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 2ba9362..4700347 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 0590199..e904f37 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 aa9978a..a78a168 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 e9414e7..99414f6 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-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- -- diff --git a/gcc/ada/libgnat/g-lists.ads b/gcc/ada/libgnat/g-lists.ads index 29cda7a..3525877b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-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- -- diff --git a/gcc/ada/libgnat/g-locfil.adb b/gcc/ada/libgnat/g-locfil.adb index 7112704..75a7d8a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-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- -- diff --git a/gcc/ada/libgnat/g-locfil.ads b/gcc/ada/libgnat/g-locfil.ads index 4ef4912..5005ded 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 f89a563..cb7ecd2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/g-mbdira.ads b/gcc/ada/libgnat/g-mbdira.ads index f3d7e5e..28b66fb 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 2e4498d..a35787b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/g-mbflra.ads b/gcc/ada/libgnat/g-mbflra.ads index 6c65469..d761e18 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 90f2242..b977af0 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-md5.ads b/gcc/ada/libgnat/g-md5.ads index f599c8b..62131e3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-memdum.adb b/gcc/ada/libgnat/g-memdum.adb index ffc8d02..cd8f7ca 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-2020, AdaCore -- +-- Copyright (C) 2003-2021, 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-memdum.ads b/gcc/ada/libgnat/g-memdum.ads index cfb9ad9..be74588 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-2020, AdaCore -- +-- Copyright (C) 2003-2021, 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,9 +46,9 @@ package GNAT.Memory_Dump is -- Dumps indicated number (Count) of bytes, starting at the address given -- by Addr. The coding of this routine in its current form assumes the case -- of a byte addressable machine (and is therefore inapplicable to machines - -- like the AAMP, where the storage unit is not 8 bits). The output is one - -- or more lines in the following format, which is for the case of 32-bit - -- addresses (64-bit addresses are handled appropriately): + -- where the storage unit is not 8 bits). The output is one or more lines + -- in the following format, which is for the case of 32-bit addresses + -- (64-bit addresses are handled appropriately): -- -- 0234_3368: 66 67 68 . . . 73 74 75 "fghijklmnopqstuv" -- diff --git a/gcc/ada/libgnat/g-moreex.adb b/gcc/ada/libgnat/g-moreex.adb index 6802b4de..f61cd94 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 15c5c67..7b0b87d 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 608f685..0bb7aec 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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 c178465..56ce37b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-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- -- diff --git a/gcc/ada/libgnat/g-pehage.adb b/gcc/ada/libgnat/g-pehage.adb index a2c25f1..606656b 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-2020, AdaCore -- +-- Copyright (C) 2002-2021, 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,124 +31,18 @@ with Ada.IO_Exceptions; use Ada.IO_Exceptions; with Ada.Characters.Handling; use Ada.Characters.Handling; -with Ada.Directories; -with GNAT.Heap_Sort_G; -with GNAT.OS_Lib; use GNAT.OS_Lib; -with GNAT.Table; +with GNAT.OS_Lib; use GNAT.OS_Lib; package body GNAT.Perfect_Hash_Generators is - -- We are using the algorithm of J. Czech as described in Zbigniew J. - -- Czech, George Havas, and Bohdan S. Majewski ``An Optimal Algorithm for - -- Generating Minimal Perfect Hash Functions'', Information Processing - -- Letters, 43(1992) pp.257-264, Oct.1992 - - -- This minimal perfect hash function generator is based on random graphs - -- and produces a hash function of the form: - - -- h (w) = (g (f1 (w)) + g (f2 (w))) mod m - - -- where f1 and f2 are functions that map strings into integers, and g is - -- a function that maps integers into [0, m-1]. h can be order preserving. - -- For instance, let W = {w_0, ..., w_i, ..., w_m-1}, h can be defined - -- such that h (w_i) = i. - - -- This algorithm defines two possible constructions of f1 and f2. Method - -- b) stores the hash function in less memory space at the expense of - -- greater CPU time. - - -- a) fk (w) = sum (for i in 1 .. length (w)) (Tk (i, w (i))) mod n - - -- size (Tk) = max (for w in W) (length (w)) * size (used char set) - - -- b) fk (w) = sum (for i in 1 .. length (w)) (Tk (i) * w (i)) mod n - - -- size (Tk) = max (for w in W) (length (w)) but the table lookups are - -- replaced by multiplications. - - -- where Tk values are randomly generated. n is defined later on but the - -- algorithm recommends to use a value a little bit greater than 2m. Note - -- that for large values of m, the main memory space requirements comes - -- from the memory space for storing function g (>= 2m entries). - - -- Random graphs are frequently used to solve difficult problems that do - -- not have polynomial solutions. This algorithm is based on a weighted - -- undirected graph. It comprises two steps: mapping and assignment. - - -- In the mapping step, a graph G = (V, E) is constructed, where = {0, 1, - -- ..., n-1} and E = {(for w in W) (f1 (w), f2 (w))}. In order for the - -- assignment step to be successful, G has to be acyclic. To have a high - -- probability of generating an acyclic graph, n >= 2m. If it is not - -- acyclic, Tk have to be regenerated. - - -- In the assignment step, the algorithm builds function g. As G is - -- acyclic, there is a vertex v1 with only one neighbor v2. Let w_i be - -- the word such that v1 = f1 (w_i) and v2 = f2 (w_i). Let g (v1) = 0 by - -- construction and g (v2) = (i - g (v1)) mod n (or h (i) - g (v1) mod n). - -- If word w_j is such that v2 = f1 (w_j) and v3 = f2 (w_j), g (v3) = (j - - -- g (v2)) mod (or to be general, (h (j) - g (v2)) mod n). If w_i has no - -- neighbor, then another vertex is selected. The algorithm traverses G to - -- assign values to all the vertices. It cannot assign a value to an - -- already assigned vertex as G is acyclic. - - subtype Word_Id is Integer; - subtype Key_Id is Integer; - subtype Vertex_Id is Integer; - subtype Edge_Id is Integer; - subtype Table_Id is Integer; - - No_Vertex : constant Vertex_Id := -1; - No_Edge : constant Edge_Id := -1; - No_Table : constant Table_Id := -1; - - type Word_Type is new String_Access; - procedure Free_Word (W : in out Word_Type) renames Free; - function New_Word (S : String) return Word_Type; - - procedure Resize_Word (W : in out Word_Type; Len : Natural); - -- Resize string W to have a length Len - - type Key_Type is record - Edge : Edge_Id; - end record; - -- A key corresponds to an edge in the algorithm graph - - type Vertex_Type is record - First : Edge_Id; - Last : Edge_Id; - end record; - -- A vertex can be involved in several edges. First and Last are the bounds - -- of an array of edges stored in a global edge table. - - type Edge_Type is record - X : Vertex_Id; - Y : Vertex_Id; - Key : Key_Id; - end record; - -- An edge is a peer of vertices. In the algorithm, a key is associated to - -- an edge. - - package WT is new GNAT.Table (Word_Type, Word_Id, 0, 32, 32); - package IT is new GNAT.Table (Integer, Integer, 0, 32, 32); - -- The two main tables. WT is used to store the words in their initial - -- version and in their reduced version (that is words reduced to their - -- significant characters). As an instance of GNAT.Table, WT does not - -- initialize string pointers to null. This initialization has to be done - -- manually when the table is allocated. IT is used to store several - -- tables of components containing only integers. + use SPHG; function Image (Int : Integer; W : Natural := 0) return String; function Image (Str : String; W : Natural := 0) return String; -- Return a string which includes string Str or integer Int preceded by -- leading spaces if required by width W. - function Trim_Trailing_Nuls (Str : String) return String; - -- Return Str with trailing NUL characters removed - - Output : File_Descriptor renames GNAT.OS_Lib.Standout; - -- Shortcuts - EOL : constant Character := ASCII.LF; Max : constant := 78; @@ -156,6 +50,12 @@ package body GNAT.Perfect_Hash_Generators is Line : String (1 .. Max); -- Use this line to provide buffered IO + NK : Natural := 0; + -- NK : Number of Keys + + Opt : Optimization; + -- Optimization mode (memory vs CPU) + procedure Add (C : Character); procedure Add (S : String); -- Add a character or a string in Line and update Last @@ -185,324 +85,21 @@ package body GNAT.Perfect_Hash_Generators is procedure Put (File : File_Descriptor; Str : String); -- Simulate Ada.Text_IO.Put with GNAT.OS_Lib - procedure Put_Used_Char_Set (File : File_Descriptor; Title : String); - -- Output a title and a used character set - - procedure Put_Int_Vector - (File : File_Descriptor; - Title : String; - Vector : Integer; - Length : Natural); - -- Output a title and a vector - procedure Put_Int_Matrix (File : File_Descriptor; Title : String; - Table : Table_Id; + Table : Table_Name; Len_1 : Natural; Len_2 : Natural); -- Output a title and a matrix. When the matrix has only one non-empty -- dimension (Len_2 = 0), output a vector. - procedure Put_Edges (File : File_Descriptor; Title : String); - -- Output a title and an edge table - - procedure Put_Initial_Keys (File : File_Descriptor; Title : String); - -- Output a title and a key table - - procedure Put_Reduced_Keys (File : File_Descriptor; Title : String); - -- Output a title and a key table - - procedure Put_Vertex_Table (File : File_Descriptor; Title : String); - -- Output a title and a vertex table - function Ada_File_Base_Name (Pkg_Name : String) return String; -- Return the base file name (i.e. without .ads/.adb extension) for an -- Ada source file containing the named package, using the standard GNAT -- file-naming convention. For example, if Pkg_Name is "Parent.Child", we -- return "parent-child". - ---------------------------------- - -- Character Position Selection -- - ---------------------------------- - - -- We reduce the maximum key size by selecting representative positions - -- in these keys. We build a matrix with one word per line. We fill the - -- remaining space of a line with ASCII.NUL. The heuristic selects the - -- position that induces the minimum number of collisions. If there are - -- collisions, select another position on the reduced key set responsible - -- of the collisions. Apply the heuristic until there is no more collision. - - procedure Apply_Position_Selection; - -- Apply Position selection and build the reduced key table - - procedure Parse_Position_Selection (Argument : String); - -- Parse Argument and compute the position set. Argument is list of - -- substrings separated by commas. Each substring represents a position - -- or a range of positions (like x-y). - - procedure Select_Character_Set; - -- Define an optimized used character set like Character'Pos in order not - -- to allocate tables of 256 entries. - - procedure Select_Char_Position; - -- Find a min char position set in order to reduce the max key length. The - -- heuristic selects the position that induces the minimum number of - -- collisions. If there are collisions, select another position on the - -- reduced key set responsible of the collisions. Apply the heuristic until - -- there is no collision. - - ----------------------------- - -- Random Graph Generation -- - ----------------------------- - - procedure Random (Seed : in out Natural); - -- Simulate Ada.Discrete_Numerics.Random - - procedure Generate_Mapping_Table - (Tab : Table_Id; - L1 : Natural; - L2 : Natural; - Seed : in out Natural); - -- Random generation of the tables below. T is already allocated - - procedure Generate_Mapping_Tables - (Opt : Optimization; - Seed : in out Natural); - -- Generate the mapping tables T1 and T2. They are used to define fk (w) = - -- sum (for i in 1 .. length (w)) (Tk (i, w (i))) mod n. Keys, NK and Chars - -- are used to compute the matrix size. - - --------------------------- - -- Algorithm Computation -- - --------------------------- - - procedure Compute_Edges_And_Vertices (Opt : Optimization); - -- Compute the edge and vertex tables. These are empty when a self loop is - -- detected (f1 (w) = f2 (w)). The edge table is sorted by X value and then - -- Y value. Keys is the key table and NK the number of keys. Chars is the - -- set of characters really used in Keys. NV is the number of vertices - -- recommended by the algorithm. T1 and T2 are the mapping tables needed to - -- compute f1 (w) and f2 (w). - - function Acyclic return Boolean; - -- Return True when the graph is acyclic. Vertices is the current vertex - -- table and Edges the current edge table. - - procedure Assign_Values_To_Vertices; - -- Execute the assignment step of the algorithm. Keys is the current key - -- table. Vertices and Edges represent the random graph. G is the result of - -- the assignment step such that: - -- h (w) = (g (f1 (w)) + g (f2 (w))) mod m - - function Sum - (Word : Word_Type; - Table : Table_Id; - Opt : Optimization) return Natural; - -- For an optimization of CPU_Time return - -- fk (w) = sum (for i in 1 .. length (w)) (Tk (i, w (i))) mod n - -- For an optimization of Memory_Space return - -- fk (w) = sum (for i in 1 .. length (w)) (Tk (i) * w (i)) mod n - -- Here NV = n - - ------------------------------- - -- Internal Table Management -- - ------------------------------- - - function Allocate (N : Natural; S : Natural := 1) return Table_Id; - -- Allocate N * S ints from IT table - - ---------- - -- Keys -- - ---------- - - Keys : Table_Id := No_Table; - NK : Natural := 0; - -- NK : Number of Keys - - function Initial (K : Key_Id) return Word_Id; - pragma Inline (Initial); - - function Reduced (K : Key_Id) return Word_Id; - pragma Inline (Reduced); - - function Get_Key (N : Key_Id) return Key_Type; - procedure Set_Key (N : Key_Id; Item : Key_Type); - -- Get or Set Nth element of Keys table - - ------------------ - -- Char_Pos_Set -- - ------------------ - - Char_Pos_Set : Table_Id := No_Table; - Char_Pos_Set_Len : Natural; - -- Character Selected Position Set - - function Get_Char_Pos (P : Natural) return Natural; - procedure Set_Char_Pos (P : Natural; Item : Natural); - -- Get or Set the string position of the Pth selected character - - ------------------- - -- Used_Char_Set -- - ------------------- - - Used_Char_Set : Table_Id := No_Table; - Used_Char_Set_Len : Natural; - -- Used Character Set : Define a new character mapping. When all the - -- characters are not present in the keys, in order to reduce the size - -- of some tables, we redefine the character mapping. - - function Get_Used_Char (C : Character) return Natural; - procedure Set_Used_Char (C : Character; Item : Natural); - - ------------ - -- Tables -- - ------------ - - T1 : Table_Id := No_Table; - T2 : Table_Id := No_Table; - T1_Len : Natural; - T2_Len : Natural; - -- T1 : Values table to compute F1 - -- T2 : Values table to compute F2 - - function Get_Table (T : Integer; X, Y : Natural) return Natural; - procedure Set_Table (T : Integer; X, Y : Natural; Item : Natural); - - ----------- - -- Graph -- - ----------- - - G : Table_Id := No_Table; - G_Len : Natural; - -- Values table to compute G - - NT : Natural := Default_Tries; - -- Number of tries running the algorithm before raising an error - - function Get_Graph (N : Natural) return Integer; - procedure Set_Graph (N : Natural; Item : Integer); - -- Get or Set Nth element of graph - - ----------- - -- Edges -- - ----------- - - Edge_Size : constant := 3; - Edges : Table_Id := No_Table; - Edges_Len : Natural; - -- Edges : Edge table of the random graph G - - function Get_Edges (F : Natural) return Edge_Type; - procedure Set_Edges (F : Natural; Item : Edge_Type); - - -------------- - -- Vertices -- - -------------- - - Vertex_Size : constant := 2; - - Vertices : Table_Id := No_Table; - -- Vertex table of the random graph G - - NV : Natural; - -- Number of Vertices - - function Get_Vertices (F : Natural) return Vertex_Type; - procedure Set_Vertices (F : Natural; Item : Vertex_Type); - -- Comments needed ??? - - K2V : Float; - -- Ratio between Keys and Vertices (parameter of Czech's algorithm) - - Opt : Optimization; - -- Optimization mode (memory vs CPU) - - Max_Key_Len : Natural := 0; - Min_Key_Len : Natural := 0; - -- Maximum and minimum of all the word length - - S : Natural; - -- Seed - - function Type_Size (L : Natural) return Natural; - -- Given the last L of an unsigned integer type T, return its size - - ------------- - -- Acyclic -- - ------------- - - function Acyclic return Boolean is - Marks : array (0 .. NV - 1) of Vertex_Id := (others => No_Vertex); - - function Traverse (Edge : Edge_Id; Mark : Vertex_Id) return Boolean; - -- Propagate Mark from X to Y. X is already marked. Mark Y and propagate - -- it to the edges of Y except the one representing the same key. Return - -- False when Y is marked with Mark. - - -------------- - -- Traverse -- - -------------- - - function Traverse (Edge : Edge_Id; Mark : Vertex_Id) return Boolean is - E : constant Edge_Type := Get_Edges (Edge); - K : constant Key_Id := E.Key; - Y : constant Vertex_Id := E.Y; - M : constant Vertex_Id := Marks (E.Y); - V : Vertex_Type; - - begin - if M = Mark then - return False; - - elsif M = No_Vertex then - Marks (Y) := Mark; - V := Get_Vertices (Y); - - for J in V.First .. V.Last loop - - -- Do not propagate to the edge representing the same key - - if Get_Edges (J).Key /= K - and then not Traverse (J, Mark) - then - return False; - end if; - end loop; - end if; - - return True; - end Traverse; - - Edge : Edge_Type; - - -- Start of processing for Acyclic - - begin - -- Edges valid range is - - for J in 1 .. Edges_Len - 1 loop - - Edge := Get_Edges (J); - - -- Mark X of E when it has not been already done - - if Marks (Edge.X) = No_Vertex then - Marks (Edge.X) := Edge.X; - end if; - - -- Traverse E when this has not already been done - - if Marks (Edge.Y) = No_Vertex - and then not Traverse (J, Edge.X) - then - return False; - end if; - end loop; - - return True; - end Acyclic; - ------------------------ -- Ada_File_Base_Name -- ------------------------ @@ -547,559 +144,25 @@ package body GNAT.Perfect_Hash_Generators is Last := Last + Len; end Add; - -------------- - -- Allocate -- - -------------- - - function Allocate (N : Natural; S : Natural := 1) return Table_Id is - L : constant Integer := IT.Last; - begin - IT.Set_Last (L + N * S); - - -- Initialize, so debugging printouts don't trip over uninitialized - -- components. - - for J in L + 1 .. IT.Last loop - IT.Table (J) := -1; - end loop; - - return L + 1; - end Allocate; - - ------------------------------ - -- Apply_Position_Selection -- - ------------------------------ - - procedure Apply_Position_Selection is - begin - for J in 0 .. NK - 1 loop - declare - IW : constant String := WT.Table (Initial (J)).all; - RW : String (1 .. IW'Length) := (others => ASCII.NUL); - N : Natural := IW'First - 1; - - begin - -- Select the characters of Word included in the position - -- selection. - - for C in 0 .. Char_Pos_Set_Len - 1 loop - exit when IW (Get_Char_Pos (C)) = ASCII.NUL; - N := N + 1; - RW (N) := IW (Get_Char_Pos (C)); - end loop; - - -- Build the new table with the reduced word. Be careful - -- to deallocate the old version to avoid memory leaks. - - Free_Word (WT.Table (Reduced (J))); - WT.Table (Reduced (J)) := New_Word (RW); - Set_Key (J, (Edge => No_Edge)); - end; - end loop; - end Apply_Position_Selection; - - ------------------------------- - -- Assign_Values_To_Vertices -- - ------------------------------- - - procedure Assign_Values_To_Vertices is - X : Vertex_Id; - - procedure Assign (X : Vertex_Id); - -- Execute assignment on X's neighbors except the vertex that we are - -- coming from which is already assigned. - - ------------ - -- Assign -- - ------------ - - procedure Assign (X : Vertex_Id) is - E : Edge_Type; - V : constant Vertex_Type := Get_Vertices (X); - - begin - for J in V.First .. V.Last loop - E := Get_Edges (J); - - if Get_Graph (E.Y) = -1 then - pragma Assert (NK /= 0); - Set_Graph (E.Y, (E.Key - Get_Graph (X)) mod NK); - Assign (E.Y); - end if; - end loop; - end Assign; - - -- Start of processing for Assign_Values_To_Vertices - - begin - -- Value -1 denotes an uninitialized value as it is supposed to - -- be in the range 0 .. NK. - - if G = No_Table then - G_Len := NV; - G := Allocate (G_Len, 1); - end if; - - for J in 0 .. G_Len - 1 loop - Set_Graph (J, -1); - end loop; - - for K in 0 .. NK - 1 loop - X := Get_Edges (Get_Key (K).Edge).X; - - if Get_Graph (X) = -1 then - Set_Graph (X, 0); - Assign (X); - end if; - end loop; - - for J in 0 .. G_Len - 1 loop - if Get_Graph (J) = -1 then - Set_Graph (J, 0); - end if; - end loop; - - if Verbose then - Put_Int_Vector (Output, "Assign Values To Vertices", G, G_Len); - end if; - end Assign_Values_To_Vertices; - ------------- -- Compute -- ------------- procedure Compute (Position : String := Default_Position) is - Success : Boolean := False; - begin - if NK = 0 then - raise Program_Error with "keywords set cannot be empty"; - end if; - - if Verbose then - Put_Initial_Keys (Output, "Initial Key Table"); - end if; - - if Position'Length /= 0 then - Parse_Position_Selection (Position); - else - Select_Char_Position; - end if; - - if Verbose then - Put_Int_Vector - (Output, "Char Position Set", Char_Pos_Set, Char_Pos_Set_Len); - end if; - - Apply_Position_Selection; - - if Verbose then - Put_Reduced_Keys (Output, "Reduced Keys Table"); - end if; - - Select_Character_Set; - - if Verbose then - Put_Used_Char_Set (Output, "Character Position Table"); - end if; - - -- Perform Czech's algorithm - - for J in 1 .. NT loop - Generate_Mapping_Tables (Opt, S); - Compute_Edges_And_Vertices (Opt); - - -- When graph is not empty (no self-loop from previous operation) and - -- not acyclic. - - if 0 < Edges_Len and then Acyclic then - Success := True; - exit; - end if; - end loop; - - if not Success then - raise Too_Many_Tries; - end if; - - Assign_Values_To_Vertices; + SPHG.Compute (Position); end Compute; - -------------------------------- - -- Compute_Edges_And_Vertices -- - -------------------------------- - - procedure Compute_Edges_And_Vertices (Opt : Optimization) is - X : Natural; - Y : Natural; - Key : Key_Type; - Edge : Edge_Type; - Vertex : Vertex_Type; - Not_Acyclic : Boolean := False; - - procedure Move (From : Natural; To : Natural); - function Lt (L, R : Natural) return Boolean; - -- Subprograms needed for GNAT.Heap_Sort_G - - -------- - -- Lt -- - -------- - - function Lt (L, R : Natural) return Boolean is - EL : constant Edge_Type := Get_Edges (L); - ER : constant Edge_Type := Get_Edges (R); - begin - return EL.X < ER.X or else (EL.X = ER.X and then EL.Y < ER.Y); - end Lt; - - ---------- - -- Move -- - ---------- - - procedure Move (From : Natural; To : Natural) is - begin - Set_Edges (To, Get_Edges (From)); - end Move; - - package Sorting is new GNAT.Heap_Sort_G (Move, Lt); - - -- Start of processing for Compute_Edges_And_Vertices - - begin - -- We store edges from 1 to 2 * NK and leave zero alone in order to use - -- GNAT.Heap_Sort_G. - - Edges_Len := 2 * NK + 1; - - if Edges = No_Table then - Edges := Allocate (Edges_Len, Edge_Size); - end if; - - if Vertices = No_Table then - Vertices := Allocate (NV, Vertex_Size); - end if; - - for J in 0 .. NV - 1 loop - Set_Vertices (J, (No_Vertex, No_Vertex - 1)); - end loop; - - -- For each w, X = f1 (w) and Y = f2 (w) - - for J in 0 .. NK - 1 loop - Key := Get_Key (J); - Key.Edge := No_Edge; - Set_Key (J, Key); - - X := Sum (WT.Table (Reduced (J)), T1, Opt); - Y := Sum (WT.Table (Reduced (J)), T2, Opt); - - -- Discard T1 and T2 as soon as we discover a self loop - - if X = Y then - Not_Acyclic := True; - exit; - end if; - - -- We store (X, Y) and (Y, X) to ease assignment step - - Set_Edges (2 * J + 1, (X, Y, J)); - Set_Edges (2 * J + 2, (Y, X, J)); - end loop; - - -- Return an empty graph when self loop detected - - if Not_Acyclic then - Edges_Len := 0; - - else - if Verbose then - Put_Edges (Output, "Unsorted Edge Table"); - Put_Int_Matrix (Output, "Function Table 1", T1, - T1_Len, T2_Len); - Put_Int_Matrix (Output, "Function Table 2", T2, - T1_Len, T2_Len); - end if; - - -- Enforce consistency between edges and keys. Construct Vertices and - -- compute the list of neighbors of a vertex First .. Last as Edges - -- is sorted by X and then Y. To compute the neighbor list, sort the - -- edges. - - Sorting.Sort (Edges_Len - 1); - - if Verbose then - Put_Edges (Output, "Sorted Edge Table"); - Put_Int_Matrix (Output, "Function Table 1", T1, - T1_Len, T2_Len); - Put_Int_Matrix (Output, "Function Table 2", T2, - T1_Len, T2_Len); - end if; - - -- Edges valid range is 1 .. 2 * NK - - for E in 1 .. Edges_Len - 1 loop - Edge := Get_Edges (E); - Key := Get_Key (Edge.Key); - - if Key.Edge = No_Edge then - Key.Edge := E; - Set_Key (Edge.Key, Key); - end if; - - Vertex := Get_Vertices (Edge.X); - - if Vertex.First = No_Edge then - Vertex.First := E; - end if; - - Vertex.Last := E; - Set_Vertices (Edge.X, Vertex); - end loop; - - if Verbose then - Put_Reduced_Keys (Output, "Key Table"); - Put_Edges (Output, "Edge Table"); - Put_Vertex_Table (Output, "Vertex Table"); - end if; - end if; - end Compute_Edges_And_Vertices; - - ------------ - -- Define -- - ------------ - - procedure Define - (Name : Table_Name; - Item_Size : out Natural; - Length_1 : out Natural; - Length_2 : out Natural) - is - begin - case Name is - when Character_Position => - Item_Size := 8; - Length_1 := Char_Pos_Set_Len; - Length_2 := 0; - - when Used_Character_Set => - Item_Size := 8; - Length_1 := 256; - Length_2 := 0; - - when Function_Table_1 - | Function_Table_2 - => - Item_Size := Type_Size (NV); - Length_1 := T1_Len; - Length_2 := T2_Len; - - when Graph_Table => - Item_Size := Type_Size (NK); - Length_1 := NV; - Length_2 := 0; - end case; - end Define; - -------------- -- Finalize -- -------------- procedure Finalize is begin - if Verbose then - Put (Output, "Finalize"); - New_Line (Output); - end if; - - -- Deallocate all the WT components (both initial and reduced ones) to - -- avoid memory leaks. - - for W in 0 .. WT.Last loop - - -- Note: WT.Table (NK) is a temporary variable, do not free it since - -- this would cause a double free. - - if W /= NK then - Free_Word (WT.Table (W)); - end if; - end loop; - - WT.Release; - IT.Release; - - -- Reset all variables for next usage - - Keys := No_Table; - - Char_Pos_Set := No_Table; - Char_Pos_Set_Len := 0; - - Used_Char_Set := No_Table; - Used_Char_Set_Len := 0; - - T1 := No_Table; - T2 := No_Table; - - T1_Len := 0; - T2_Len := 0; - - G := No_Table; - G_Len := 0; - - Edges := No_Table; - Edges_Len := 0; - - Vertices := No_Table; - NV := 0; - NK := 0; - Max_Key_Len := 0; - Min_Key_Len := 0; + SPHG.Finalize; end Finalize; - ---------------------------- - -- Generate_Mapping_Table -- - ---------------------------- - - procedure Generate_Mapping_Table - (Tab : Integer; - L1 : Natural; - L2 : Natural; - Seed : in out Natural) - is - begin - for J in 0 .. L1 - 1 loop - for K in 0 .. L2 - 1 loop - Random (Seed); - Set_Table (Tab, J, K, Seed mod NV); - end loop; - end loop; - end Generate_Mapping_Table; - - ----------------------------- - -- Generate_Mapping_Tables -- - ----------------------------- - - procedure Generate_Mapping_Tables - (Opt : Optimization; - Seed : in out Natural) - is - begin - -- If T1 and T2 are already allocated no need to do it twice. Reuse them - -- as their size has not changed. - - if T1 = No_Table and then T2 = No_Table then - declare - Used_Char_Last : Natural := 0; - Used_Char : Natural; - - begin - if Opt = CPU_Time then - for P in reverse Character'Range loop - Used_Char := Get_Used_Char (P); - if Used_Char /= 0 then - Used_Char_Last := Used_Char; - exit; - end if; - end loop; - end if; - - T1_Len := Char_Pos_Set_Len; - T2_Len := Used_Char_Last + 1; - T1 := Allocate (T1_Len * T2_Len); - T2 := Allocate (T1_Len * T2_Len); - end; - end if; - - Generate_Mapping_Table (T1, T1_Len, T2_Len, Seed); - Generate_Mapping_Table (T2, T1_Len, T2_Len, Seed); - - if Verbose then - Put_Used_Char_Set (Output, "Used Character Set"); - Put_Int_Matrix (Output, "Function Table 1", T1, - T1_Len, T2_Len); - Put_Int_Matrix (Output, "Function Table 2", T2, - T1_Len, T2_Len); - end if; - end Generate_Mapping_Tables; - - ------------------ - -- Get_Char_Pos -- - ------------------ - - function Get_Char_Pos (P : Natural) return Natural is - N : constant Natural := Char_Pos_Set + P; - begin - return IT.Table (N); - end Get_Char_Pos; - - --------------- - -- Get_Edges -- - --------------- - - function Get_Edges (F : Natural) return Edge_Type is - N : constant Natural := Edges + (F * Edge_Size); - E : Edge_Type; - begin - E.X := IT.Table (N); - E.Y := IT.Table (N + 1); - E.Key := IT.Table (N + 2); - return E; - end Get_Edges; - - --------------- - -- Get_Graph -- - --------------- - - function Get_Graph (N : Natural) return Integer is - begin - return IT.Table (G + N); - end Get_Graph; - - ------------- - -- Get_Key -- - ------------- - - function Get_Key (N : Key_Id) return Key_Type is - K : Key_Type; - begin - K.Edge := IT.Table (Keys + N); - return K; - end Get_Key; - - --------------- - -- Get_Table -- - --------------- - - function Get_Table (T : Integer; X, Y : Natural) return Natural is - N : constant Natural := T + (Y * T1_Len) + X; - begin - return IT.Table (N); - end Get_Table; - - ------------------- - -- Get_Used_Char -- - ------------------- - - function Get_Used_Char (C : Character) return Natural is - N : constant Natural := Used_Char_Set + Character'Pos (C); - begin - return IT.Table (N); - end Get_Used_Char; - - ------------------ - -- Get_Vertices -- - ------------------ - - function Get_Vertices (F : Natural) return Vertex_Type is - N : constant Natural := Vertices + (F * Vertex_Size); - V : Vertex_Type; - begin - V.First := IT.Table (N); - V.Last := IT.Table (N + 1); - return V; - end Get_Vertices; - ----------- -- Image -- ----------- @@ -1164,15 +227,6 @@ package body GNAT.Perfect_Hash_Generators is end; end Image; - ------------- - -- Initial -- - ------------- - - function Initial (K : Key_Id) return Word_Id is - begin - return K; - end Initial; - ---------------- -- Initialize -- ---------------- @@ -1183,87 +237,11 @@ package body GNAT.Perfect_Hash_Generators is Optim : Optimization := Memory_Space; Tries : Positive := Default_Tries) is - begin - if Verbose then - Put (Output, "Initialize"); - New_Line (Output); - end if; - - -- Deallocate the part of the table concerning the reduced words. - -- Initial words are already present in the table. We may have reduced - -- words already there because a previous computation failed. We are - -- currently retrying and the reduced words have to be deallocated. - - for W in Reduced (0) .. WT.Last loop - Free_Word (WT.Table (W)); - end loop; - - IT.Init; - - -- Initialize of computation variables - - Keys := No_Table; - - Char_Pos_Set := No_Table; - Char_Pos_Set_Len := 0; - - Used_Char_Set := No_Table; - Used_Char_Set_Len := 0; - - T1 := No_Table; - T2 := No_Table; - - T1_Len := 0; - T2_Len := 0; - - G := No_Table; - G_Len := 0; - - Edges := No_Table; - Edges_Len := 0; + V : constant Positive := Positive (Float (NK) * K_To_V); - Vertices := No_Table; - NV := 0; - - S := Seed; - K2V := K_To_V; - Opt := Optim; - NT := Tries; - - if K2V <= 2.0 then - raise Program_Error with "K to V ratio cannot be lower than 2.0"; - end if; - - -- Do not accept a value of K2V too close to 2.0 such that once - -- rounded up, NV = 2 * NK because the algorithm would not converge. - - NV := Natural (Float (NK) * K2V); - if NV <= 2 * NK then - NV := 2 * NK + 1; - end if; - - Keys := Allocate (NK); - - -- Resize initial words to have all of them at the same size - -- (so the size of the largest one). - - for K in 0 .. NK - 1 loop - Resize_Word (WT.Table (Initial (K)), Max_Key_Len); - end loop; - - -- Allocated the table to store the reduced words. As WT is a - -- GNAT.Table (using C memory management), pointers have to be - -- explicitly initialized to null. - - WT.Set_Last (Reduced (NK - 1)); - - -- Note: Reduced (0) = NK + 1 - - WT.Table (NK) := null; - - for W in 0 .. NK - 1 loop - WT.Table (Reduced (W)) := null; - end loop; + begin + Opt := Optim; + SPHG.Initialize (Seed, V, SPHG.Optimization (Optim), Tries); end Initialize; ------------ @@ -1271,30 +249,9 @@ package body GNAT.Perfect_Hash_Generators is ------------ procedure Insert (Value : String) is - Len : constant Natural := Value'Length; - begin - if Verbose then - Put (Output, "Inserting """ & Value & """"); - New_Line (Output); - end if; - - for J in Value'Range loop - pragma Assert (Value (J) /= ASCII.NUL); - null; - end loop; - - WT.Set_Last (NK); - WT.Table (NK) := New_Word (Value); NK := NK + 1; - - if Max_Key_Len < Len then - Max_Key_Len := Len; - end if; - - if Min_Key_Len = 0 or else Len < Min_Key_Len then - Min_Key_Len := Len; - end if; + SPHG.Insert (Value); end Insert; -------------- @@ -1308,126 +265,6 @@ package body GNAT.Perfect_Hash_Generators is end if; end New_Line; - -------------- - -- New_Word -- - -------------- - - function New_Word (S : String) return Word_Type is - begin - return new String'(S); - end New_Word; - - ------------------------------ - -- Parse_Position_Selection -- - ------------------------------ - - procedure Parse_Position_Selection (Argument : String) is - N : Natural := Argument'First; - L : constant Natural := Argument'Last; - M : constant Natural := Max_Key_Len; - - T : array (1 .. M) of Boolean := (others => False); - - function Parse_Index return Natural; - -- Parse argument starting at index N to find an index - - ----------------- - -- Parse_Index -- - ----------------- - - function Parse_Index return Natural is - C : Character := Argument (N); - V : Natural := 0; - - begin - if C = '$' then - N := N + 1; - return M; - end if; - - if C not in '0' .. '9' then - raise Program_Error with "cannot read position argument"; - end if; - - while C in '0' .. '9' loop - V := V * 10 + (Character'Pos (C) - Character'Pos ('0')); - N := N + 1; - exit when L < N; - C := Argument (N); - end loop; - - return V; - end Parse_Index; - - -- Start of processing for Parse_Position_Selection - - begin - -- Empty specification means all the positions - - if L < N then - Char_Pos_Set_Len := M; - Char_Pos_Set := Allocate (Char_Pos_Set_Len); - - for C in 0 .. Char_Pos_Set_Len - 1 loop - Set_Char_Pos (C, C + 1); - end loop; - - else - loop - declare - First, Last : Natural; - - begin - First := Parse_Index; - Last := First; - - -- Detect a range - - if N <= L and then Argument (N) = '-' then - N := N + 1; - Last := Parse_Index; - end if; - - -- Include the positions in the selection - - for J in First .. Last loop - T (J) := True; - end loop; - end; - - exit when L < N; - - if Argument (N) /= ',' then - raise Program_Error with "cannot read position argument"; - end if; - - N := N + 1; - end loop; - - -- Compute position selection length - - N := 0; - for J in T'Range loop - if T (J) then - N := N + 1; - end if; - end loop; - - -- Fill position selection - - Char_Pos_Set_Len := N; - Char_Pos_Set := Allocate (Char_Pos_Set_Len); - - N := 0; - for J in T'Range loop - if T (J) then - Set_Char_Pos (N, J); - N := N + 1; - end if; - end loop; - end if; - end Parse_Position_Selection; - ------------- -- Produce -- ------------- @@ -1438,6 +275,9 @@ package body GNAT.Perfect_Hash_Generators is is File : File_Descriptor := Standout; + Siz, L1, L2 : Natural; + -- For calls to Define + Status : Boolean; -- For call to Close @@ -1447,8 +287,8 @@ package body GNAT.Perfect_Hash_Generators is function Range_Img (F, L : Natural; T : String := "") return String; -- Return string "[T range ]F .. L" - function Type_Img (L : Natural) return String; - -- Return the larger unsigned type T such that T'Last < L + function Type_Img (Siz : Positive) return String; + -- Return the name of the unsigned type of size S --------------- -- Array_Img -- @@ -1510,8 +350,8 @@ package body GNAT.Perfect_Hash_Generators is -- Type_Img -- -------------- - function Type_Img (L : Natural) return String is - S : constant String := Image (Type_Size (L)); + function Type_Img (Siz : Positive) return String is + S : constant String := Image (Siz); U : String := "Unsigned_ "; N : Natural := 9; @@ -1524,8 +364,6 @@ package body GNAT.Perfect_Hash_Generators is return U (1 .. N); end Type_Img; - F : Natural; - L : Natural; P : Natural; FName : String := Ada_File_Base_Name (Pkg_Name) & ".ads"; @@ -1535,13 +373,6 @@ package body GNAT.Perfect_Hash_Generators is -- Start of processing for Produce begin - - if Verbose and then not Use_Stdout then - Put (Output, - "Producing " & Ada.Directories.Current_Directory & "/" & FName); - New_Line (Output); - end if; - if not Use_Stdout then File := Create_File (FName, Binary); @@ -1592,75 +423,89 @@ package body GNAT.Perfect_Hash_Generators is New_Line (File); if Opt = CPU_Time then - Put (File, Array_Img ("C", Type_Img (256), "Character")); - New_Line (File); + -- The format of this table is fixed - F := Character'Pos (Character'First); - L := Character'Pos (Character'Last); + Define (Used_Character_Set, Siz, L1, L2); + pragma Assert (L1 = 256 and then L2 = 0); + + Put (File, Array_Img ("C", Type_Img (Siz), "Character")); + New_Line (File); - for J in Character'Range loop - P := Get_Used_Char (J); - Put (File, Image (P), 1, 0, 1, F, L, Character'Pos (J)); + for J in 0 .. 255 loop + P := Value (Used_Character_Set, J); + Put (File, Image (P), 1, 0, 1, 0, 255, J); end loop; New_Line (File); end if; - F := 0; - L := Char_Pos_Set_Len - 1; + Define (Character_Position, Siz, L1, L2); + pragma Assert (Siz = 31 and then L2 = 0); - Put (File, Array_Img ("P", "Natural", Range_Img (F, L))); + Put (File, Array_Img ("P", "Natural", Range_Img (0, L1 - 1))); New_Line (File); - for J in F .. L loop - Put (File, Image (Get_Char_Pos (J)), 1, 0, 1, F, L, J); + for J in 0 .. L1 - 1 loop + P := Value (Character_Position, J); + Put (File, Image (P), 1, 0, 1, 0, L1 - 1, J); end loop; New_Line (File); + Define (Function_Table_1, Siz, L1, L2); + case Opt is when CPU_Time => Put_Int_Matrix (File, - Array_Img ("T1", Type_Img (NV), - Range_Img (0, T1_Len - 1), - Range_Img (0, T2_Len - 1, Type_Img (256))), - T1, T1_Len, T2_Len); + Array_Img ("T1", Type_Img (Siz), + Range_Img (0, L1 - 1), + Range_Img (0, L2 - 1, Type_Img (8))), + Function_Table_1, L1, L2); when Memory_Space => Put_Int_Matrix (File, - Array_Img ("T1", Type_Img (NV), - Range_Img (0, T1_Len - 1)), - T1, T1_Len, 0); + Array_Img ("T1", Type_Img (Siz), + Range_Img (0, L1 - 1)), + Function_Table_1, L1, 0); end case; New_Line (File); + Define (Function_Table_2, Siz, L1, L2); + case Opt is when CPU_Time => Put_Int_Matrix (File, - Array_Img ("T2", Type_Img (NV), - Range_Img (0, T1_Len - 1), - Range_Img (0, T2_Len - 1, Type_Img (256))), - T2, T1_Len, T2_Len); + Array_Img ("T2", Type_Img (Siz), + Range_Img (0, L1 - 1), + Range_Img (0, L2 - 1, Type_Img (8))), + Function_Table_2, L1, L2); when Memory_Space => Put_Int_Matrix (File, - Array_Img ("T2", Type_Img (NV), - Range_Img (0, T1_Len - 1)), - T2, T1_Len, 0); + Array_Img ("T2", Type_Img (Siz), + Range_Img (0, L1 - 1)), + Function_Table_2, L1, 0); end case; New_Line (File); - Put_Int_Vector - (File, - Array_Img ("G", Type_Img (NK), - Range_Img (0, G_Len - 1)), - G, G_Len); + Define (Graph_Table, Siz, L1, L2); + pragma Assert (L2 = 0); + + Put (File, Array_Img ("G", Type_Img (Siz), + Range_Img (0, L1 - 1))); + New_Line (File); + + for J in 0 .. L1 - 1 loop + P := Value (Graph_Table, J); + Put (File, Image (P), 1, 0, 1, 0, L1 - 1, J); + end loop; + New_Line (File); Put (File, " function Hash (S : String) return Natural is"); @@ -1676,7 +521,7 @@ package body GNAT.Perfect_Hash_Generators is case Opt is when CPU_Time => - Put (File, Type_Img (256)); + Put (File, Type_Img (8)); when Memory_Space => Put (File, "Natural"); @@ -1717,7 +562,7 @@ package body GNAT.Perfect_Hash_Generators is end if; Put (File, ") mod "); - Put (File, Image (NV)); + Put (File, Image (L1)); Put (File, ";"); New_Line (File); @@ -1734,7 +579,7 @@ package body GNAT.Perfect_Hash_Generators is end if; Put (File, ") mod "); - Put (File, Image (NV)); + Put (File, Image (L1)); Put (File, ";"); New_Line (File); @@ -1874,54 +719,6 @@ package body GNAT.Perfect_Hash_Generators is end if; end Put; - --------------- - -- Put_Edges -- - --------------- - - procedure Put_Edges (File : File_Descriptor; Title : String) is - E : Edge_Type; - F1 : constant Natural := 1; - L1 : constant Natural := Edges_Len - 1; - M : constant Natural := Max / 5; - - begin - Put (File, Title); - New_Line (File); - - -- Edges valid range is 1 .. Edge_Len - 1 - - for J in F1 .. L1 loop - E := Get_Edges (J); - Put (File, Image (J, M), F1, L1, J, 1, 4, 1); - Put (File, Image (E.X, M), F1, L1, J, 1, 4, 2); - Put (File, Image (E.Y, M), F1, L1, J, 1, 4, 3); - Put (File, Image (E.Key, M), F1, L1, J, 1, 4, 4); - end loop; - end Put_Edges; - - ---------------------- - -- Put_Initial_Keys -- - ---------------------- - - procedure Put_Initial_Keys (File : File_Descriptor; Title : String) is - F1 : constant Natural := 0; - L1 : constant Natural := NK - 1; - M : constant Natural := Max / 5; - K : Key_Type; - - begin - Put (File, Title); - New_Line (File); - - for J in F1 .. L1 loop - K := Get_Key (J); - Put (File, Image (J, M), F1, L1, J, 1, 3, 1); - Put (File, Image (K.Edge, M), F1, L1, J, 1, 3, 2); - Put (File, Trim_Trailing_Nuls (WT.Table (Initial (J)).all), - F1, L1, J, 1, 3, 3); - end loop; - end Put_Initial_Keys; - -------------------- -- Put_Int_Matrix -- -------------------- @@ -1929,7 +726,7 @@ package body GNAT.Perfect_Hash_Generators is procedure Put_Int_Matrix (File : File_Descriptor; Title : String; - Table : Integer; + Table : Table_Name; Len_1 : Natural; Len_2 : Natural) is @@ -1945,665 +742,18 @@ package body GNAT.Perfect_Hash_Generators is if Len_2 = 0 then for J in F1 .. L1 loop - Ix := IT.Table (Table + J); + Ix := Value (Table, J, 0); Put (File, Image (Ix), 1, 0, 1, F1, L1, J); end loop; else for J in F1 .. L1 loop for K in F2 .. L2 loop - Ix := IT.Table (Table + J + K * Len_1); + Ix := Value (Table, J, K); Put (File, Image (Ix), F1, L1, J, F2, L2, K); end loop; end loop; end if; end Put_Int_Matrix; - -------------------- - -- Put_Int_Vector -- - -------------------- - - procedure Put_Int_Vector - (File : File_Descriptor; - Title : String; - Vector : Integer; - Length : Natural) - is - F2 : constant Natural := 0; - L2 : constant Natural := Length - 1; - - begin - Put (File, Title); - New_Line (File); - - for J in F2 .. L2 loop - Put (File, Image (IT.Table (Vector + J)), 1, 0, 1, F2, L2, J); - end loop; - end Put_Int_Vector; - - ---------------------- - -- Put_Reduced_Keys -- - ---------------------- - - procedure Put_Reduced_Keys (File : File_Descriptor; Title : String) is - F1 : constant Natural := 0; - L1 : constant Natural := NK - 1; - M : constant Natural := Max / 5; - K : Key_Type; - - begin - Put (File, Title); - New_Line (File); - - for J in F1 .. L1 loop - K := Get_Key (J); - Put (File, Image (J, M), F1, L1, J, 1, 3, 1); - Put (File, Image (K.Edge, M), F1, L1, J, 1, 3, 2); - Put (File, Trim_Trailing_Nuls (WT.Table (Reduced (J)).all), - F1, L1, J, 1, 3, 3); - end loop; - end Put_Reduced_Keys; - - ----------------------- - -- Put_Used_Char_Set -- - ----------------------- - - procedure Put_Used_Char_Set (File : File_Descriptor; Title : String) is - F : constant Natural := Character'Pos (Character'First); - L : constant Natural := Character'Pos (Character'Last); - - begin - Put (File, Title); - New_Line (File); - - for J in Character'Range loop - Put - (File, Image (Get_Used_Char (J)), 1, 0, 1, F, L, Character'Pos (J)); - end loop; - end Put_Used_Char_Set; - - ---------------------- - -- Put_Vertex_Table -- - ---------------------- - - procedure Put_Vertex_Table (File : File_Descriptor; Title : String) is - F1 : constant Natural := 0; - L1 : constant Natural := NV - 1; - M : constant Natural := Max / 4; - V : Vertex_Type; - - begin - Put (File, Title); - New_Line (File); - - for J in F1 .. L1 loop - V := Get_Vertices (J); - Put (File, Image (J, M), F1, L1, J, 1, 3, 1); - Put (File, Image (V.First, M), F1, L1, J, 1, 3, 2); - Put (File, Image (V.Last, M), F1, L1, J, 1, 3, 3); - end loop; - end Put_Vertex_Table; - - ------------ - -- Random -- - ------------ - - procedure Random (Seed : in out Natural) is - - -- Park & Miller Standard Minimal using Schrage's algorithm to avoid - -- overflow: Xn+1 = 16807 * Xn mod (2 ** 31 - 1) - - R : Natural; - Q : Natural; - X : Integer; - - begin - R := Seed mod 127773; - Q := Seed / 127773; - X := 16807 * R - 2836 * Q; - - Seed := (if X < 0 then X + 2147483647 else X); - end Random; - - ------------- - -- Reduced -- - ------------- - - function Reduced (K : Key_Id) return Word_Id is - begin - return K + NK + 1; - end Reduced; - - ----------------- - -- Resize_Word -- - ----------------- - - procedure Resize_Word (W : in out Word_Type; Len : Natural) is - S1 : constant String := W.all; - S2 : String (1 .. Len) := (others => ASCII.NUL); - L : constant Natural := S1'Length; - begin - if L /= Len then - Free_Word (W); - S2 (1 .. L) := S1; - W := New_Word (S2); - end if; - end Resize_Word; - - -------------------------- - -- Select_Char_Position -- - -------------------------- - - procedure Select_Char_Position is - - type Vertex_Table_Type is array (Natural range <>) of Vertex_Type; - - procedure Build_Identical_Keys_Sets - (Table : in out Vertex_Table_Type; - Last : in out Natural; - Pos : Natural); - -- Build a list of keys subsets that are identical with the current - -- position selection plus Pos. Once this routine is called, reduced - -- words are sorted by subsets and each item (First, Last) in Sets - -- defines the range of identical keys. - -- Need comment saying exactly what Last is ??? - - function Count_Different_Keys - (Table : Vertex_Table_Type; - Last : Natural; - Pos : Natural) return Natural; - -- For each subset in Sets, count the number of different keys if we add - -- Pos to the current position selection. - - Sel_Position : IT.Table_Type (1 .. Max_Key_Len); - Last_Sel_Pos : Natural := 0; - Max_Sel_Pos : Natural := 0; - - ------------------------------- - -- Build_Identical_Keys_Sets -- - ------------------------------- - - procedure Build_Identical_Keys_Sets - (Table : in out Vertex_Table_Type; - Last : in out Natural; - Pos : Natural) - is - S : constant Vertex_Table_Type := Table (Table'First .. Last); - C : constant Natural := Pos; - -- Shortcuts (why are these not renames ???) - - F : Integer; - L : Integer; - -- First and last words of a subset - - Offset : Natural; - -- GNAT.Heap_Sort assumes that the first array index is 1. Offset - -- defines the translation to operate. - - function Lt (L, R : Natural) return Boolean; - procedure Move (From : Natural; To : Natural); - -- Subprograms needed by GNAT.Heap_Sort_G - - -------- - -- Lt -- - -------- - - function Lt (L, R : Natural) return Boolean is - C : constant Natural := Pos; - Left : Natural; - Right : Natural; - - begin - if L = 0 then - Left := NK; - Right := Offset + R; - elsif R = 0 then - Left := Offset + L; - Right := NK; - else - Left := Offset + L; - Right := Offset + R; - end if; - - return WT.Table (Left)(C) < WT.Table (Right)(C); - end Lt; - - ---------- - -- Move -- - ---------- - - procedure Move (From : Natural; To : Natural) is - Target, Source : Natural; - - begin - if From = 0 then - Source := NK; - Target := Offset + To; - elsif To = 0 then - Source := Offset + From; - Target := NK; - else - Source := Offset + From; - Target := Offset + To; - end if; - - WT.Table (Target) := WT.Table (Source); - WT.Table (Source) := null; - end Move; - - package Sorting is new GNAT.Heap_Sort_G (Move, Lt); - - -- Start of processing for Build_Identical_Key_Sets - - begin - Last := 0; - - -- For each subset in S, extract the new subsets we have by adding C - -- in the position selection. - - for J in S'Range loop - pragma Annotate (CodePeer, Modified, S (J)); - - if S (J).First = S (J).Last then - F := S (J).First; - L := S (J).Last; - Last := Last + 1; - Table (Last) := (F, L); - - else - Offset := Reduced (S (J).First) - 1; - Sorting.Sort (S (J).Last - S (J).First + 1); - - F := S (J).First; - L := F; - for N in S (J).First .. S (J).Last loop - - -- For the last item, close the last subset - - if N = S (J).Last then - Last := Last + 1; - Table (Last) := (F, N); - - -- Two contiguous words are identical when they have the - -- same Cth character. - - elsif WT.Table (Reduced (N))(C) = - WT.Table (Reduced (N + 1))(C) - then - L := N + 1; - - -- Find a new subset of identical keys. Store the current - -- one and create a new subset. - - else - Last := Last + 1; - Table (Last) := (F, L); - F := N + 1; - L := F; - end if; - end loop; - end if; - end loop; - end Build_Identical_Keys_Sets; - - -------------------------- - -- Count_Different_Keys -- - -------------------------- - - function Count_Different_Keys - (Table : Vertex_Table_Type; - Last : Natural; - Pos : Natural) return Natural - is - N : array (Character) of Natural; - C : Character; - T : Natural := 0; - - begin - -- For each subset, count the number of words that are still - -- different when we include Pos in the position selection. Only - -- focus on this position as the other positions already produce - -- identical keys. - - for S in 1 .. Last loop - - -- Count the occurrences of the different characters - - N := (others => 0); - for K in Table (S).First .. Table (S).Last loop - C := WT.Table (Reduced (K))(Pos); - N (C) := N (C) + 1; - end loop; - - -- Update the number of different keys. Each character used - -- denotes a different key. - - for J in N'Range loop - if N (J) > 0 then - T := T + 1; - end if; - end loop; - end loop; - - return T; - end Count_Different_Keys; - - -- Start of processing for Select_Char_Position - - begin - -- Initialize the reduced words set - - for K in 0 .. NK - 1 loop - WT.Table (Reduced (K)) := New_Word (WT.Table (Initial (K)).all); - end loop; - - declare - Differences : Natural; - Max_Differences : Natural := 0; - Old_Differences : Natural; - Max_Diff_Sel_Pos : Natural := 0; -- init to kill warning - Max_Diff_Sel_Pos_Idx : Natural := 0; -- init to kill warning - Same_Keys_Sets_Table : Vertex_Table_Type (1 .. NK); - Same_Keys_Sets_Last : Natural := 1; - - begin - for C in Sel_Position'Range loop - Sel_Position (C) := C; - end loop; - - Same_Keys_Sets_Table (1) := (0, NK - 1); - - loop - -- Preserve maximum number of different keys and check later on - -- that this value is strictly incrementing. Otherwise, it means - -- that two keys are strictly identical. - - Old_Differences := Max_Differences; - - -- The first position should not exceed the minimum key length. - -- Otherwise, we may end up with an empty word once reduced. - - Max_Sel_Pos := - (if Last_Sel_Pos = 0 then Min_Key_Len else Max_Key_Len); - - -- Find which position increases more the number of differences - - for J in Last_Sel_Pos + 1 .. Max_Sel_Pos loop - Differences := Count_Different_Keys - (Same_Keys_Sets_Table, - Same_Keys_Sets_Last, - Sel_Position (J)); - - if Verbose then - Put (Output, - "Selecting position" & Sel_Position (J)'Img & - " results in" & Differences'Img & - " differences"); - New_Line (Output); - end if; - - if Differences > Max_Differences then - Max_Differences := Differences; - Max_Diff_Sel_Pos := Sel_Position (J); - Max_Diff_Sel_Pos_Idx := J; - end if; - end loop; - - if Old_Differences = Max_Differences then - raise Program_Error with "some keys are identical"; - end if; - - -- Insert selected position and sort Sel_Position table - - Last_Sel_Pos := Last_Sel_Pos + 1; - Sel_Position (Last_Sel_Pos + 1 .. Max_Diff_Sel_Pos_Idx) := - Sel_Position (Last_Sel_Pos .. Max_Diff_Sel_Pos_Idx - 1); - Sel_Position (Last_Sel_Pos) := Max_Diff_Sel_Pos; - - for P in 1 .. Last_Sel_Pos - 1 loop - if Max_Diff_Sel_Pos < Sel_Position (P) then - pragma Annotate - (CodePeer, False_Positive, - "test always false", "false positive?"); - - Sel_Position (P + 1 .. Last_Sel_Pos) := - Sel_Position (P .. Last_Sel_Pos - 1); - Sel_Position (P) := Max_Diff_Sel_Pos; - exit; - end if; - end loop; - - exit when Max_Differences = NK; - - Build_Identical_Keys_Sets - (Same_Keys_Sets_Table, - Same_Keys_Sets_Last, - Max_Diff_Sel_Pos); - - if Verbose then - Put (Output, - "Selecting position" & Max_Diff_Sel_Pos'Img & - " results in" & Max_Differences'Img & - " differences"); - New_Line (Output); - Put (Output, "--"); - New_Line (Output); - for J in 1 .. Same_Keys_Sets_Last loop - for K in - Same_Keys_Sets_Table (J).First .. - Same_Keys_Sets_Table (J).Last - loop - Put (Output, - Trim_Trailing_Nuls (WT.Table (Reduced (K)).all)); - New_Line (Output); - end loop; - Put (Output, "--"); - New_Line (Output); - end loop; - end if; - end loop; - end; - - Char_Pos_Set_Len := Last_Sel_Pos; - Char_Pos_Set := Allocate (Char_Pos_Set_Len); - - for C in 1 .. Last_Sel_Pos loop - Set_Char_Pos (C - 1, Sel_Position (C)); - end loop; - end Select_Char_Position; - - -------------------------- - -- Select_Character_Set -- - -------------------------- - - procedure Select_Character_Set is - Last : Natural := 0; - Used : array (Character) of Boolean := (others => False); - Char : Character; - - begin - for J in 0 .. NK - 1 loop - for K in 0 .. Char_Pos_Set_Len - 1 loop - Char := WT.Table (Initial (J))(Get_Char_Pos (K)); - exit when Char = ASCII.NUL; - Used (Char) := True; - end loop; - end loop; - - Used_Char_Set_Len := 256; - Used_Char_Set := Allocate (Used_Char_Set_Len); - - for J in Used'Range loop - if Used (J) then - Set_Used_Char (J, Last); - Last := Last + 1; - else - Set_Used_Char (J, 0); - end if; - end loop; - end Select_Character_Set; - - ------------------ - -- Set_Char_Pos -- - ------------------ - - procedure Set_Char_Pos (P : Natural; Item : Natural) is - N : constant Natural := Char_Pos_Set + P; - begin - IT.Table (N) := Item; - end Set_Char_Pos; - - --------------- - -- Set_Edges -- - --------------- - - procedure Set_Edges (F : Natural; Item : Edge_Type) is - N : constant Natural := Edges + (F * Edge_Size); - begin - IT.Table (N) := Item.X; - IT.Table (N + 1) := Item.Y; - IT.Table (N + 2) := Item.Key; - end Set_Edges; - - --------------- - -- Set_Graph -- - --------------- - - procedure Set_Graph (N : Natural; Item : Integer) is - begin - IT.Table (G + N) := Item; - end Set_Graph; - - ------------- - -- Set_Key -- - ------------- - - procedure Set_Key (N : Key_Id; Item : Key_Type) is - begin - IT.Table (Keys + N) := Item.Edge; - end Set_Key; - - --------------- - -- Set_Table -- - --------------- - - procedure Set_Table (T : Integer; X, Y : Natural; Item : Natural) is - N : constant Natural := T + ((Y * T1_Len) + X); - begin - IT.Table (N) := Item; - end Set_Table; - - ------------------- - -- Set_Used_Char -- - ------------------- - - procedure Set_Used_Char (C : Character; Item : Natural) is - N : constant Natural := Used_Char_Set + Character'Pos (C); - begin - IT.Table (N) := Item; - end Set_Used_Char; - - ------------------ - -- Set_Vertices -- - ------------------ - - procedure Set_Vertices (F : Natural; Item : Vertex_Type) is - N : constant Natural := Vertices + (F * Vertex_Size); - begin - IT.Table (N) := Item.First; - IT.Table (N + 1) := Item.Last; - end Set_Vertices; - - --------- - -- Sum -- - --------- - - function Sum - (Word : Word_Type; - Table : Table_Id; - Opt : Optimization) return Natural - is - S : Natural := 0; - R : Natural; - - begin - case Opt is - when CPU_Time => - for J in 0 .. T1_Len - 1 loop - exit when Word (J + 1) = ASCII.NUL; - R := Get_Table (Table, J, Get_Used_Char (Word (J + 1))); - pragma Assert (NV /= 0); - S := (S + R) mod NV; - end loop; - - when Memory_Space => - for J in 0 .. T1_Len - 1 loop - exit when Word (J + 1) = ASCII.NUL; - R := Get_Table (Table, J, 0); - pragma Assert (NV /= 0); - S := (S + R * Character'Pos (Word (J + 1))) mod NV; - end loop; - end case; - - return S; - end Sum; - - ------------------------ - -- Trim_Trailing_Nuls -- - ------------------------ - - function Trim_Trailing_Nuls (Str : String) return String is - begin - for J in reverse Str'Range loop - if Str (J) /= ASCII.NUL then - return Str (Str'First .. J); - end if; - end loop; - - return Str; - end Trim_Trailing_Nuls; - - --------------- - -- Type_Size -- - --------------- - - function Type_Size (L : Natural) return Natural is - begin - if L <= 2 ** 8 then - return 8; - elsif L <= 2 ** 16 then - return 16; - else - return 32; - end if; - end Type_Size; - - ----------- - -- Value -- - ----------- - - function Value - (Name : Table_Name; - J : Natural; - K : Natural := 0) return Natural - is - begin - case Name is - when Character_Position => - return Get_Char_Pos (J); - - when Used_Character_Set => - return Get_Used_Char (Character'Val (J)); - - when Function_Table_1 => - return Get_Table (T1, J, K); - - when Function_Table_2 => - return Get_Table (T2, J, K); - - when Graph_Table => - return Get_Graph (J); - end case; - end Value; - end GNAT.Perfect_Hash_Generators; diff --git a/gcc/ada/libgnat/g-pehage.ads b/gcc/ada/libgnat/g-pehage.ads index 814f1cc..41913cb 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-2020, AdaCore -- +-- Copyright (C) 2002-2021, 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,12 @@ -- < h (w2). These hashing functions are convenient for use with realtime -- applications. +with System.Perfect_Hash_Generators; + package GNAT.Perfect_Hash_Generators is + package SPHG renames System.Perfect_Hash_Generators; + Default_K_To_V : constant Float := 2.05; -- Default ratio for the algorithm. When K is the number of keys, V = -- (K_To_V) * K is the size of the main table of the hash function. To @@ -83,12 +87,12 @@ package GNAT.Perfect_Hash_Generators is -- try and may have to iterate a number of times. This constant bounds the -- number of tries. - type Optimization is (Memory_Space, CPU_Time); + type Optimization is new SPHG.Optimization; -- Optimize either the memory space or the execution time. Note: in -- practice, the optimization mode has little effect on speed. The tables -- are somewhat smaller with Memory_Space. - Verbose : Boolean := False; + Verbose : Boolean renames SPHG.Verbose; -- Output the status of the algorithm. For instance, the tables, the random -- graph (edges, vertices) and selected char positions are output between -- two iterations. @@ -106,10 +110,10 @@ package GNAT.Perfect_Hash_Generators is -- the same words. -- -- A classical way of doing is to Insert all the words and then to invoke - -- Initialize and Compute. If Compute fails to find a perfect hash - -- function, invoke Initialize another time with other configuration - -- parameters (probably with a greater K_To_V ratio). Once successful, - -- invoke Produce and Finalize. + -- Initialize and Compute. If this fails to find a perfect hash function, + -- invoke Initialize again with other configuration parameters (probably + -- with a greater K_To_V ratio). Once successful, invoke Produce and then + -- Finalize. procedure Finalize; -- Deallocate the internal structures and the words table @@ -117,7 +121,7 @@ package GNAT.Perfect_Hash_Generators is procedure Insert (Value : String); -- Insert a new word into the table. ASCII.NUL characters are not allowed. - Too_Many_Tries : exception; + Too_Many_Tries : exception renames SPHG.Too_Many_Tries; -- Raised after Tries unsuccessful runs procedure Compute (Position : String := Default_Position); @@ -138,101 +142,4 @@ package GNAT.Perfect_Hash_Generators is -- GNAT file name for a package named Pkg_Name. If Use_Stdout is True, the -- output goes to standard output, and no files are written. - ---------------------------------------------------------------- - - -- The routines and structures defined below allow producing the hash - -- function using a different way from the procedure above. The procedure - -- Define returns the lengths of an internal table and its item type size. - -- The function Value returns the value of each item in the table. - - -- The hash function has the following form: - - -- h (w) = (g (f1 (w)) + g (f2 (w))) mod m - - -- G is a function based on a graph table [0,n-1] -> [0,m-1]. m is the - -- number of keys. n is an internally computed value and it can be obtained - -- as the length of vector G. - - -- F1 and F2 are two functions based on two function tables T1 and T2. - -- Their definition depends on the chosen optimization mode. - - -- Only some character positions are used in the words because they are - -- significant. They are listed in a character position table (P in the - -- pseudo-code below). For instance, in {"jan", "feb", "mar", "apr", "jun", - -- "jul", "aug", "sep", "oct", "nov", "dec"}, only positions 2 and 3 are - -- significant (the first character can be ignored). In this example, P = - -- {2, 3} - - -- When Optimization is CPU_Time, the first dimension of T1 and T2 - -- corresponds to the character position in the word and the second to the - -- character set. As all the character set is not used, we define a used - -- character table which associates a distinct index to each used character - -- (unused characters are mapped to zero). In this case, the second - -- dimension of T1 and T2 is reduced to the used character set (C in the - -- pseudo-code below). Therefore, the hash function has the following: - - -- function Hash (S : String) return Natural is - -- F : constant Natural := S'First - 1; - -- L : constant Natural := S'Length; - -- F1, F2 : Natural := 0; - -- J : <t>; - - -- begin - -- for K in P'Range loop - -- exit when L < P (K); - -- J := C (S (P (K) + F)); - -- F1 := (F1 + Natural (T1 (K, J))) mod <n>; - -- F2 := (F2 + Natural (T2 (K, J))) mod <n>; - -- end loop; - - -- return (Natural (G (F1)) + Natural (G (F2))) mod <m>; - -- end Hash; - - -- When Optimization is Memory_Space, the first dimension of T1 and T2 - -- corresponds to the character position in the word and the second - -- dimension is ignored. T1 and T2 are no longer matrices but vectors. - -- Therefore, the used character table is not available. The hash function - -- has the following form: - - -- function Hash (S : String) return Natural is - -- F : constant Natural := S'First - 1; - -- L : constant Natural := S'Length; - -- F1, F2 : Natural := 0; - -- J : <t>; - - -- begin - -- for K in P'Range loop - -- exit when L < P (K); - -- J := Character'Pos (S (P (K) + F)); - -- F1 := (F1 + Natural (T1 (K) * J)) mod <n>; - -- F2 := (F2 + Natural (T2 (K) * J)) mod <n>; - -- end loop; - - -- return (Natural (G (F1)) + Natural (G (F2))) mod <m>; - -- end Hash; - - type Table_Name is - (Character_Position, - Used_Character_Set, - Function_Table_1, - Function_Table_2, - Graph_Table); - - procedure Define - (Name : Table_Name; - Item_Size : out Natural; - Length_1 : out Natural; - Length_2 : out Natural); - -- Return the definition of the table Name. This includes the length of - -- dimensions 1 and 2 and the size of an unsigned integer item. When - -- Length_2 is zero, the table has only one dimension. All the ranges - -- start from zero. - - function Value - (Name : Table_Name; - J : Natural; - K : Natural := 0) return Natural; - -- Return the value of the component (I, J) of the table Name. When the - -- table has only one dimension, J is ignored. - end GNAT.Perfect_Hash_Generators; diff --git a/gcc/ada/libgnat/g-rannum.adb b/gcc/ada/libgnat/g-rannum.adb index 9c6693b..2983201 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-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- -- diff --git a/gcc/ada/libgnat/g-rannum.ads b/gcc/ada/libgnat/g-rannum.ads index f795ae0..462e3a2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-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- -- diff --git a/gcc/ada/libgnat/g-regexp.adb b/gcc/ada/libgnat/g-regexp.adb index 3d8b8c7..3652af1 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 3a21edb..c94a3fe 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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 fa67f0c..6bd636f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-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- -- diff --git a/gcc/ada/libgnat/g-regist.ads b/gcc/ada/libgnat/g-regist.ads index 606fa91..0a8c9d0 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-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- -- diff --git a/gcc/ada/libgnat/g-regpat.adb b/gcc/ada/libgnat/g-regpat.adb index b06214b..95ecb60 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 c45e722..f80c72d 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-2020, AdaCore -- +-- Copyright (C) 1996-2021, 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 897cac4..3b4a0d0 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-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- -- @@ -37,7 +37,7 @@ package body GNAT.Rewrite_Data is subtype SEO is Stream_Element_Offset; procedure Do_Output - (B : in out Buffer; + (B : Buffer; Data : Stream_Element_Array; Output : not null access procedure (Data : Stream_Element_Array)); -- Do the actual output. This ensures that we properly send the data @@ -81,7 +81,7 @@ package body GNAT.Rewrite_Data is --------------- procedure Do_Output - (B : in out Buffer; + (B : Buffer; Data : Stream_Element_Array; Output : not null access procedure (Data : Stream_Element_Array)) is diff --git a/gcc/ada/libgnat/g-rewdat.ads b/gcc/ada/libgnat/g-rewdat.ads index 108035f..8149565 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-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- -- diff --git a/gcc/ada/libgnat/g-sechas.adb b/gcc/ada/libgnat/g-sechas.adb index bd97571..178b59b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- @@ -38,7 +38,7 @@ package body GNAT.Secure_Hashes is "0123456789abcdef"; type Fill_Buffer_Access is - access procedure + not null access procedure (M : in out Message_State; SEA : Stream_Element_Array; First : Stream_Element_Offset; diff --git a/gcc/ada/libgnat/g-sechas.ads b/gcc/ada/libgnat/g-sechas.ads index 566a696..79f86bc 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-sehamd.adb b/gcc/ada/libgnat/g-sehamd.adb index d82cc36..b59740a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/g-sehamd.ads b/gcc/ada/libgnat/g-sehamd.ads index 5f9bfe3..148ecb1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/g-sehash.adb b/gcc/ada/libgnat/g-sehash.adb index 470c9b5..920ba59 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/g-sehash.ads b/gcc/ada/libgnat/g-sehash.ads index ed8aefb..602032f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/g-sercom.adb b/gcc/ada/libgnat/g-sercom.adb index 6f4d5e0..20628fb 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 5d4a809..4c9b0b7 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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__linux.adb b/gcc/ada/libgnat/g-sercom__linux.adb index f7212e8..dbcb171 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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__mingw.adb b/gcc/ada/libgnat/g-sercom__mingw.adb index a0da5ff..d278bfa 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 1e74ff8..8b69d90 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-2020, AdaCore -- +-- Copyright (C) 2004-2021, 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 9d34553..2a7efc5 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-2020, AdaCore -- +-- Copyright (C) 2018-2021, 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 18568fa..4bd4e92 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-2020, AdaCore -- +-- Copyright (C) 2018-2021, 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-sha1.adb b/gcc/ada/libgnat/g-sha1.adb index 66e717f..8f4dbfc 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-sha1.ads b/gcc/ada/libgnat/g-sha1.ads index 584c560..5b8bf91 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-sha224.ads b/gcc/ada/libgnat/g-sha224.ads index fd8b753..ea2337d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-sha256.ads b/gcc/ada/libgnat/g-sha256.ads index 58d8b16..90af358 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-sha384.ads b/gcc/ada/libgnat/g-sha384.ads index 32ea088..89e3fd8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-sha512.ads b/gcc/ada/libgnat/g-sha512.ads index 6d7c0ee..4f50899 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-shsh32.adb b/gcc/ada/libgnat/g-shsh32.adb index 1631562..a332e12 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-shsh32.ads b/gcc/ada/libgnat/g-shsh32.ads index 3f46df3..f23075b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-shsh64.adb b/gcc/ada/libgnat/g-shsh64.adb index 061c407..c756b9d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-shsh64.ads b/gcc/ada/libgnat/g-shsh64.ads index 010e5c4..1d67007 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-shshco.adb b/gcc/ada/libgnat/g-shshco.adb index 89e27f0..f5ebf5d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-shshco.ads b/gcc/ada/libgnat/g-shshco.ads index 8c389dd..7df8682 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-soccon.ads b/gcc/ada/libgnat/g-soccon.ads index 06cf683..b352a37 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-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- -- diff --git a/gcc/ada/libgnat/g-socket.adb b/gcc/ada/libgnat/g-socket.adb index a4e9fd1..75a2b27 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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- -- @@ -96,6 +96,9 @@ package body GNAT.Sockets is Options : constant array (Specific_Option_Name) of C.int := (Keep_Alive => SOSC.SO_KEEPALIVE, + Keep_Alive_Count => SOSC.TCP_KEEPCNT, + Keep_Alive_Idle => SOSC.TCP_KEEPIDLE, + Keep_Alive_Interval => SOSC.TCP_KEEPINTVL, Reuse_Address => SOSC.SO_REUSEADDR, Broadcast => SOSC.SO_BROADCAST, Send_Buffer => SOSC.SO_SNDBUF, @@ -1442,6 +1445,9 @@ package body GNAT.Sockets is | Error | Generic_Option | Keep_Alive + | Keep_Alive_Count + | Keep_Alive_Idle + | Keep_Alive_Interval | Multicast_If_V4 | Multicast_If_V6 | Multicast_Loop_V4 @@ -1511,6 +1517,15 @@ package body GNAT.Sockets is => Opt.Enabled := (V4 /= 0); + when Keep_Alive_Count => + Opt.Count := Natural (V4); + + when Keep_Alive_Idle => + Opt.Idle_Seconds := Natural (V4); + + when Keep_Alive_Interval => + Opt.Interval_Seconds := Natural (V4); + when Busy_Polling => Opt.Microseconds := Natural (V4); @@ -1555,14 +1570,18 @@ package body GNAT.Sockets is | Send_Timeout => if Is_Windows then - - -- Timeout is in milliseconds, actual value is 500 ms + - -- returned value (unless it is 0). - if U4 = 0 then Opt.Timeout := 0.0; + else - Opt.Timeout := Duration (U4) / 1000 + 0.500; + if Minus_500ms_Windows_Timeout then + -- Timeout is in milliseconds, actual value is 500 ms + + -- returned value (unless it is 0). + + U4 := U4 + 500; + end if; + + Opt.Timeout := Duration (U4) / 1000; end if; else @@ -2620,6 +2639,21 @@ package body GNAT.Sockets is Len := V4'Size / 8; Add := V4'Address; + when Keep_Alive_Count => + V4 := C.int (Option.Count); + Len := V4'Size / 8; + Add := V4'Address; + + when Keep_Alive_Idle => + V4 := C.int (Option.Idle_Seconds); + Len := V4'Size / 8; + Add := V4'Address; + + when Keep_Alive_Interval => + V4 := C.int (Option.Interval_Seconds); + Len := V4'Size / 8; + Add := V4'Address; + when Busy_Polling => V4 := C.int (Option.Microseconds); Len := V4'Size / 8; @@ -2694,7 +2728,7 @@ package body GNAT.Sockets is Len := U4'Size / 8; Add := U4'Address; - U4 := C.unsigned (Option.Timeout / 0.001); + U4 := C.unsigned (Option.Timeout * 1000); if Option.Timeout > 0.0 and then U4 = 0 then -- Avoid round to zero. Zero timeout mean unlimited diff --git a/gcc/ada/libgnat/g-socket.ads b/gcc/ada/libgnat/g-socket.ads index bf78777..4372f3e 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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- -- @@ -845,11 +845,20 @@ package GNAT.Sockets is -- IP_Protocol_For_TCP_Level -- ------------------------------- - No_Delay, -- TCP_NODELAY + No_Delay, -- TCP_NODELAY -- Disable the Nagle algorithm. This means that output buffer content -- is always sent as soon as possible, even if there is only a small -- amount of data. + Keep_Alive_Count, -- TCP_KEEPCNT + -- Maximum number of keepalive probes + + Keep_Alive_Idle, -- TCP_KEEPIDLE + -- Idle time before TCP starts sending keepalive probes + + Keep_Alive_Interval, -- TCP_KEEPINTVL + -- Time between individual keepalive probes + ------------------------------ -- IP_Protocol_For_IP_Level -- ------------------------------ @@ -923,26 +932,35 @@ package GNAT.Sockets is Enabled : Boolean; case Name is - when Linger => + when Linger => Seconds : Natural; - when others => + when others => null; end case; - when Busy_Polling => + when Keep_Alive_Count => + Count : Natural; + + when Keep_Alive_Idle => + Idle_Seconds : Natural; + + when Keep_Alive_Interval => + Interval_Seconds : Natural; + + when Busy_Polling => Microseconds : Natural; - when Send_Buffer | - Receive_Buffer => + when Send_Buffer | + Receive_Buffer => Size : Natural; - when Error => + when Error => Error : Error_Type; - when Add_Membership_V4 | - Add_Membership_V6 | - Drop_Membership_V4 | - Drop_Membership_V6 => + when Add_Membership_V4 | + Add_Membership_V6 | + Drop_Membership_V4 | + Drop_Membership_V6 => Multicast_Address : Inet_Addr_Type; case Name is when Add_Membership_V4 | @@ -958,13 +976,13 @@ package GNAT.Sockets is when Multicast_If_V6 => Outgoing_If_Index : Natural; - when Multicast_TTL => + when Multicast_TTL => Time_To_Live : Natural; - when Multicast_Hops => + when Multicast_Hops => Hop_Limit : Integer range -1 .. 255; - when Send_Timeout | + when Send_Timeout | Receive_Timeout => Timeout : Timeval_Duration; diff --git a/gcc/ada/libgnat/g-socket__dummy.adb b/gcc/ada/libgnat/g-socket__dummy.adb index a343eab..a15ff5f 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 2cd7460..617c14f 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 cd82bb8..3f153af 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, AdaCore -- +-- Copyright (C) 2020-2021, 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.ads b/gcc/ada/libgnat/g-socpol.ads index c03c578..71ce1bb 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, AdaCore -- +-- Copyright (C) 2020-2021, 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.adb b/gcc/ada/libgnat/g-socpol__dummy.adb index 01c7cc5..bc78268 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, AdaCore -- +-- Copyright (C) 2020-2021, 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 507471e..2d7ae3c 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, AdaCore -- +-- Copyright (C) 2020-2021, 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 5d86993..7f7568e 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 c6a07ba..f1b0e2e 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 53acef5..c054207 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 3ddcdb4..687ad34 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 dd8a68c..aa9305d 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 ff6feaa..6fb921a 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 548b9d3..f2a7185 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-2020, AdaCore -- +-- Copyright (C) 2002-2021, 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 704ec0a..5f85fd1 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-2020, AdaCore -- +-- Copyright (C) 2002-2021, 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 295d812..0c07900 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 227c2e4..4310ead 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 cbb3e36..422dbba 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 c45bd04..916bc43 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 388b87c..aaef320 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 fc6e6d9..dae6f7d 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, AdaCore -- +-- Copyright (C) 2020-2021, 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 3d66437..7fb9f53 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, AdaCore -- +-- Copyright (C) 2020-2021, 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 02ccb77..3bb24f5 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, AdaCore -- +-- Copyright (C) 2020-2021, 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 1b8dd49..aa27101 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-2020, AdaCore -- +-- Copyright (C) 2008-2021, 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 e30af18..b48657b 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-2020, AdaCore -- +-- Copyright (C) 2008-2021, 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,6 +34,7 @@ with Ada.Unchecked_Conversion; with Interfaces.C.Strings; +with System.Parameters; package GNAT.Sockets.Thin_Common is @@ -44,9 +45,9 @@ package GNAT.Sockets.Thin_Common is Failure : constant C.int := -1; type time_t is - range -2 ** (8 * SOSC.SIZEOF_tv_sec - 1) - .. 2 ** (8 * SOSC.SIZEOF_tv_sec - 1) - 1; - for time_t'Size use 8 * SOSC.SIZEOF_tv_sec; + range -2 ** (System.Parameters.time_t_bits - 1) + .. 2 ** (System.Parameters.time_t_bits - 1) - 1; + for time_t'Size use System.Parameters.time_t_bits; pragma Convention (C, time_t); type suseconds_t is diff --git a/gcc/ada/libgnat/g-sothco__dummy.adb b/gcc/ada/libgnat/g-sothco__dummy.adb index 8c90ab0..87b710e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/g-sothco__dummy.ads b/gcc/ada/libgnat/g-sothco__dummy.ads index d93916a..6aadd8a 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-2020, AdaCore -- +-- Copyright (C) 2008-2021, 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 ce55464..bf362c4 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-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- -- diff --git a/gcc/ada/libgnat/g-spchge.adb b/gcc/ada/libgnat/g-spchge.adb index 62f1666..f790171 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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-spchge.ads b/gcc/ada/libgnat/g-spchge.ads index a0ce625..88bf264 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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-speche.adb b/gcc/ada/libgnat/g-speche.adb index 545ca42..cccb3d8 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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-speche.ads b/gcc/ada/libgnat/g-speche.ads index a906e43..43a434e 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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-spipat.adb b/gcc/ada/libgnat/g-spipat.adb index e9f4bf5..97cfdf9 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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-spipat.ads b/gcc/ada/libgnat/g-spipat.ads index d711b3b6..13d1e93 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-2020, AdaCore -- +-- Copyright (C) 1997-2021, 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.adb b/gcc/ada/libgnat/g-spitbo.adb index 07ecd52..dee969b 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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 29a0606..447daeb 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-2020, AdaCore -- +-- Copyright (C) 1997-2021, 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 6e0af44..af7fcfc 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, AdaCore -- +-- Copyright (C) 2020-2021, 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 bde6a69..ad9cecd 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, AdaCore -- +-- Copyright (C) 2020-2021, 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 4aa1a76..4f479f7 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-2020, AdaCore -- +-- Copyright (C) 1997-2021, 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 065a33d..be4ebc3 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-2020, AdaCore -- +-- Copyright (C) 1997-2021, 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 2771cf5..9923025 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-2020, AdaCore -- +-- Copyright (C) 1997-2021, 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 fc220bd..c56d071 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-ssvety.ads b/gcc/ada/libgnat/g-ssvety.ads index d7b134d..c09f040 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/g-sthcso.adb b/gcc/ada/libgnat/g-sthcso.adb index f6345d4..bf80f9b 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 679adf0..3782972 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 f6949b5..19330ab 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-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- -- diff --git a/gcc/ada/libgnat/g-string.adb b/gcc/ada/libgnat/g-string.adb index 7d820c6..f8cd5ee 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-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- -- diff --git a/gcc/ada/libgnat/g-string.ads b/gcc/ada/libgnat/g-string.ads index 8d35847..a8f2574 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-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- -- diff --git a/gcc/ada/libgnat/g-strspl.ads b/gcc/ada/libgnat/g-strspl.ads index 0995e2b..14c143e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/g-stseme.adb b/gcc/ada/libgnat/g-stseme.adb index ad78669..5d8f91e 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 6d018e2..20a97fa 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 8872a4c..8991e68 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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 752f1dc..7d3ef58 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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,6 +41,8 @@ -- 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 64c4940..2461035 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-2020, AdaCore -- +-- Copyright (C) 1997-2021, 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 b8ccb83..8296994 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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 6bc12ab..4eeed30 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/g-timsta.ads b/gcc/ada/libgnat/g-timsta.ads index df87840..76c1a79 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/g-traceb.adb b/gcc/ada/libgnat/g-traceb.adb index c826dd5..d832570 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 0bd1ddf..15db799 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 064724c..07509ee 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 03055d4..c861968 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 ff3bb46..f54cc46 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-2020, AdaCore -- +-- Copyright (C) 2002-2021, 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 502850b..90e3237 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-2020, AdaCore -- +-- Copyright (C) 2002-2021, 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 a225afb..1a27143 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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.ads b/gcc/ada/libgnat/g-u3spch.ads index 8960231..56356f1 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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-utf_32.adb b/gcc/ada/libgnat/g-utf_32.adb index 82958f8..432d77d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-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- -- diff --git a/gcc/ada/libgnat/g-utf_32.ads b/gcc/ada/libgnat/g-utf_32.ads index 2d6dc72..3cd2729 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-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- -- diff --git a/gcc/ada/libgnat/g-wispch.adb b/gcc/ada/libgnat/g-wispch.adb index 403d02a..3f776b2 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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 cfff62e..de4697b 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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 da64a6d..b6ba727 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/g-zspche.adb b/gcc/ada/libgnat/g-zspche.adb index 38684f3..ca7b84a 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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 47f5772..43ae4ed 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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 9a8b5f9..377d1dd 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/gnat.ads b/gcc/ada/libgnat/gnat.ads index c3217a6..612a6c8 100644 --- a/gcc/ada/libgnat/gnat.ads +++ b/gcc/ada/libgnat/gnat.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2020, AdaCore -- +-- Copyright (C) 1992-2021, 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-c.adb b/gcc/ada/libgnat/i-c.adb index 028e5cb..5be50ff 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/i-c.ads b/gcc/ada/libgnat/i-c.ads index 279c75a..428ea49 100644 --- a/gcc/ada/libgnat/i-c.ads +++ b/gcc/ada/libgnat/i-c.ads @@ -61,6 +61,11 @@ package Interfaces.C is type size_t is mod 2 ** System.Parameters.ptr_bits; + -- Boolean type + + type C_bool is new Boolean; + pragma Convention (C, C_bool); + -- Floating-Point type C_float is new Float; diff --git a/gcc/ada/libgnat/i-cexten.ads b/gcc/ada/libgnat/i-cexten.ads index 2772860..70d2621 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -56,8 +56,7 @@ package Interfaces.C.Extensions is -- C bool - type bool is new Boolean; - pragma Convention (C, bool); + subtype bool is Interfaces.C.C_bool; -- 64-bit integer types diff --git a/gcc/ada/libgnat/i-cexten__128.ads b/gcc/ada/libgnat/i-cexten__128.ads index 0c049f3..c07c5ab 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -56,8 +56,7 @@ package Interfaces.C.Extensions is -- C bool - type bool is new Boolean; - pragma Convention (C, bool); + subtype bool is Interfaces.C.C_bool; -- 64-bit integer types diff --git a/gcc/ada/libgnat/i-cobol.adb b/gcc/ada/libgnat/i-cobol.adb index d69ef9d..b4b62ee 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -692,7 +692,7 @@ package body Interfaces.COBOL is -- For signed, accept all standard and non-standard signs else - return Item (Item'Last) in 16#A# .. 16#F#; + return Item (Item'Last) >= 16#A#; end if; end case; end Valid_Packed; diff --git a/gcc/ada/libgnat/i-cobol.ads b/gcc/ada/libgnat/i-cobol.ads index 21eecf8..cf96e25 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2021, 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-cpoint.adb b/gcc/ada/libgnat/i-cpoint.adb index 6e5a2d2..4c39274 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/i-cpoint.ads b/gcc/ada/libgnat/i-cpoint.ads index a3caca8..08b89ba 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2021, 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 4cd4bed..40113f2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-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- -- diff --git a/gcc/ada/libgnat/i-cstrea.ads b/gcc/ada/libgnat/i-cstrea.ads index 4277042..48f2125 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-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- -- diff --git a/gcc/ada/libgnat/i-cstrin.adb b/gcc/ada/libgnat/i-cstrin.adb index 17f4585..eba95d4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/i-cstrin.ads b/gcc/ada/libgnat/i-cstrin.ads index fae8e97..2b27f9f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1993-2021, 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 b529717..eba61c2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/i-pacdec.adb b/gcc/ada/libgnat/i-pacdec.adb index e6eb790..8b8acc9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/i-pacdec.ads b/gcc/ada/libgnat/i-pacdec.ads index 389dc3a..d68767f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/i-vxwoio.adb b/gcc/ada/libgnat/i-vxwoio.adb index 4ae2245..f1e449f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2021, 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 fc6c10f..e1743ad 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2021, 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 4f25bbd..c5686bb 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 641f9fe..ed9bb42 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 9e7dfba..186cb84 100644 --- a/gcc/ada/libgnat/interfac.ads +++ b/gcc/ada/libgnat/interfac.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2021, 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/interfac__2020.ads b/gcc/ada/libgnat/interfac__2020.ads index 2865fc2..a353604 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2021, 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 a5f508d..e622fec 100644 --- a/gcc/ada/libgnat/memtrack.adb +++ b/gcc/ada/libgnat/memtrack.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-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- -- diff --git a/gcc/ada/libgnat/s-addima.adb b/gcc/ada/libgnat/s-addima.adb index a231be2..af8d67f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-addima.ads b/gcc/ada/libgnat/s-addima.ads index 281655d..4eae027 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-addope.adb b/gcc/ada/libgnat/s-addope.adb index 5c3fd4a..0e02178 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/s-addope.ads b/gcc/ada/libgnat/s-addope.ads index 881882a..d1c3cb5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/s-aoinar.adb b/gcc/ada/libgnat/s-aoinar.adb index b05134f..df12b16 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-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- -- diff --git a/gcc/ada/libgnat/s-aoinar.ads b/gcc/ada/libgnat/s-aoinar.ads index 558754f..8d80bb1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2021, 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 9f350c1..c955623 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-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- -- diff --git a/gcc/ada/libgnat/s-aomoar.ads b/gcc/ada/libgnat/s-aomoar.ads index 4062d1a..7e19d7f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2021, 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 84a1a6e..5317889 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-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- -- diff --git a/gcc/ada/libgnat/s-aotase.ads b/gcc/ada/libgnat/s-aotase.ads index f979788..77f343e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2021, 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 05a8c9f..b47c319 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-aridou.ads b/gcc/ada/libgnat/s-aridou.ads index f9c03e5..0df27ca 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-arit128.adb b/gcc/ada/libgnat/s-arit128.adb index 82c8fc3..951e357 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-arit128.ads b/gcc/ada/libgnat/s-arit128.ads index 55154da..6213cfb 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-arit32.adb b/gcc/ada/libgnat/s-arit32.adb index 742f2e1..f9cd7fe 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-arit32.ads b/gcc/ada/libgnat/s-arit32.ads index 5656855..5dc197d 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-arit64.adb b/gcc/ada/libgnat/s-arit64.adb index a4d60f2..2f24a70 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-arit64.ads b/gcc/ada/libgnat/s-arit64.ads index 90d5c25..c9141f5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-assert.adb b/gcc/ada/libgnat/s-assert.adb index 55020b9..4adcc33 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-assert.ads b/gcc/ada/libgnat/s-assert.ads index 7dcd93a..aa82549 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -38,9 +38,11 @@ pragma Compiler_Unit_Warning; +with Ada.Assertions; + package System.Assertions is - Assert_Failure : exception; + Assert_Failure : exception renames Ada.Assertions.Assertion_Error; -- Exception raised when assertion fails procedure Raise_Assert_Failure (Msg : String); diff --git a/gcc/ada/libgnat/s-atacco.adb b/gcc/ada/libgnat/s-atacco.adb index 11857b9..c13291e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-atacco.ads b/gcc/ada/libgnat/s-atacco.ads index e9076cc..16d86fb 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 5d7f98e..b7ce56d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-atocou.ads b/gcc/ada/libgnat/s-atocou.ads index b64f947..9488b6d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -101,7 +101,6 @@ private type Atomic_Counter is record Value : aliased Atomic_Unsigned := 1; - pragma Atomic (Value); end record; end System.Atomic_Counters; diff --git a/gcc/ada/libgnat/s-atocou__builtin.adb b/gcc/ada/libgnat/s-atocou__builtin.adb index 2f2a5f6..d87f9ad 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -51,24 +51,19 @@ package body System.Atomic_Counters is procedure Decrement (Item : aliased in out Atomic_Unsigned) is begin - if Sync_Sub_And_Fetch (Item'Unrestricted_Access, 1) = 0 then + if Sync_Sub_And_Fetch (Item'Unchecked_Access, 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'Unrestricted_Access, 1) = 0; + return Sync_Sub_And_Fetch (Item'Unchecked_Access, 1) = 0; end Decrement; function Decrement (Item : in out Atomic_Counter) return Boolean is begin - -- Note: the use of Unrestricted_Access here is required because we - -- are obtaining an access-to-volatile pointer to a non-volatile object. - -- This is not allowed for [Unchecked_]Access, but is safe in this case - -- because we know that no aliases are being created. - - return Sync_Sub_And_Fetch (Item.Value'Unrestricted_Access, 1) = 0; + return Sync_Sub_And_Fetch (Item.Value'Unchecked_Access, 1) = 0; end Decrement; --------------- @@ -77,17 +72,12 @@ package body System.Atomic_Counters is procedure Increment (Item : aliased in out Atomic_Unsigned) is begin - Sync_Add_And_Fetch (Item'Unrestricted_Access, 1); + Sync_Add_And_Fetch (Item'Unchecked_Access, 1); end Increment; procedure Increment (Item : in out Atomic_Counter) is begin - -- Note: the use of Unrestricted_Access here is required because we are - -- obtaining an access-to-volatile pointer to a non-volatile object. - -- This is not allowed for [Unchecked_]Access, but is safe in this case - -- because we know that no aliases are being created. - - Sync_Add_And_Fetch (Item.Value'Unrestricted_Access, 1); + Sync_Add_And_Fetch (Item.Value'Unchecked_Access, 1); end Increment; ---------------- diff --git a/gcc/ada/libgnat/s-atocou__x86.adb b/gcc/ada/libgnat/s-atocou__x86.adb index 217cdec..8704d9df3e 100644 --- a/gcc/ada/libgnat/s-atocou__x86.adb +++ b/gcc/ada/libgnat/s-atocou__x86.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-atoope.ads b/gcc/ada/libgnat/s-atoope.ads index a0f0eb8..c831e8e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2021, 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 4fb2824..501254e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-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- -- diff --git a/gcc/ada/libgnat/s-atopex.ads b/gcc/ada/libgnat/s-atopex.ads index 996883c..f7558aa 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-2021, 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 fa40d20..ba284f0 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-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- -- diff --git a/gcc/ada/libgnat/s-atopri.ads b/gcc/ada/libgnat/s-atopri.ads index 603793f..2a5ffe5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-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- -- diff --git a/gcc/ada/libgnat/s-auxdec.adb b/gcc/ada/libgnat/s-auxdec.adb index 19741ea..0cb712a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-auxdec.ads b/gcc/ada/libgnat/s-auxdec.ads index 66a9c9e..7ef1246 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-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- -- diff --git a/gcc/ada/libgnat/s-bignum.adb b/gcc/ada/libgnat/s-bignum.adb index 5e85c4a..41e7617 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-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- -- diff --git a/gcc/ada/libgnat/s-bignum.ads b/gcc/ada/libgnat/s-bignum.ads index 728e5438..ad5fedb 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-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- -- diff --git a/gcc/ada/libgnat/s-bitfie.ads b/gcc/ada/libgnat/s-bitfie.ads index 21b7294..f081d55 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-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- -- @@ -47,10 +47,9 @@ package System.Bitfields is pragma Provide_Shift_Operators (Val_2); type Val is mod 2**Val_Bits with Alignment => Val_Bytes; - -- ??? It turns out that enabling checks on the instantiation of - -- System.Bitfield_Utils.G makes a latent visibility bug appear on strict - -- alignment platforms related to alignment checks. Work around it by - -- suppressing these checks explicitly. + -- Enabling checks on the instantiation of System.Bitfield_Utils.G makes a + -- latent visibility bug appear on strict alignment platforms related to + -- alignment checks. Work around it by suppressing these checks explicitly. pragma Suppress (Alignment_Check); package Utils is new System.Bitfield_Utils.G (Val, Val_2); @@ -63,4 +62,12 @@ package System.Bitfields is Size : Utils.Bit_Size) renames Utils.Copy_Bitfield; + function Fast_Copy_Bitfield + (Src : Val_2; + Src_Offset : Utils.Bit_Offset; + Dest : Val_2; + Dest_Offset : Utils.Bit_Offset; + Size : Utils.Small_Size) + return Val_2 renames Utils.Fast_Copy_Bitfield; + end System.Bitfields; diff --git a/gcc/ada/libgnat/s-bitops.adb b/gcc/ada/libgnat/s-bitops.adb index 19bf14f..45290d3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-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- -- diff --git a/gcc/ada/libgnat/s-bitops.ads b/gcc/ada/libgnat/s-bitops.ads index 8caf77c..92fe0df 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-bituti.adb b/gcc/ada/libgnat/s-bituti.adb index ef839a8..d571f54 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-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- -- @@ -31,14 +31,6 @@ package body System.Bitfield_Utils is - -- ??? - -- - -- This code does not yet work for overlapping bit fields. We need to copy - -- backwards in some cases (i.e. from higher to lower bit addresses). - -- Alternatively, we could avoid calling this if Forwards_OK is False. - -- - -- ??? - package body G is Val_Bytes : constant Address := Address (Val'Size / Storage_Unit); @@ -77,7 +69,7 @@ package body System.Bitfield_Utils is function Get_Bitfield (Src : Val_2; Src_Offset : Bit_Offset; Size : Small_Size) - return Val; + return Val with Inline; -- Returns the bit field in Src starting at Src_Offset, of the given -- Size. If Size < Small_Size'Last, then high order bits are zero. @@ -86,7 +78,7 @@ package body System.Bitfield_Utils is Dest : Val_2; Dest_Offset : Bit_Offset; Size : Small_Size) - return Val_2; + return Val_2 with Inline; -- The bit field in Dest starting at Dest_Offset, of the given Size, is -- set to Src_Value. Src_Value must have high order bits (Size and -- above) zero. The result is returned as the function result. @@ -402,11 +394,22 @@ package body System.Bitfield_Utils is pragma Assert (Al_Src_Address mod Val'Alignment = 0); pragma Assert (Al_Dest_Address mod Val'Alignment = 0); begin + -- Optimized small case + if Size in Small_Size then Copy_Small_Bitfield (Al_Src_Address, Al_Src_Offset, Al_Dest_Address, Al_Dest_Offset, Size); + + -- Do nothing for zero size. This is necessary to avoid doing invalid + -- reads, which are detected by valgrind. + + elsif Size = 0 then + null; + + -- Large case + else Copy_Large_Bitfield (Al_Src_Address, Al_Src_Offset, @@ -415,6 +418,22 @@ package body System.Bitfield_Utils is end if; end Copy_Bitfield; + function Fast_Copy_Bitfield + (Src : Val_2; + Src_Offset : Bit_Offset; + Dest : Val_2; + Dest_Offset : Bit_Offset; + Size : Small_Size) + return Val_2 is + Result : constant Val_2 := Set_Bitfield + (Get_Bitfield (Src, Src_Offset, Size), Dest, Dest_Offset, Size); + begin + -- No need to explicitly do nothing for zero size case, because Size + -- cannot be zero. + + return Result; + end Fast_Copy_Bitfield; + end G; end System.Bitfield_Utils; diff --git a/gcc/ada/libgnat/s-bituti.ads b/gcc/ada/libgnat/s-bituti.ads index 305133b..8afee24 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2019-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- -- @@ -54,7 +54,7 @@ package System.Bitfield_Utils is -- generic formal, or on a type derived from a generic formal, so they have -- to be passed in. -- - -- Endian indicates whether we're on little-endian or big-endian machine. + -- Endian indicates whether we're on a little- or big-endian machine. pragma Elaborate_Body; @@ -98,9 +98,9 @@ package System.Bitfield_Utils is pragma Assert (Val_Array'Component_Size = Val'Size); subtype Bit_Size is Natural; -- Size in bits of a bit field - subtype Small_Size is Bit_Size range 0 .. Val'Size; + subtype Small_Size is Bit_Size range 1 .. Val'Size; -- Size of a small one - subtype Bit_Offset is Small_Size range 0 .. Val'Size - 1; + subtype Bit_Offset is Small_Size'Base range 0 .. Val'Size - 1; -- Starting offset subtype Bit_Offset_In_Byte is Bit_Offset range 0 .. Storage_Unit - 1; @@ -127,6 +127,20 @@ package System.Bitfield_Utils is -- D (D_First)'Address, D (D_First)'Bit, -- Size); + function Fast_Copy_Bitfield + (Src : Val_2; + Src_Offset : Bit_Offset; + Dest : Val_2; + Dest_Offset : Bit_Offset; + Size : Small_Size) + return Val_2 with Inline; + -- Faster version of Copy_Bitfield, with a different calling convention. + -- In particular, we pass by copy rather than passing Addresses. The bit + -- field must fit in Val_Bits. Src and Dest must be properly aligned. + -- The result is supposed to be assigned back into Dest, as in: + -- + -- Dest := Fast_Copy_Bitfield (Src, ..., Dest, ..., ...); + end G; end System.Bitfield_Utils; diff --git a/gcc/ada/libgnat/s-boarop.ads b/gcc/ada/libgnat/s-boarop.ads index 3f3656d..1efac49 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-boustr.adb b/gcc/ada/libgnat/s-boustr.adb index d153f10..0790846 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-2020, AdaCore -- +-- Copyright (C) 2016-2021, 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 e49c5aa..9f7526e 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-2020, AdaCore -- +-- Copyright (C) 2016-2021, 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 1eac50d..7cc1523 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-2020, AdaCore -- +-- Copyright (C) 2006-2021, 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 2da7f5a..a44924a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-carsi8.ads b/gcc/ada/libgnat/s-carsi8.ads index a515aad..a9ef1c06 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-carun8.adb b/gcc/ada/libgnat/s-carun8.adb index 0ed3d26..2c192db 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-carun8.ads b/gcc/ada/libgnat/s-carun8.ads index f74c1e3..eeadf61 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-casi128.adb b/gcc/ada/libgnat/s-casi128.adb index 96a8f3d..09d002f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-casi128.ads b/gcc/ada/libgnat/s-casi128.ads index 0893bad..d3f1347 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-casi16.adb b/gcc/ada/libgnat/s-casi16.adb index 17f8429..1889579 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-casi16.ads b/gcc/ada/libgnat/s-casi16.ads index cdb9b51..21c7a0e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-casi32.adb b/gcc/ada/libgnat/s-casi32.adb index 9d54fe3..0515a53 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-casi32.ads b/gcc/ada/libgnat/s-casi32.ads index 90ffaf0..c591cff 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-casi64.adb b/gcc/ada/libgnat/s-casi64.adb index 464f99e..5b4a1e3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-casi64.ads b/gcc/ada/libgnat/s-casi64.ads index 7296dd8..4563124 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-casuti.adb b/gcc/ada/libgnat/s-casuti.adb index a8982f2..265b7d3 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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-casuti.ads b/gcc/ada/libgnat/s-casuti.ads index 4204b5e..5b96edb 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-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- -- diff --git a/gcc/ada/libgnat/s-caun128.adb b/gcc/ada/libgnat/s-caun128.adb index bb69793..3cd4e85 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-caun128.ads b/gcc/ada/libgnat/s-caun128.ads index c96983d..30d11ab 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-caun16.adb b/gcc/ada/libgnat/s-caun16.adb index ef016b5..9168ef3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-caun16.ads b/gcc/ada/libgnat/s-caun16.ads index beb6322..6175daa 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-caun32.adb b/gcc/ada/libgnat/s-caun32.adb index 6979dfc..7d7e7a8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-caun32.ads b/gcc/ada/libgnat/s-caun32.ads index 8f07450b..ab7b4f3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-caun64.adb b/gcc/ada/libgnat/s-caun64.adb index 32e3749..8971a80 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-caun64.ads b/gcc/ada/libgnat/s-caun64.ads index e732fc7..d061d7d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-chepoo.ads b/gcc/ada/libgnat/s-chepoo.ads index 47ea922..3936715 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-commun.adb b/gcc/ada/libgnat/s-commun.adb index 0e924be..591b4a0 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 b338343..7c15d62 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-2020, AdaCore -- +-- Copyright (C) 2001-2021, 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 3b6639c..81d6f61 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca2.ads b/gcc/ada/libgnat/s-conca2.ads index d120d47..dc588eb 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca3.adb b/gcc/ada/libgnat/s-conca3.adb index 1115434..37a8681 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca3.ads b/gcc/ada/libgnat/s-conca3.ads index 6935974..155bebf 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca4.adb b/gcc/ada/libgnat/s-conca4.adb index b170b1f..da50627 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca4.ads b/gcc/ada/libgnat/s-conca4.ads index 64157df..1d8e15c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca5.adb b/gcc/ada/libgnat/s-conca5.adb index 0b14a5c..0de4aa5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca5.ads b/gcc/ada/libgnat/s-conca5.ads index ec6c326..6193adb 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca6.adb b/gcc/ada/libgnat/s-conca6.adb index 43a15b9..d51201f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca6.ads b/gcc/ada/libgnat/s-conca6.ads index 20a9075..ee38e69 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca7.adb b/gcc/ada/libgnat/s-conca7.adb index 9691ec0..787b4f2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca7.ads b/gcc/ada/libgnat/s-conca7.ads index 2a382c2..74d05dc 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca8.adb b/gcc/ada/libgnat/s-conca8.adb index 44968ac..8e64e46 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca8.ads b/gcc/ada/libgnat/s-conca8.ads index 1bee3cf..d739b30 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca9.adb b/gcc/ada/libgnat/s-conca9.adb index b5c4ade..83456e9 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-conca9.ads b/gcc/ada/libgnat/s-conca9.ads index fc900c6..61d6d6b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-crc32.adb b/gcc/ada/libgnat/s-crc32.adb index 49df8c2..9f34ed5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-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- -- diff --git a/gcc/ada/libgnat/s-crc32.ads b/gcc/ada/libgnat/s-crc32.ads index 3591120..b595fc4 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-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- -- diff --git a/gcc/ada/libgnat/s-crtl.ads b/gcc/ada/libgnat/s-crtl.ads index a3299ef..d26dbf3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- diff --git a/gcc/ada/libgnat/s-dfmkio.ads b/gcc/ada/libgnat/s-dfmkio.ads index cad07fe..f9df157 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-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- -- diff --git a/gcc/ada/libgnat/s-dfmopr.ads b/gcc/ada/libgnat/s-dfmopr.ads index f9e24bb..daf5189 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-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- -- diff --git a/gcc/ada/libgnat/s-dgmgop.ads b/gcc/ada/libgnat/s-dgmgop.ads index 3141ddb..91b8f3e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-diflio.adb b/gcc/ada/libgnat/s-diflio.adb index 222679ef..1343e95 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-diflio.ads b/gcc/ada/libgnat/s-diflio.ads index 67bce0f..3abe428 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-diflmk.ads b/gcc/ada/libgnat/s-diflmk.ads index 6ba1e01..02db92d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-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- -- diff --git a/gcc/ada/libgnat/s-digemk.ads b/gcc/ada/libgnat/s-digemk.ads index 5013083..be97085 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-diinio.adb b/gcc/ada/libgnat/s-diinio.adb index a067ccc..559504e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-diinio.ads b/gcc/ada/libgnat/s-diinio.ads index ddcd716..a79e723 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-dilomk.ads b/gcc/ada/libgnat/s-dilomk.ads index df3d28f..37e101b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-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- -- diff --git a/gcc/ada/libgnat/s-dim.ads b/gcc/ada/libgnat/s-dim.ads index 9780a85..0bcc0da 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-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- -- diff --git a/gcc/ada/libgnat/s-dimkio.ads b/gcc/ada/libgnat/s-dimkio.ads index 4293103..186319e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-dimmks.ads b/gcc/ada/libgnat/s-dimmks.ads index 24eb0b9..91176649 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-direio.adb b/gcc/ada/libgnat/s-direio.adb index 0ebc2bc..8e3740c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-direio.ads b/gcc/ada/libgnat/s-direio.ads index aa93797..01ffbca 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-dlmkio.ads b/gcc/ada/libgnat/s-dlmkio.ads index fccfd8b..d0b0bb2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-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- -- diff --git a/gcc/ada/libgnat/s-dlmopr.ads b/gcc/ada/libgnat/s-dlmopr.ads index ee743d5..6fe46a5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2018-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- -- diff --git a/gcc/ada/libgnat/s-dmotpr.ads b/gcc/ada/libgnat/s-dmotpr.ads index 04d6ca4..458ae52 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-dorepr.adb b/gcc/ada/libgnat/s-dorepr.adb new file mode 100644 index 0000000..9f6df92 --- /dev/null +++ b/gcc/ada/libgnat/s-dorepr.adb @@ -0,0 +1,172 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- S Y S T E M . D O U B L E _ R E A L . P R O D U C T -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 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 is the default version of the separate package body + +with Interfaces; use Interfaces; + +separate (System.Double_Real) + +package body Product is + + procedure Split (N : Num; Hi : out Num; Lo : out Num); + -- Compute high part and low part of N + + ----------- + -- Split -- + ----------- + + -- We use a bit manipulation algorithm instead of Veltkamp's splitting + -- because it is faster and has the property that the magnitude of the + -- high part is never larger than that of the input number, which will + -- avoid spurious overflows in the Two_Prod algorithm. + + -- See the recent paper by Claude-Pierre Jeannerod, Jean-Michel Muller + -- and Paul Zimmermann: On various ways to split a floating-point number + -- ARITH 2018 - 25th IEEE Symposium on Computer Arithmetic, Jun 2018, + -- Amherst (MA), United States, pages 53-60. + + procedure Split (N : Num; Hi : out Num; Lo : out Num) is + X : Num; + + begin + -- Spill the input into the appropriate (maybe larger) bit container, + -- mask out the low bits and reload the modified value. + + case Num'Machine_Mantissa is + when 24 => + declare + Rep32 : aliased Interfaces.Unsigned_32; + Temp : Num := N with Address => Rep32'Address; + pragma Annotate (CodePeer, Modified, Rep32); + + begin + -- Mask out the low 12 bits + + Rep32 := Rep32 and 16#FFFFF000#; + + X := Temp; + end; + + when 53 => + declare + Rep64 : aliased Interfaces.Unsigned_64; + Temp : Num := N with Address => Rep64'Address; + pragma Annotate (CodePeer, Modified, Rep64); + + begin + -- Mask out the low 27 bits + + Rep64 := Rep64 and 16#FFFFFFFFF8000000#; + + X := Temp; + end; + + when 64 => + declare + Rep80 : aliased array (1 .. 2) of Interfaces.Unsigned_64; + Temp : Num := N with Address => Rep80'Address; + pragma Annotate (CodePeer, Modified, Rep80); + + begin + -- Mask out the low 32 bits + + if System.Default_Bit_Order = High_Order_First then + Rep80 (1) := Rep80 (1) and 16#FFFFFFFFFFFF0000#; + Rep80 (2) := Rep80 (2) and 16#0000FFFFFFFFFFFF#; + else + Rep80 (1) := Rep80 (1) and 16#FFFFFFFF00000000#; + end if; + + X := Temp; + end; + + when others => + raise Program_Error; + end case; + + -- Deal with denormalized numbers + + if X = 0.0 then + Hi := N; + Lo := 0.0; + else + Hi := X; + Lo := N - X; + end if; + end Split; + + -------------- + -- Two_Prod -- + -------------- + + function Two_Prod (A, B : Num) return Double_T is + P : constant Num := A * B; + + Ahi, Alo, Bhi, Blo, E : Num; + + begin + if Is_Infinity (P) or else Is_Zero (P) then + return (P, 0.0); + + else + Split (A, Ahi, Alo); + Split (B, Bhi, Blo); + + E := ((Ahi * Bhi - P) + Ahi * Blo + Alo * Bhi) + Alo * Blo; + + return (P, E); + end if; + end Two_Prod; + + ------------- + -- Two_Sqr -- + ------------- + + function Two_Sqr (A : Num) return Double_T is + Q : constant Num := A * A; + + Hi, Lo, E : Num; + + begin + if Is_Infinity (Q) or else Is_Zero (Q) then + return (Q, 0.0); + + else + Split (A, Hi, Lo); + + E := ((Hi * Hi - Q) + 2.0 * Hi * Lo) + Lo * Lo; + + return (Q, E); + end if; + end Two_Sqr; + +end Product; diff --git a/gcc/ada/libgnat/s-dorepr__fma.adb b/gcc/ada/libgnat/s-dorepr__fma.adb new file mode 100644 index 0000000..56d4dbb --- /dev/null +++ b/gcc/ada/libgnat/s-dorepr__fma.adb @@ -0,0 +1,97 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- S Y S T E M . D O U B L E _ R E A L . P R O D U C T -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 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 is the version of the separate package body for targets with an FMA + +separate (System.Double_Real) + +package body Product is + + function Fused_Multiply_Add (A, B, C : Num) return Num; + -- Return the result of A * B + C without intermediate rounding + + ------------------------ + -- Fused_Multiply_Add -- + ------------------------ + + function Fused_Multiply_Add (A, B, C : Num) return Num is + begin + case Num'Size is + when 32 => + declare + function Do_FMA (A, B, C : Num) return Num; + pragma Import (Intrinsic, Do_FMA, "__builtin_fmaf"); + + begin + return Do_FMA (A, B, C); + end; + + when 64 => + declare + function Do_FMA (A, B, C : Num) return Num; + pragma Import (Intrinsic, Do_FMA, "__builtin_fma"); + + begin + return Do_FMA (A, B, C); + end; + + when others => + raise Program_Error; + end case; + end Fused_Multiply_Add; + + -------------- + -- Two_Prod -- + -------------- + + function Two_Prod (A, B : Num) return Double_T is + P : constant Num := A * B; + + E : Num; + + begin + if Is_Infinity (P) or else Is_Zero (P) then + return (P, 0.0); + + else + E := Fused_Multiply_Add (A, B, -P); + + return (P, E); + end if; + end Two_Prod; + + ------------- + -- Two_Sqr -- + ------------- + + function Two_Sqr (A : Num) return Double_T is (Two_Prod (A, A)); + +end Product; diff --git a/gcc/ada/libgnat/s-dourea.adb b/gcc/ada/libgnat/s-dourea.adb new file mode 100644 index 0000000..53bed1d --- /dev/null +++ b/gcc/ada/libgnat/s-dourea.adb @@ -0,0 +1,258 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- S Y S T E M . D O U B L E _ R E A L -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 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. -- +-- -- +------------------------------------------------------------------------------ + +package body System.Double_Real is + + function Is_NaN (N : Num) return Boolean is (N /= N); + -- Return True if N is a NaN + + function Is_Infinity (N : Num) return Boolean is (Is_NaN (N - N)); + -- Return True if N is an infinity. Used to avoid propagating meaningless + -- errors when the result of a product is an infinity. + + function Is_Zero (N : Num) return Boolean is (N = -N); + -- Return True if N is a Zero. Used to preserve the sign when the result of + -- a product is a zero. + + package Product is + function Two_Prod (A, B : Num) return Double_T; + function Two_Sqr (A : Num) return Double_T; + end Product; + -- The low-level implementation of multiplicative operations + + package body Product is separate; + -- This is a separate body because the implementation depends on whether a + -- Fused Multiply-Add instruction is available on the target. + + ------------------- + -- Quick_Two_Sum -- + ------------------- + + function Quick_Two_Sum (A, B : Num) return Double_T is + S : constant Num := A + B; + V : constant Num := S - A; + E : constant Num := B - V; + + begin + return (S, E); + end Quick_Two_Sum; + + ------------- + -- Two_Sum -- + ------------- + + function Two_Sum (A, B : Num) return Double_T is + S : constant Num := A + B; + V : constant Num := S - A; + E : constant Num := (A - (S - V)) + (B - V); + + begin + return (S, E); + end Two_Sum; + + -------------- + -- Two_Diff -- + -------------- + + function Two_Diff (A, B : Num) return Double_T is + S : constant Num := A - B; + V : constant Num := S - A; + E : constant Num := (A - (S - V)) - (B + V); + + begin + return (S, E); + end Two_Diff; + + -------------- + -- Two_Prod -- + -------------- + + function Two_Prod (A, B : Num) return Double_T renames Product.Two_Prod; + + ------------- + -- Two_Sqr -- + ------------- + + function Two_Sqr (A : Num) return Double_T renames Product.Two_Sqr; + + --------- + -- "+" -- + --------- + + function "+" (A : Double_T; B : Num) return Double_T is + S : constant Double_T := Two_Sum (A.Hi, B); + + begin + return Quick_Two_Sum (S.Hi, S.Lo + A.Lo); + end "+"; + + function "+" (A, B : Double_T) return Double_T is + S1 : constant Double_T := Two_Sum (A.Hi, B.Hi); + S2 : constant Double_T := Two_Sum (A.Lo, B.Lo); + S3 : constant Double_T := Quick_Two_Sum (S1.Hi, S1.Lo + S2.Hi); + + begin + return Quick_Two_Sum (S3.Hi, S3.Lo + S2.Lo); + end "+"; + + --------- + -- "-" -- + --------- + + function "-" (A : Double_T; B : Num) return Double_T is + D : constant Double_T := Two_Diff (A.Hi, B); + + begin + return Quick_Two_Sum (D.Hi, D.Lo + A.Lo); + end "-"; + + function "-" (A, B : Double_T) return Double_T is + D1 : constant Double_T := Two_Diff (A.Hi, B.Hi); + D2 : constant Double_T := Two_Diff (A.Lo, B.Lo); + D3 : constant Double_T := Quick_Two_Sum (D1.Hi, D1.Lo + D2.Hi); + + begin + return Quick_Two_Sum (D3.Hi, D3.Lo + D2.Lo); + end "-"; + + --------- + -- "*" -- + --------- + + function "*" (A : Double_T; B : Num) return Double_T is + P : constant Double_T := Two_Prod (A.Hi, B); + + begin + if Is_Infinity (P.Hi) or else Is_Zero (P.Hi) then + return (P.Hi, 0.0); + else + return Quick_Two_Sum (P.Hi, P.Lo + A.Lo * B); + end if; + end "*"; + + function "*" (A, B : Double_T) return Double_T is + P : constant Double_T := Two_Prod (A.Hi, B.Hi); + + begin + if Is_Infinity (P.Hi) or else Is_Zero (P.Hi) then + return (P.Hi, 0.0); + else + return Quick_Two_Sum (P.Hi, P.Lo + A.Hi * B.Lo + A.Lo * B.Hi); + end if; + end "*"; + + --------- + -- "/" -- + --------- + + function "/" (A : Double_T; B : Num) return Double_T is + Q1, Q2 : Num; + P, R : Double_T; + + begin + Q1 := A.Hi / B; + + -- Compute R = A - B * Q1 + + P := Two_Prod (B, Q1); + R := Two_Diff (A.Hi, P.Hi); + R.Lo := (R.Lo + A.Lo) - P.Lo; + + Q2 := (R.Hi + R.Lo) / B; + + return Quick_Two_Sum (Q1, Q2); + end "/"; + + function "/" (A, B : Double_T) return Double_T is + Q1, Q2, Q3 : Num; + R, S : Double_T; + + begin + Q1 := A.Hi / B.Hi; + R := A - B * Q1; + + Q2 := R.Hi / B.Hi; + R := R - B * Q2; + + Q3 := R.Hi / B.Hi; + + S := Quick_Two_Sum (Q1, Q2); + return Quick_Two_Sum (S.Hi, S.Lo + Q3); + end "/"; + + --------- + -- Sqr -- + --------- + + function Sqr (A : Double_T) return Double_T is + Q : constant Double_T := Two_Sqr (A.Hi); + + begin + if Is_Infinity (Q.Hi) or else Is_Zero (Q.Hi) then + return (Q.Hi, 0.0); + else + return Quick_Two_Sum (Q.Hi, Q.Lo + 2.0 * A.Hi * A.Lo + A.Lo * A.Lo); + end if; + end Sqr; + + ------------------- + -- From_Unsigned -- + ------------------- + + function From_Unsigned (U : Uns) return Double_T is + begin + return To_Double (Num (U)); + end From_Unsigned; + + ----------------- + -- To_Unsigned -- + ----------------- + + function To_Unsigned (D : Double_T) return Uns is + Hi : constant Num := Num'Truncation (D.Hi); + + begin + -- If the high part is already an integer, add Floor of the low part, + -- which means subtract Ceiling of its opposite if it is negative. + + if Hi = D.Hi then + if D.Lo < 0.0 then + return Uns (Hi) - Uns (Num'Ceiling (-D.Lo)); + else + return Uns (Hi) + Uns (Num'Floor (D.Lo)); + end if; + + else + return Uns (Hi); + end if; + end To_Unsigned; + +end System.Double_Real; diff --git a/gcc/ada/libgnat/s-dourea.ads b/gcc/ada/libgnat/s-dourea.ads new file mode 100644 index 0000000..0c97f34 --- /dev/null +++ b/gcc/ada/libgnat/s-dourea.ads @@ -0,0 +1,123 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- S Y S T E M . D O U B L E _ R E A L -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 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 routines for supporting floating-point computations +-- in double precision, i.e. using a second number to estimate the error due +-- to rounding and more generally performing computations with twice as many +-- bits of mantissa. It is based on the Double-Double library available at +-- https://www.davidhbailey.com/dhbsoftware written by David H.Bailey et al. + +generic + + type Num is digits <>; + +package System.Double_Real is + pragma Pure; + + type Double_T is record + Hi, Lo : Num; + end record; + + function To_Double (N : Num) return Double_T is ((Hi => N, Lo => 0.0)); + -- Convert a single to a double real + + function To_Single (D : Double_T) return Num is (D.Hi); + -- Convert a double to a single real + + function Quick_Two_Sum (A, B : Num) return Double_T + with Pre => A = 0.0 or else abs (A) >= abs (B); + -- Compute A + B and its rounding error exactly, but assume |A| >= |B| + + function Two_Sum (A, B : Num) return Double_T; + -- Compute A + B and its rounding error exactly + + function Two_Diff (A, B : Num) return Double_T; + -- Compute A - B and its rounding error exactly + + function Two_Prod (A, B : Num) return Double_T; + -- Compute A * B and its rounding error exactly + + function Two_Sqr (A : Num) return Double_T; + -- Compute A * A and its rounding error exactly + + function "+" (A : Double_T; B : Num) return Double_T; + function "-" (A : Double_T; B : Num) return Double_T; + function "*" (A : Double_T; B : Num) return Double_T; + function "/" (A : Double_T; B : Num) return Double_T + with Pre => B /= 0.0; + -- Mixed precision arithmetic operations + + function "+" (A, B : Double_T) return Double_T; + function "-" (A, B : Double_T) return Double_T; + function "*" (A, B : Double_T) return Double_T; + function "/" (A, B : Double_T) return Double_T + with Pre => B.Hi /= 0.0; + -- Double precision arithmetic operations + + function Sqr (A : Double_T) return Double_T; + -- Faster version of A * A + + function "=" (A : Double_T; B : Num) return Boolean is + (A.Hi = B and then A.Lo = 0.0); + function "<" (A : Double_T; B : Num) return Boolean is + (A.Hi < B or else (A.Hi = B and then A.Lo < 0.0)); + function "<=" (A : Double_T; B : Num) return Boolean is + (A.Hi < B or else (A.Hi = B and then A.Lo <= 0.0)); + function ">" (A : Double_T; B : Num) return Boolean is + (A.Hi > B or else (A.Hi = B and then A.Lo > 0.0)); + function ">=" (A : Double_T; B : Num) return Boolean is + (A.Hi > B or else (A.Hi = B and then A.Lo >= 0.0)); + -- Mixed precision comparisons + + function "=" (A, B : Double_T) return Boolean is + (A.Hi = B.Hi and then A.Lo = B.Lo); + function "<" (A, B : Double_T) return Boolean is + (A.Hi < B.Hi or else (A.Hi = B.Hi and then A.Lo < B.Lo)); + function "<=" (A, B : Double_T) return Boolean is + (A.Hi < B.Hi or else (A.Hi = B.Hi and then A.Lo <= B.Lo)); + function ">" (A, B : Double_T) return Boolean is + (A.Hi > B.Hi or else (A.Hi = B.Hi and then A.Lo > B.Lo)); + function ">=" (A, B : Double_T) return Boolean is + (A.Hi > B.Hi or else (A.Hi = B.Hi and then A.Lo >= B.Lo)); + -- Double precision comparisons + + generic + type Uns is mod <>; + function From_Unsigned (U : Uns) return Double_T; + -- Convert Uns to Double_T + + generic + type Uns is mod <>; + function To_Unsigned (D : Double_T) return Uns + with Pre => D >= 0.0; + -- Convert Double_T to Uns with truncation + +end System.Double_Real; diff --git a/gcc/ada/libgnat/s-dsaser.ads b/gcc/ada/libgnat/s-dsaser.ads index 4f38d8b..da0d17b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2021, 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 d8b15c5d..4a9d538 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- @@ -30,20 +30,20 @@ ------------------------------------------------------------------------------ with Ada.Characters.Handling; +with Ada.Containers.Generic_Array_Sort; with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback; with Ada.Unchecked_Deallocation; -with Ada.Containers.Generic_Array_Sort; with Interfaces; use Interfaces; with System; use System; -with System.Storage_Elements; use System.Storage_Elements; with System.Address_Image; +with System.Bounded_Strings; use System.Bounded_Strings; with System.IO; use System.IO; +with System.Mmap; use System.Mmap; with System.Object_Reader; use System.Object_Reader; with System.Traceback_Entries; use System.Traceback_Entries; -with System.Mmap; use System.Mmap; -with System.Bounded_Strings; use System.Bounded_Strings; +with System.Storage_Elements; use System.Storage_Elements; package body System.Dwarf_Lines is @@ -60,13 +60,19 @@ package body System.Dwarf_Lines is (S : in out Mapped_Stream; Len : out Offset; Is64 : out Boolean); - -- Read initial length as specified by Dwarf-4 7.2.2 + -- Read initial length as specified by 7.2.2 procedure Read_Section_Offset (S : in out Mapped_Stream; Len : out Offset; Is64 : Boolean); - -- Read a section offset, as specified by Dwarf-4 7.4 + -- Read a section offset, as specified by 7.4 + + procedure Read_Entry_Format_Array + (S : in out Mapped_Stream; + A : out Entry_Format_Array; + Len : uint8); + -- Read an entry format array, as specified by 6.2.4.1 procedure Read_Aranges_Entry (C : in out Dwarf_Context; @@ -111,26 +117,26 @@ package body System.Dwarf_Lines is -- a compilation unit. procedure Initialize_Pass (C : in out Dwarf_Context); - -- Seek to the first byte of the first prologue and prepare to make a pass + -- Seek to the first byte of the first header and prepare to make a pass -- over the line number entries. procedure Initialize_State_Machine (C : in out Dwarf_Context); -- Set all state machine registers to their specified initial values - procedure Parse_Prologue (C : in out Dwarf_Context); - -- Decode a DWARF statement program prologue + procedure Parse_Header (C : in out Dwarf_Context); + -- Decode a DWARF statement program header - procedure Read_And_Execute_Isn + procedure Read_And_Execute_Insn (C : in out Dwarf_Context; Done : out Boolean); -- Read an execute a statement program instruction function To_File_Name (C : in out Dwarf_Context; - Code : uint32) return String; - -- Extract a file name from the prologue + File : uint32) return String; + -- Extract a file name from the header - type Callback is access procedure (C : in out Dwarf_Context); + type Callback is not null access procedure (C : in out Dwarf_Context); procedure For_Each_Row (C : in out Dwarf_Context; F : Callback); -- Traverse each .debug_line entry with a callback @@ -158,8 +164,25 @@ package body System.Dwarf_Lines is -- DWARF constants -- ----------------------- + -- 3.1.1 Full and Partial Compilation Unit Entries + + DW_TAG_Compile_Unit : constant := 16#11#; + + DW_AT_Stmt_List : constant := 16#10#; + + -- 6.2.4.1 Standard Content Descriptions (DWARF 5) + + DW_LNCT_path : constant := 1; + DW_LNCT_directory_index : constant := 2; + -- DW_LNCT_timestamp : constant := 3; + -- DW_LNCT_size : constant := 4; + DW_LNCT_MD5 : constant := 5; + DW_LNCT_lo_user : constant := 16#2000#; + DW_LNCT_hi_user : constant := 16#3fff#; + -- 6.2.5.2 Standard Opcodes + DW_LNS_extended_op : constant := 0; DW_LNS_copy : constant := 1; DW_LNS_advance_pc : constant := 2; DW_LNS_advance_line : constant := 3; @@ -175,45 +198,56 @@ package body System.Dwarf_Lines is -- 6.2.5.3 Extended Opcodes - DW_LNE_end_sequence : constant := 1; - DW_LNE_set_address : constant := 2; - DW_LNE_define_file : constant := 3; - - -- From the DWARF version 4 public review draft - + DW_LNE_end_sequence : constant := 1; + DW_LNE_set_address : constant := 2; + DW_LNE_define_file : constant := 3; DW_LNE_set_discriminator : constant := 4; - -- Attribute encodings - - DW_TAG_Compile_Unit : constant := 16#11#; - - DW_AT_Stmt_List : constant := 16#10#; - - DW_FORM_addr : constant := 16#01#; - DW_FORM_block2 : constant := 16#03#; - DW_FORM_block4 : constant := 16#04#; - DW_FORM_data2 : constant := 16#05#; - DW_FORM_data4 : constant := 16#06#; - DW_FORM_data8 : constant := 16#07#; - DW_FORM_string : constant := 16#08#; - DW_FORM_block : constant := 16#09#; - DW_FORM_block1 : constant := 16#0a#; - DW_FORM_data1 : constant := 16#0b#; - DW_FORM_flag : constant := 16#0c#; - DW_FORM_sdata : constant := 16#0d#; - DW_FORM_strp : constant := 16#0e#; - DW_FORM_udata : constant := 16#0f#; - DW_FORM_ref_addr : constant := 16#10#; - DW_FORM_ref1 : constant := 16#11#; - DW_FORM_ref2 : constant := 16#12#; - DW_FORM_ref4 : constant := 16#13#; - DW_FORM_ref8 : constant := 16#14#; - DW_FORM_ref_udata : constant := 16#15#; - DW_FORM_indirect : constant := 16#16#; - DW_FORM_sec_offset : constant := 16#17#; - DW_FORM_exprloc : constant := 16#18#; - DW_FORM_flag_present : constant := 16#19#; - DW_FORM_ref_sig8 : constant := 16#20#; + -- 7.5.5 Classes and Forms + + DW_FORM_addr : constant := 16#01#; + DW_FORM_block2 : constant := 16#03#; + DW_FORM_block4 : constant := 16#04#; + DW_FORM_data2 : constant := 16#05#; + DW_FORM_data4 : constant := 16#06#; + DW_FORM_data8 : constant := 16#07#; + DW_FORM_string : constant := 16#08#; + DW_FORM_block : constant := 16#09#; + DW_FORM_block1 : constant := 16#0a#; + DW_FORM_data1 : constant := 16#0b#; + DW_FORM_flag : constant := 16#0c#; + DW_FORM_sdata : constant := 16#0d#; + DW_FORM_strp : constant := 16#0e#; + DW_FORM_udata : constant := 16#0f#; + DW_FORM_ref_addr : constant := 16#10#; + DW_FORM_ref1 : constant := 16#11#; + DW_FORM_ref2 : constant := 16#12#; + DW_FORM_ref4 : constant := 16#13#; + DW_FORM_ref8 : constant := 16#14#; + DW_FORM_ref_udata : constant := 16#15#; + DW_FORM_indirect : constant := 16#16#; + DW_FORM_sec_offset : constant := 16#17#; + DW_FORM_exprloc : constant := 16#18#; + DW_FORM_flag_present : constant := 16#19#; + DW_FORM_strx : constant := 16#1a#; + DW_FORM_addrx : constant := 16#1b#; + DW_FORM_ref_sup4 : constant := 16#1c#; + DW_FORM_strp_sup : constant := 16#1d#; + DW_FORM_data16 : constant := 16#1e#; + DW_FORM_line_strp : constant := 16#1f#; + DW_FORM_ref_sig8 : constant := 16#20#; + DW_FORM_implicit_const : constant := 16#21#; + DW_FORM_loclistx : constant := 16#22#; + DW_FORM_rnglistx : constant := 16#23#; + DW_FORM_ref_sup8 : constant := 16#24#; + DW_FORM_strx1 : constant := 16#25#; + DW_FORM_strx2 : constant := 16#26#; + DW_FORM_strx3 : constant := 16#27#; + DW_FORM_strx4 : constant := 16#28#; + DW_FORM_addrx1 : constant := 16#29#; + DW_FORM_addrx2 : constant := 16#2a#; + DW_FORM_addrx3 : constant := 16#2b#; + DW_FORM_addrx4 : constant := 16#2c#; --------- -- "<" -- @@ -235,6 +269,7 @@ package body System.Dwarf_Lines is procedure Unchecked_Deallocation is new Ada.Unchecked_Deallocation (Search_Array, Search_Array_Access); + begin if C.Has_Debug then Close (C.Lines); @@ -265,6 +300,7 @@ package body System.Dwarf_Lines is procedure Dump_Row (C : in out Dwarf_Context) is PC : constant Integer_Address := Integer_Address (C.Registers.Address); Off : Offset; + begin Tell (C.Lines, Off); @@ -286,11 +322,13 @@ package body System.Dwarf_Lines is Cache : constant Search_Array_Access := C.Cache; S : Object_Symbol; Name : String_Ptr_Len; + begin if Cache = null then Put_Line ("No cache"); return; end if; + for I in Cache'Range loop declare E : Search_Entry renames Cache (I); @@ -322,7 +360,7 @@ package body System.Dwarf_Lines is Initialize_Pass (C); loop - Read_And_Execute_Isn (C, Done); + Read_And_Execute_Insn (C, Done); if C.Registers.Is_Row then F.all (C); @@ -339,8 +377,7 @@ package body System.Dwarf_Lines is procedure Initialize_Pass (C : in out Dwarf_Context) is begin Seek (C.Lines, 0); - C.Next_Prologue := 0; - + C.Next_Header := 0; Initialize_State_Machine (C); end Initialize_Pass; @@ -350,17 +387,16 @@ package body System.Dwarf_Lines is procedure Initialize_State_Machine (C : in out Dwarf_Context) is begin + -- Table 6.4: Line number program initial state + C.Registers := (Address => 0, File => 1, Line => 1, Column => 0, - Is_Stmt => C.Prologue.Default_Is_Stmt = 0, + Is_Stmt => C.Header.Default_Is_Stmt /= 0, Basic_Block => False, End_Sequence => False, - Prologue_End => False, - Epilogue_Begin => False, - ISA => 0, Is_Row => False); end Initialize_State_Machine; @@ -378,8 +414,7 @@ package body System.Dwarf_Lines is -- Low_Address -- ----------------- - function Low_Address (C : Dwarf_Context) - return System.Address is + function Low_Address (C : Dwarf_Context) return System.Address is begin return C.Load_Address + C.Low; end Low_Address; @@ -393,19 +428,24 @@ package body System.Dwarf_Lines is C : out Dwarf_Context; Success : out Boolean) is - Line_Sec, Info_Sec, Abbrev_Sec, Aranges_Sec : Object_Section; - Hi, Lo : uint64; + Abbrev, Aranges, Lines, Info, Line_Str : Object_Section; + Hi, Lo : uint64; + begin -- Not a success by default Success := False; - -- Open file + -- Open file with In_Exception set so we can control the failure mode - C.Obj := Open (File_Name, C.In_Exception); + C.Obj := Open (File_Name, In_Exception => True); if C.Obj = null then - return; + if C.In_Exception then + return; + else + raise Dwarf_Error with "could not open file"; + end if; end if; Success := True; @@ -420,21 +460,23 @@ package body System.Dwarf_Lines is -- Create a stream for debug sections if Format (C.Obj.all) = XCOFF32 then - Line_Sec := Get_Section (C.Obj.all, ".dwline"); - Abbrev_Sec := Get_Section (C.Obj.all, ".dwabrev"); - Info_Sec := Get_Section (C.Obj.all, ".dwinfo"); - Aranges_Sec := Get_Section (C.Obj.all, ".dwarnge"); + Abbrev := Get_Section (C.Obj.all, ".dwabrev"); + Aranges := Get_Section (C.Obj.all, ".dwarnge"); + Info := Get_Section (C.Obj.all, ".dwinfo"); + Lines := Get_Section (C.Obj.all, ".dwline"); + Line_Str := Get_Section (C.Obj.all, ".dwlistr"); else - Line_Sec := Get_Section (C.Obj.all, ".debug_line"); - Abbrev_Sec := Get_Section (C.Obj.all, ".debug_abbrev"); - Info_Sec := Get_Section (C.Obj.all, ".debug_info"); - Aranges_Sec := Get_Section (C.Obj.all, ".debug_aranges"); + Abbrev := Get_Section (C.Obj.all, ".debug_abbrev"); + Aranges := Get_Section (C.Obj.all, ".debug_aranges"); + Info := Get_Section (C.Obj.all, ".debug_info"); + Lines := Get_Section (C.Obj.all, ".debug_line"); + Line_Str := Get_Section (C.Obj.all, ".debug_line_str"); end if; - if Line_Sec = Null_Section - or else Abbrev_Sec = Null_Section - or else Info_Sec = Null_Section - or else Aranges_Sec = Null_Section + if Abbrev = Null_Section + or else Aranges = Null_Section + or else Info = Null_Section + or else Lines = Null_Section then pragma Annotate (CodePeer, False_Positive, @@ -444,21 +486,29 @@ package body System.Dwarf_Lines is return; end if; - C.Lines := Create_Stream (C.Obj.all, Line_Sec); - C.Abbrev := Create_Stream (C.Obj.all, Abbrev_Sec); - C.Info := Create_Stream (C.Obj.all, Info_Sec); - C.Aranges := Create_Stream (C.Obj.all, Aranges_Sec); + C.Abbrev := Create_Stream (C.Obj.all, Abbrev); + C.Aranges := Create_Stream (C.Obj.all, Aranges); + C.Info := Create_Stream (C.Obj.all, Info); + C.Lines := Create_Stream (C.Obj.all, Lines); + + -- The .debug_line_str section may be available in DWARF 5 + + if Line_Str /= Null_Section then + C.Line_Str := Create_Stream (C.Obj.all, Line_Str); + end if; -- All operations are successful, context is valid C.Has_Debug := True; end Open; - -------------------- - -- Parse_Prologue -- - -------------------- + ------------------ + -- Parse_Header -- + ------------------ + + procedure Parse_Header (C : in out Dwarf_Context) is + Header : Line_Info_Header renames C.Header; - procedure Parse_Prologue (C : in out Dwarf_Context) is Char : uint8; Prev : uint8; -- The most recently read character and the one preceding it @@ -469,94 +519,147 @@ package body System.Dwarf_Lines is Buf : Buffer; Off : Offset; - First_Byte_Of_Prologue : Offset; - Last_Byte_Of_Prologue : Offset; - - Max_Op_Per_Insn : uint8; - pragma Unreferenced (Max_Op_Per_Insn); + First_Byte_Of_Header : Offset; + Last_Byte_Of_Header : Offset; - Prologue : Line_Info_Prologue renames C.Prologue; + Standard_Opcode_Lengths : Opcode_Length_Array; + pragma Unreferenced (Standard_Opcode_Lengths); begin - Tell (C.Lines, First_Byte_Of_Prologue); - Prologue.Unit_Length := Read (C.Lines); + Tell (C.Lines, First_Byte_Of_Header); + + Read_Initial_Length (C.Lines, Header.Unit_Length, Header.Is64); + Tell (C.Lines, Off); - C.Next_Prologue := Off + Offset (Prologue.Unit_Length); + C.Next_Header := Off + Header.Unit_Length; + + Header.Version := Read (C.Lines); + + if Header.Version >= 5 then + Header.Address_Size := Read (C.Lines); + Header.Segment_Selector_Size := Read (C.Lines); + else + Header.Address_Size := 0; + Header.Segment_Selector_Size := 0; + end if; - Prologue.Version := Read (C.Lines); - Prologue.Prologue_Length := Read (C.Lines); - Tell (C.Lines, Last_Byte_Of_Prologue); - Last_Byte_Of_Prologue := - Last_Byte_Of_Prologue + Offset (Prologue.Prologue_Length) - 1; + Header.Header_Length := Read (C.Lines); + Tell (C.Lines, Last_Byte_Of_Header); + Last_Byte_Of_Header := + Last_Byte_Of_Header + Offset (Header.Header_Length) - 1; - Prologue.Min_Isn_Length := Read (C.Lines); + Header.Minimum_Insn_Length := Read (C.Lines); - if Prologue.Version >= 4 then - Max_Op_Per_Insn := Read (C.Lines); + if Header.Version >= 4 then + Header.Maximum_Op_Per_Insn := Read (C.Lines); + else + Header.Maximum_Op_Per_Insn := 0; end if; - Prologue.Default_Is_Stmt := Read (C.Lines); - Prologue.Line_Base := Read (C.Lines); - Prologue.Line_Range := Read (C.Lines); - Prologue.Opcode_Base := Read (C.Lines); + Header.Default_Is_Stmt := Read (C.Lines); + Header.Line_Base := Read (C.Lines); + Header.Line_Range := Read (C.Lines); + Header.Opcode_Base := Read (C.Lines); - -- Opcode_Lengths is an array of Opcode_Base bytes specifying the number - -- of LEB128 operands for each of the standard opcodes. + -- Standard_Opcode_Lengths is an array of Opcode_Base bytes specifying + -- the number of LEB128 operands for each of the standard opcodes. - for J in 1 .. uint32 (Prologue.Opcode_Base - 1) loop - Prologue.Opcode_Lengths (J) := Read (C.Lines); + for J in 1 .. Integer (Header.Opcode_Base - 1) loop + Standard_Opcode_Lengths (J) := Read (C.Lines); end loop; - -- The include directories table follows. This is a list of null - -- terminated strings terminated by a double null. We only store - -- its offset for later decoding. + -- The directories table follows. Up to DWARF 4, this is a list of null + -- terminated strings terminated by a null byte. In DWARF 5, this is a + -- sequence of Directories_Count entries encoded as described by the + -- Directory_Entry_Format field. We store its offset for later decoding. - Tell (C.Lines, Prologue.Includes_Offset); - Char := Read (C.Lines); + if Header.Version <= 4 then + Tell (C.Lines, Header.Directories); + Char := Read (C.Lines); - if Char /= 0 then - loop - Prev := Char; - Char := Read (C.Lines); - exit when Char = 0 and Prev = 0; + if Char /= 0 then + loop + Prev := Char; + Char := Read (C.Lines); + exit when Char = 0 and Prev = 0; + end loop; + end if; + + else + Header.Directory_Entry_Format_Count := Read (C.Lines); + Read_Entry_Format_Array (C.Lines, + Header.Directory_Entry_Format, + Header.Directory_Entry_Format_Count); + + Header.Directories_Count := Read_LEB128 (C.Lines); + Tell (C.Lines, Header.Directories); + for J in 1 .. Header.Directories_Count loop + for K in 1 .. Integer (Header.Directory_Entry_Format_Count) loop + Skip_Form (C.Lines, + Header.Directory_Entry_Format (K).Form, + Header.Is64, + Header.Address_Size); + end loop; end loop; end if; - -- The file_names table is next. Each record is a null terminated string - -- for the file name, an unsigned LEB128 directory index, an unsigned - -- LEB128 modification time, and an LEB128 file length. The table is - -- terminated by a null byte. + -- The file_names table is next. Up to DWARF 4, this is a list of record + -- containing a null terminated string for the file name, an unsigned + -- LEB128 directory index in the Directories table, an unsigned LEB128 + -- modification time, and an unsigned LEB128 for the file length; the + -- table is terminated by a null byte. In DWARF 5, this is a sequence + -- of File_Names_Count entries encoded as described by the + -- File_Name_Entry_Format field. We store its offset for later decoding. - Tell (C.Lines, Prologue.File_Names_Offset); + if Header.Version <= 4 then + Tell (C.Lines, Header.File_Names); - loop - -- Read the filename + -- Read the file names - Read_C_String (C.Lines, Buf); - exit when Buf (0) = 0; - Dummy := Read_LEB128 (C.Lines); -- Skip the directory index. - Dummy := Read_LEB128 (C.Lines); -- Skip the modification time. - Dummy := Read_LEB128 (C.Lines); -- Skip the file length. - end loop; + loop + Read_C_String (C.Lines, Buf); + exit when Buf (0) = 0; + Dummy := Read_LEB128 (C.Lines); -- Skip the directory index. + Dummy := Read_LEB128 (C.Lines); -- Skip the modification time. + Dummy := Read_LEB128 (C.Lines); -- Skip the file length. + end loop; + + else + Header.File_Name_Entry_Format_Count := Read (C.Lines); + Read_Entry_Format_Array (C.Lines, + Header.File_Name_Entry_Format, + Header.File_Name_Entry_Format_Count); + + Header.File_Names_Count := Read_LEB128 (C.Lines); + Tell (C.Lines, Header.File_Names); + for J in 1 .. Header.File_Names_Count loop + for K in 1 .. Integer (Header.File_Name_Entry_Format_Count) loop + Skip_Form (C.Lines, + Header.File_Name_Entry_Format (K).Form, + Header.Is64, + Header.Address_Size); + end loop; + end loop; + end if; -- Check we're where we think we are. This sanity check ensures we think - -- the prologue ends where the prologue says it does. It we aren't then - -- we've probably gotten out of sync somewhere. + -- the header ends where the header says it does. It we aren't, then we + -- have probably gotten out of sync somewhere. Tell (C.Lines, Off); - if Prologue.Unit_Length /= 0 - and then Off /= Last_Byte_Of_Prologue + 1 + if Header.Unit_Length /= 0 + and then Off /= Last_Byte_Of_Header + 1 then - raise Dwarf_Error with "Parse error reading DWARF information"; + raise Dwarf_Error with "parse error reading DWARF information"; end if; - end Parse_Prologue; + end Parse_Header; - -------------------------- - -- Read_And_Execute_Isn -- - -------------------------- + --------------------------- + -- Read_And_Execute_Insn -- + --------------------------- - procedure Read_And_Execute_Isn + procedure Read_And_Execute_Insn (C : in out Dwarf_Context; Done : out Boolean) is @@ -572,7 +675,7 @@ package body System.Dwarf_Lines is Obj : Object_File renames C.Obj.all; Registers : Line_Info_Registers renames C.Registers; - Prologue : Line_Info_Prologue renames C.Prologue; + Header : Line_Info_Header renames C.Header; begin Done := False; @@ -582,8 +685,8 @@ package body System.Dwarf_Lines is Initialize_State_Machine (C); end if; - -- If we have reached the next prologue, read it. Beware of possibly - -- empty blocks. + -- If we have reached the next header, read it. Beware of possibly empty + -- blocks. -- When testing for the end of section, beware of possible zero padding -- at the end. Bail out as soon as there's not even room for at least a @@ -592,9 +695,9 @@ package body System.Dwarf_Lines is -- or Off+3 > Section_Length. Tell (C.Lines, Off); - while Off = C.Next_Prologue loop + while Off = C.Next_Header loop Initialize_State_Machine (C); - Parse_Prologue (C); + Parse_Header (C); Tell (C.Lines, Off); exit when Off + 3 > Length (C.Lines); end loop; @@ -606,7 +709,7 @@ package body System.Dwarf_Lines is -- We are finished when we either reach the end of the section, or we -- have reached zero padding at the end of the section. - if Prologue.Unit_Length = 0 or else Off + 3 > Length (C.Lines) then + if Header.Unit_Length = 0 or else Off + 3 > Length (C.Lines) then Done := True; return; end if; @@ -617,7 +720,7 @@ package body System.Dwarf_Lines is -- Extended opcodes - if Opcode = 0 then + if Opcode = DW_LNS_extended_op then Extended_Length := Read_LEB128 (C.Lines); Extended_Opcode := Read (C.Lines); @@ -656,7 +759,7 @@ package body System.Dwarf_Lines is -- Standard opcodes - elsif Opcode < Prologue.Opcode_Base then + elsif Opcode < Header.Opcode_Base then case Opcode is -- Append a row to the line info matrix @@ -671,7 +774,7 @@ package body System.Dwarf_Lines is uint32_Operand := Read_LEB128 (C.Lines); Registers.Address := Registers.Address + - uint64 (uint32_Operand * uint32 (Prologue.Min_Isn_Length)); + uint64 (uint32_Operand * uint32 (Header.Minimum_Insn_Length)); -- Add a signed word to the current source line @@ -708,8 +811,8 @@ package body System.Dwarf_Lines is Registers.Address := Registers.Address + uint64 - (((255 - Prologue.Opcode_Base) / Prologue.Line_Range) * - Prologue.Min_Isn_Length); + (((255 - Header.Opcode_Base) / Header.Line_Range) * + Header.Minimum_Insn_Length); -- Advance the program counter by a constant @@ -744,7 +847,7 @@ package body System.Dwarf_Lines is Line_Increment : int32; begin - Opcode := Opcode - Prologue.Opcode_Base; + Opcode := Opcode - Header.Opcode_Base; -- The adjusted opcode is a uint8 encoding an address increment -- and a signed line increment. The upperbound is allowed to be @@ -752,18 +855,16 @@ package body System.Dwarf_Lines is -- prevent overflows. Address_Increment := - int32 (Opcode / Prologue.Line_Range) * - int32 (Prologue.Min_Isn_Length); + int32 (Opcode / Header.Line_Range) * + int32 (Header.Minimum_Insn_Length); Line_Increment := - int32 (Prologue.Line_Base) + - int32 (Opcode mod Prologue.Line_Range); + int32 (Header.Line_Base) + + int32 (Opcode mod Header.Line_Range); Registers.Address := Registers.Address + uint64 (Address_Increment); Registers.Line := uint32 (int32 (Registers.Line) + Line_Increment); Registers.Basic_Block := False; - Registers.Prologue_End := False; - Registers.Epilogue_Begin := False; Registers.Is_Row := True; end; end if; @@ -775,7 +876,7 @@ package body System.Dwarf_Lines is Registers.Is_Row := False; Done := True; - end Read_And_Execute_Isn; + end Read_And_Execute_Insn; ---------------------- -- Set_Load_Address -- @@ -792,10 +893,10 @@ package body System.Dwarf_Lines is function To_File_Name (C : in out Dwarf_Context; - Code : uint32) return String + File : uint32) return String is Buf : Buffer; - J : uint32; + Off : Offset; Dir_Idx : uint32; pragma Unreferenced (Dir_Idx); @@ -806,25 +907,56 @@ package body System.Dwarf_Lines is Length : uint32; pragma Unreferenced (Length); + File_Entry_Format : Entry_Format_Array + renames C.Header.File_Name_Entry_Format; + begin - Seek (C.Lines, C.Prologue.File_Names_Offset); + Seek (C.Lines, C.Header.File_Names); - -- Find the entry + -- Find the entry. Note that, up to DWARF 4, the index is 1-based + -- whereas, in DWARF 5, it is 0-based. - J := 0; - loop - J := J + 1; - Read_C_String (C.Lines, Buf); + if C.Header.Version <= 4 then + for J in 1 .. File loop + Read_C_String (C.Lines, Buf); - if Buf (Buf'First) = 0 then - return "???"; - end if; + if Buf (Buf'First) = 0 then + return "???"; + end if; - Dir_Idx := Read_LEB128 (C.Lines); - Mod_Time := Read_LEB128 (C.Lines); - Length := Read_LEB128 (C.Lines); - exit when J = Code; - end loop; + Dir_Idx := Read_LEB128 (C.Lines); + Mod_Time := Read_LEB128 (C.Lines); + Length := Read_LEB128 (C.Lines); + end loop; + + -- DWARF 5 + + else + for J in 0 .. File loop + for K in 1 .. Integer (C.Header.File_Name_Entry_Format_Count) loop + if File_Entry_Format (K).C_Type = DW_LNCT_path then + case File_Entry_Format (K).Form is + when DW_FORM_string => + Read_C_String (C.Lines, Buf); + + when DW_FORM_line_strp => + Read_Section_Offset (C.Lines, Off, C.Header.Is64); + Seek (C.Line_Str, Off); + Read_C_String (C.Line_Str, Buf); + + when others => + raise Dwarf_Error with "DWARF form not implemented"; + end case; + + else + Skip_Form (C.Lines, + File_Entry_Format (K).Form, + C.Header.Is64, + C.Header.Address_Size); + end if; + end loop; + end loop; + end if; return To_String (Buf); end To_File_Name; @@ -840,6 +972,7 @@ package body System.Dwarf_Lines is is Len32 : uint32; Len64 : uint64; + begin Len32 := Read (S); if Len32 < 16#ffff_fff0# then @@ -872,6 +1005,43 @@ package body System.Dwarf_Lines is end if; end Read_Section_Offset; + ----------------------------- + -- Read_Entry_Format_Array -- + ----------------------------- + + procedure Read_Entry_Format_Array + (S : in out Mapped_Stream; + A : out Entry_Format_Array; + Len : uint8) + is + C_Type, Form : uint32; + N : Integer; + + begin + N := A'First; + + for J in 1 .. Len loop + C_Type := Read_LEB128 (S); + Form := Read_LEB128 (S); + + case C_Type is + when DW_LNCT_path .. DW_LNCT_MD5 => + if N not in A'Range then + raise Dwarf_Error with "DWARF duplicate content type"; + end if; + + A (N) := (C_Type, Form); + N := N + 1; + + when DW_LNCT_lo_user .. DW_LNCT_hi_user => + null; + + when others => + raise Dwarf_Error with "DWARF content type not implemented"; + end case; + end loop; + end Read_Entry_Format_Array; + -------------------- -- Aranges_Lookup -- -------------------- @@ -921,31 +1091,53 @@ package body System.Dwarf_Lines is Ptr_Sz : uint8) is Skip : Offset; + begin + -- 7.5.5 Classes and Forms + case Form is when DW_FORM_addr => Skip := Offset (Ptr_Sz); + when DW_FORM_addrx => + Skip := Offset (uint32'(Read_LEB128 (S))); + when DW_FORM_block1 => + Skip := Offset (uint8'(Read (S))); when DW_FORM_block2 => Skip := Offset (uint16'(Read (S))); when DW_FORM_block4 => Skip := Offset (uint32'(Read (S))); - when DW_FORM_data2 | DW_FORM_ref2 => - Skip := 2; - when DW_FORM_data4 | DW_FORM_ref4 => - Skip := 4; - when DW_FORM_data8 | DW_FORM_ref8 | DW_FORM_ref_sig8 => - Skip := 8; - when DW_FORM_string => - while uint8'(Read (S)) /= 0 loop - null; - end loop; - return; when DW_FORM_block | DW_FORM_exprloc => Skip := Offset (uint32'(Read_LEB128 (S))); - when DW_FORM_block1 | DW_FORM_ref1 => - Skip := Offset (uint8'(Read (S))); - when DW_FORM_data1 | DW_FORM_flag => + when DW_FORM_addrx1 + | DW_FORM_data1 + | DW_FORM_flag + | DW_FORM_ref1 + | DW_FORM_strx1 + => Skip := 1; + when DW_FORM_addrx2 + | DW_FORM_data2 + | DW_FORM_ref2 + | DW_FORM_strx2 + => + Skip := 2; + when DW_FORM_addrx3 | DW_FORM_strx3 => + Skip := 3; + when DW_FORM_addrx4 + | DW_FORM_data4 + | DW_FORM_ref4 + | DW_FORM_ref_sup4 + | DW_FORM_strx4 + => + Skip := 4; + when DW_FORM_data8 + | DW_FORM_ref8 + | DW_FORM_ref_sup8 + | DW_FORM_ref_sig8 + => + Skip := 8; + when DW_FORM_data16 => + Skip := 16; when DW_FORM_sdata => declare Val : constant int32 := Read_LEB128 (S); @@ -953,9 +1145,12 @@ package body System.Dwarf_Lines is begin return; end; - when DW_FORM_strp | DW_FORM_ref_addr | DW_FORM_sec_offset => - Skip := (if Is64 then 8 else 4); - when DW_FORM_udata | DW_FORM_ref_udata => + when DW_FORM_udata + | DW_FORM_ref_udata + | DW_FORM_loclistx + | DW_FORM_rnglistx + | DW_FORM_strx + => declare Val : constant uint32 := Read_LEB128 (S); pragma Unreferenced (Val); @@ -964,11 +1159,24 @@ package body System.Dwarf_Lines is end; when DW_FORM_flag_present => return; - when DW_FORM_indirect => + when DW_FORM_ref_addr + | DW_FORM_sec_offset + | DW_FORM_strp + | DW_FORM_line_strp + | DW_FORM_strp_sup + => + Skip := (if Is64 then 8 else 4); + when DW_FORM_string => + while uint8'(Read (S)) /= 0 loop + null; + end loop; + return; + when DW_FORM_implicit_const | DW_FORM_indirect => raise Constraint_Error; when others => raise Constraint_Error; end case; + Seek (S, Tell (S) + Skip); end Skip_Form; @@ -981,20 +1189,21 @@ package body System.Dwarf_Lines is Abbrev_Offset : Offset; Abbrev_Num : uint32) is - Num : uint32; Abbrev : uint32; Tag : uint32; Has_Child : uint8; - pragma Unreferenced (Abbrev, Tag, Has_Child); + pragma Unreferenced (Tag, Has_Child); + begin Seek (C.Abbrev, Abbrev_Offset); - Num := 1; + -- 7.5.3 Abbreviations Tables loop - exit when Num = Abbrev_Num; + Abbrev := Read_LEB128 (C.Abbrev); + + exit when Abbrev = Abbrev_Num; - Abbrev := Read_LEB128 (C.Abbrev); Tag := Read_LEB128 (C.Abbrev); Has_Child := Read (C.Abbrev); @@ -1002,12 +1211,19 @@ package body System.Dwarf_Lines is declare Name : constant uint32 := Read_LEB128 (C.Abbrev); Form : constant uint32 := Read_LEB128 (C.Abbrev); + Cst : int32; + pragma Unreferenced (Cst); + begin - exit when Name = 0 and Form = 0; + -- DW_FORM_implicit_const takes its value from the table + + if Form = DW_FORM_implicit_const then + Cst := Read_LEB128 (C.Abbrev); + end if; + + exit when Name = 0 and then Form = 0; end; end loop; - - Num := Num + 1; end loop; end Seek_Abbrev; @@ -1029,23 +1245,40 @@ package body System.Dwarf_Lines is Abbrev : uint32; Has_Child : uint8; pragma Unreferenced (Has_Child); + Unit_Type : uint8; + pragma Unreferenced (Unit_Type); + begin Line_Offset := 0; Success := False; Seek (C.Info, Info_Offset); + -- 7.5.1.1 Compilation Unit Header + Read_Initial_Length (C.Info, Unit_Length, Is64); Version := Read (C.Info); - if Version not in 2 .. 4 then - return; - end if; - Read_Section_Offset (C.Info, Abbrev_Offset, Is64); + if Version >= 5 then + Unit_Type := Read (C.Info); + + Addr_Sz := Read (C.Info); + if Addr_Sz /= (Address'Size / SSU) then + return; + end if; + + Read_Section_Offset (C.Info, Abbrev_Offset, Is64); + + elsif Version >= 2 then + Read_Section_Offset (C.Info, Abbrev_Offset, Is64); + + Addr_Sz := Read (C.Info); + if Addr_Sz /= (Address'Size / SSU) then + return; + end if; - Addr_Sz := Read (C.Info); - if Addr_Sz /= (Address'Size / SSU) then + else return; end if; @@ -1060,17 +1293,9 @@ package body System.Dwarf_Lines is Seek_Abbrev (C, Abbrev_Offset, Abbrev); - -- First ULEB128 is the abbrev code - - if Read_LEB128 (C.Abbrev) /= Abbrev then - -- Ill formed abbrev table - return; - end if; - -- Then the tag if Read_LEB128 (C.Abbrev) /= uint32'(DW_TAG_Compile_Unit) then - -- Expect compile unit return; end if; @@ -1104,8 +1329,6 @@ package body System.Dwarf_Lines is end if; end; end loop; - - return; end Debug_Info_Lookup; ------------------------- @@ -1121,6 +1344,7 @@ package body System.Dwarf_Lines is Is64 : Boolean; Version : uint16; Sz : uint8; + begin Success := False; Info_Offset := 0; @@ -1149,6 +1373,7 @@ package body System.Dwarf_Lines is end if; -- Handle alignment on twice the address size + declare Cur_Off : constant Offset := Tell (C.Aranges); Align : constant Offset := 2 * Address'Size / SSU; @@ -1173,6 +1398,7 @@ package body System.Dwarf_Lines is is begin -- Read table + if Address'Size = 32 then declare S, L : uint32; @@ -1182,6 +1408,7 @@ package body System.Dwarf_Lines is Start := Storage_Offset (S); Len := Storage_Count (L); end; + elsif Address'Size = 64 then declare S, L : uint64; @@ -1191,6 +1418,7 @@ package body System.Dwarf_Lines is Start := Storage_Offset (S); Len := Storage_Count (L); end; + else raise Constraint_Error; end if; @@ -1202,8 +1430,11 @@ package body System.Dwarf_Lines is procedure Enable_Cache (C : in out Dwarf_Context) is Cache : Search_Array_Access; + begin - -- Phase 1: count number of symbols. Phase 2: fill the cache. + -- Phase 1: count number of symbols. + -- Phase 2: fill the cache. + declare S : Object_Symbol; Val : uint64; @@ -1220,6 +1451,7 @@ package body System.Dwarf_Lines is while S /= Null_Symbol loop -- Discard symbols of length 0 or located outside of the -- execution code section outer boundaries. + Sz := uint32 (Size (S)); Val := Value (S); @@ -1227,11 +1459,11 @@ package body System.Dwarf_Lines is and then Val >= Xcode_Low and then Val <= Xcode_High then - Addr := uint32 (Val - Xcode_Low); -- Try to filter symbols at the same address. This is a best -- effort as they might not be consecutive. + if Addr /= Prev_Addr then Nbr_Symbols := Nbr_Symbols + 1; Prev_Addr := Addr; @@ -1251,6 +1483,7 @@ package body System.Dwarf_Lines is if Phase = 1 then -- Allocate the cache + Cache := new Search_Array (1 .. Nbr_Symbols); C.Cache := Cache; end if; @@ -1258,13 +1491,16 @@ package body System.Dwarf_Lines is pragma Assert (Nbr_Symbols = C.Cache'Last); end; - -- Sort the cache. + -- Sort the cache + Sort_Search_Array (C.Cache.all); -- Set line offsets + if not C.Has_Debug then return; end if; + declare Info_Offset : Offset; Line_Offset : Offset; @@ -1285,6 +1521,7 @@ package body System.Dwarf_Lines is exit when not Success; -- Read table + loop Read_Aranges_Entry (C, Ar_Start, Ar_Len); exit when Ar_Start = 0 and Ar_Len = 0; @@ -1293,6 +1530,7 @@ package body System.Dwarf_Lines is Start := uint32 (Ar_Start - C.Low); -- Search START in the array + First := Cache'First; Last := Cache'Last; Mid := First; -- In case of array with one element @@ -1307,9 +1545,10 @@ package body System.Dwarf_Lines is end if; end loop; - -- Fill info. + -- Fill info -- There can be overlapping symbols + while Mid > Cache'First and then Cache (Mid - 1).First <= Start and then Cache (Mid - 1).First + Cache (Mid - 1).Size > Start @@ -1321,9 +1560,11 @@ package body System.Dwarf_Lines is and then Start + Len > Cache (Mid).First then -- MID is within the bounds + Cache (Mid).Line := uint32 (Line_Offset); elsif Start + Len <= Cache (Mid).First then -- Over + exit; end if; Mid := Mid + 1; @@ -1350,7 +1591,7 @@ package body System.Dwarf_Lines is procedure Set_Result (Match : Line_Info_Registers) is Dir_Idx : uint32; - J : uint32; + Off : Offset; Mod_Time : uint32; pragma Unreferenced (Mod_Time); @@ -1358,46 +1599,123 @@ package body System.Dwarf_Lines is Length : uint32; pragma Unreferenced (Length); + Directory_Entry_Format : Entry_Format_Array + renames C.Header.Directory_Entry_Format; + + File_Entry_Format : Entry_Format_Array + renames C.Header.File_Name_Entry_Format; + begin - Seek (C.Lines, C.Prologue.File_Names_Offset); + Seek (C.Lines, C.Header.File_Names); + Dir_Idx := 0; - -- Find the entry + -- Find the entry. Note that, up to DWARF 4, the index is 1-based + -- whereas, in DWARF 5, it is 0-based. - J := 0; - loop - J := J + 1; - File_Name := Read_C_String (C.Lines); + if C.Header.Version <= 4 then + for J in 1 .. Match.File loop + File_Name := Read_C_String (C.Lines); - if File_Name (File_Name'First) = ASCII.NUL then - -- End of file list, so incorrect entry - return; - end if; + if File_Name (File_Name'First) = ASCII.NUL then + -- End of file list, so incorrect entry + return; + end if; - Dir_Idx := Read_LEB128 (C.Lines); - Mod_Time := Read_LEB128 (C.Lines); - Length := Read_LEB128 (C.Lines); - exit when J = Match.File; - end loop; + Dir_Idx := Read_LEB128 (C.Lines); + Mod_Time := Read_LEB128 (C.Lines); + Length := Read_LEB128 (C.Lines); + end loop; + + if Dir_Idx = 0 then + -- No directory + + Dir_Name := null; + + else + Seek (C.Lines, C.Header.Directories); + + for J in 1 .. Dir_Idx loop + Dir_Name := Read_C_String (C.Lines); - if Dir_Idx = 0 then - -- No directory - Dir_Name := null; + if Dir_Name (Dir_Name'First) = ASCII.NUL then + -- End of directory list, so ill-formed table + + return; + end if; + end loop; + end if; + + -- DWARF 5 else - Seek (C.Lines, C.Prologue.Includes_Offset); + for J in 0 .. Match.File loop + for K in 1 .. Integer (C.Header.File_Name_Entry_Format_Count) + loop + if File_Entry_Format (K).C_Type = DW_LNCT_path then + case File_Entry_Format (K).Form is + when DW_FORM_string => + File_Name := Read_C_String (C.Lines); - J := 0; - loop - J := J + 1; - Dir_Name := Read_C_String (C.Lines); + when DW_FORM_line_strp => + Read_Section_Offset (C.Lines, Off, C.Header.Is64); + Seek (C.Line_Str, Off); + File_Name := Read_C_String (C.Line_Str); - if Dir_Name (Dir_Name'First) = ASCII.NUL then - -- End of directory list, so ill-formed table - return; - end if; + when others => + raise Dwarf_Error with "DWARF form not implemented"; + end case; + + elsif File_Entry_Format (K).C_Type = DW_LNCT_directory_index + then + case File_Entry_Format (K).Form is + when DW_FORM_data1 => + Dir_Idx := uint32 (uint8'(Read (C.Lines))); + + when DW_FORM_data2 => + Dir_Idx := uint32 (uint16'(Read (C.Lines))); + + when DW_FORM_udata => + Dir_Idx := Read_LEB128 (C.Lines); - exit when J = Dir_Idx; + when others => + raise Dwarf_Error with "invalid DWARF"; + end case; + else + Skip_Form (C.Lines, + File_Entry_Format (K).Form, + C.Header.Is64, + C.Header.Address_Size); + end if; + end loop; + end loop; + + Seek (C.Lines, C.Header.Directories); + + for J in 0 .. Dir_Idx loop + for K in 1 .. Integer (C.Header.Directory_Entry_Format_Count) + loop + if Directory_Entry_Format (K).C_Type = DW_LNCT_path then + case Directory_Entry_Format (K).Form is + when DW_FORM_string => + Dir_Name := Read_C_String (C.Lines); + + when DW_FORM_line_strp => + Read_Section_Offset (C.Lines, Off, C.Header.Is64); + Seek (C.Line_Str, Off); + Dir_Name := Read_C_String (C.Line_Str); + + when others => + raise Dwarf_Error with "DWARF form not implemented"; + end case; + + else + Skip_Form (C.Lines, + Directory_Entry_Format (K).Form, + C.Header.Is64, + C.Header.Address_Size); + end if; + end loop; end loop; end if; @@ -1414,13 +1732,15 @@ package body System.Dwarf_Lines is begin -- Initialize result + Dir_Name := null; File_Name := null; Subprg_Name := (null, 0); Line_Num := 0; + -- Look up the symbol in the cache + if C.Cache /= null then - -- Look in the cache declare Addr_Off : constant uint32 := uint32 (Addr - C.Low); First, Last, Mid : Natural; @@ -1447,12 +1767,13 @@ package body System.Dwarf_Lines is S := Read_Symbol (C.Obj.all, Offset (C.Cache (Mid).Sym)); Subprg_Name := Object_Reader.Name (C.Obj.all, S); else - -- Not found return; end if; end; + + -- Search for the symbol in the binary + else - -- Search symbol S := First_Symbol (C.Obj.all); while S /= Null_Symbol loop if Spans (S, Addr_Int) then @@ -1479,15 +1800,15 @@ package body System.Dwarf_Lines is end if; Seek (C.Lines, Line_Offset); - C.Next_Prologue := 0; + C.Next_Header := 0; Initialize_State_Machine (C); - Parse_Prologue (C); + Parse_Header (C); Previous_Row.Line := 0; -- Advance to the first entry loop - Read_And_Execute_Isn (C, Done); + Read_And_Execute_Insn (C, Done); if C.Registers.Is_Row then Previous_Row := C.Registers; @@ -1499,8 +1820,8 @@ package body System.Dwarf_Lines is -- Read the rest of the entries - while Tell (C.Lines) < C.Next_Prologue loop - Read_And_Execute_Isn (C, Done); + while Tell (C.Lines) < C.Next_Header loop + Read_And_Execute_Insn (C, Done); if C.Registers.Is_Row then if not Previous_Row.End_Sequence @@ -1533,6 +1854,7 @@ package body System.Dwarf_Lines is return I - Str'First; end if; end loop; + return Str'Last; end String_Length; @@ -1558,6 +1880,7 @@ package body System.Dwarf_Lines is Subprg_Name : String_Ptr_Len; Line_Num : Natural; Off : Natural; + begin if not C.Has_Debug then Symbol_Found := False; @@ -1657,4 +1980,5 @@ package body System.Dwarf_Lines is Append (Res, ASCII.LF); end loop; end Symbolic_Traceback; + end System.Dwarf_Lines; diff --git a/gcc/ada/libgnat/s-dwalin.ads b/gcc/ada/libgnat/s-dwalin.ads index 072f089..132d3e1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- @@ -30,13 +30,10 @@ ------------------------------------------------------------------------------ -- This package provides routines to read DWARF line number information from --- a generic object file with as little overhead as possible. This allows --- conversions from PC addresses to human readable source locations. +-- a binary file with as little overhead as possible. This allows conversions +-- from PC addresses to human-readable source locations. -- --- Objects must be built with debugging information, however only the --- .debug_line section of the object file is referenced. In cases where object --- size is a consideration it's possible to strip all other .debug sections, --- which will decrease the size of the object significantly. +-- Files must be compiled with at least minimal debugging information (-g1). with Ada.Exceptions.Traceback; @@ -50,11 +47,11 @@ package System.Dwarf_Lines is package SOR renames System.Object_Reader; type Dwarf_Context (In_Exception : Boolean := False) is private; - -- Type encapsulation the state of the Dwarf reader. When In_Exception - -- is True we are parsing as part of a exception handler decorator, we do - -- not want an exception to be raised, the parsing is done safely skipping - -- DWARF file that cannot be read or with stripped debug section for - -- example. + -- Type encapsulating the state of the DWARF reader. When In_Exception is + -- True, we are parsing as part of an exception handler decorator so we do + -- not want another exception to be raised and the parsing is done safely, + -- skipping binary files that cannot be read or have been stripped from + -- their debug sections for example. procedure Open (File_Name : String; @@ -65,14 +62,13 @@ package System.Dwarf_Lines is procedure Set_Load_Address (C : in out Dwarf_Context; Addr : Address); -- Set the load address of a file. This is used to rebase PIE (Position - -- Independant Executable) binaries. + -- Independent Executable) binaries. function Is_Inside (C : Dwarf_Context; Addr : Address) return Boolean; pragma Inline (Is_Inside); -- Return true iff a run-time address Addr is within the module - function Low_Address (C : Dwarf_Context) - return System.Address; + function Low_Address (C : Dwarf_Context) return System.Address; pragma Inline (Low_Address); -- Return the lowest address of C, accounting for the module load address @@ -83,7 +79,7 @@ package System.Dwarf_Lines is -- Dump the cache (if present) procedure Enable_Cache (C : in out Dwarf_Context); - -- Read symbols information to speed up Symbolic_Traceback. + -- Read symbol information to speed up Symbolic_Traceback. procedure Symbolic_Traceback (Cin : Dwarf_Context; @@ -102,45 +98,64 @@ package System.Dwarf_Lines is private -- The following section numbers reference - -- "DWARF Debugging Information Format, Version 3" + -- "DWARF Debugging Information Format, Version 5" -- published by the Standards Group, http://freestandards.org. -- 6.2.2 State Machine Registers type Line_Info_Registers is record - Address : SOR.uint64; - File : SOR.uint32; - Line : SOR.uint32; - Column : SOR.uint32; - Is_Stmt : Boolean; - Basic_Block : Boolean; - End_Sequence : Boolean; - Prologue_End : Boolean; - Epilogue_Begin : Boolean; - ISA : SOR.uint32; - Is_Row : Boolean; + Address : SOR.uint64; + File : SOR.uint32; + Line : SOR.uint32; + Column : SOR.uint32; + Is_Stmt : Boolean; + Basic_Block : Boolean; + End_Sequence : Boolean; + -- Prologue_End : Boolean; + -- Epilogue_Begin : Boolean; + -- ISA : SOR.uint32; + -- Discriminator : SOR.uint32; -- DWARF 4/5 + Is_Row : Boolean; -- local end record; - -- 6.2.4 The Line Number Program Prologue - - MAX_OPCODE_LENGTHS : constant := 256; - - type Opcodes_Lengths_Array is - array (SOR.uint32 range 1 .. MAX_OPCODE_LENGTHS) of SOR.uint8; - - type Line_Info_Prologue is record - Unit_Length : SOR.uint32; - Version : SOR.uint16; - Prologue_Length : SOR.uint32; - Min_Isn_Length : SOR.uint8; - Default_Is_Stmt : SOR.uint8; - Line_Base : SOR.int8; - Line_Range : SOR.uint8; - Opcode_Base : SOR.uint8; - Opcode_Lengths : Opcodes_Lengths_Array; - Includes_Offset : SOR.Offset; - File_Names_Offset : SOR.Offset; + -- 6.2.4 The Line Number Program Header + + MAX_OPCODE : constant := 256; + + type Opcode_Length_Array is array (1 .. MAX_OPCODE) of SOR.uint8; + + MAX_ENTRY : constant := 5; + + type Entry_Format_Pair is record + C_Type : SOR.uint32; + Form : SOR.uint32; + end record; + + type Entry_Format_Array is array (1 .. MAX_ENTRY) of Entry_Format_Pair; + + type Line_Info_Header is record + Unit_Length : SOR.Offset; + Version : SOR.uint16; + Address_Size : SOR.uint8; -- DWARF 5 + Segment_Selector_Size : SOR.uint8; -- DWARF 5 + Header_Length : SOR.uint32; + Minimum_Insn_Length : SOR.uint8; + Maximum_Op_Per_Insn : SOR.uint8; -- DWARF 4/5 + Default_Is_Stmt : SOR.uint8; + Line_Base : SOR.int8; + Line_Range : SOR.uint8; + Opcode_Base : SOR.uint8; + -- Standard_Opcode_Lengths : Opcode_Length_Array; + Directory_Entry_Format_Count : SOR.uint8; -- DWARF 5 + Directory_Entry_Format : Entry_Format_Array; -- DWARF 5 + Directories_Count : SOR.uint32; -- DWARF 5 + Directories : SOR.Offset; + File_Name_Entry_Format_Count : SOR.uint8; -- DWARF 5 + File_Name_Entry_Format : Entry_Format_Array; -- DWARF 5 + File_Names_Count : SOR.uint32; -- DWARF 5 + File_Names : SOR.Offset; + Is64 : Boolean; -- local end record; type Search_Entry is record @@ -175,15 +190,16 @@ private Cache : Search_Array_Access; -- Quick access to symbol and debug info (when present). - Lines : SOR.Mapped_Stream; - Aranges : SOR.Mapped_Stream; - Info : SOR.Mapped_Stream; - Abbrev : SOR.Mapped_Stream; - -- Dwarf line, aranges, info and abbrev sections + Abbrev : SOR.Mapped_Stream; + Aranges : SOR.Mapped_Stream; + Info : SOR.Mapped_Stream; + Lines : SOR.Mapped_Stream; + Line_Str : SOR.Mapped_Stream; -- DWARF 5 + -- DWARF sections - Prologue : Line_Info_Prologue; - Registers : Line_Info_Registers; - Next_Prologue : SOR.Offset; + Header : Line_Info_Header; + Registers : Line_Info_Registers; + Next_Header : SOR.Offset; -- State for lines end record; diff --git a/gcc/ada/libgnat/s-elaall.adb b/gcc/ada/libgnat/s-elaall.adb index 03ed66c..5807433 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-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- -- diff --git a/gcc/ada/libgnat/s-elaall.ads b/gcc/ada/libgnat/s-elaall.ads index 27344bf..44c1f60 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-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- -- diff --git a/gcc/ada/libgnat/s-excdeb.adb b/gcc/ada/libgnat/s-excdeb.adb index 56efde6..2c22ee9 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-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- -- diff --git a/gcc/ada/libgnat/s-excdeb.ads b/gcc/ada/libgnat/s-excdeb.ads index c1836b2..6c93f4c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-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- -- diff --git a/gcc/ada/libgnat/s-except.adb b/gcc/ada/libgnat/s-except.adb index 228cf2b..fa220b3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-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- -- @@ -29,17 +29,4 @@ -- -- ------------------------------------------------------------------------------ --- This package does not require a body, since it is a package renaming. We --- provide a dummy file containing a No_Body pragma so that previous versions --- of the body (which did exist) will not interfere. - --- pragma No_Body; - --- The above pragma is commented out, since for now we can't use No_Body in --- a unit marked as a Compiler_Unit, since this requires GNAT 6.1, and we --- do not yet require this for bootstrapping. So instead we use a dummy Taft --- amendment type to require the body: - -package body System.Exceptions is - type Require_Body is new Integer; -end System.Exceptions; +pragma No_Body; diff --git a/gcc/ada/libgnat/s-except.ads b/gcc/ada/libgnat/s-except.ads index 29d960e..10448bc 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-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- -- @@ -34,30 +34,10 @@ pragma Compiler_Unit_Warning; package System.Exceptions is pragma Preelaborate; - -- To let Ada.Exceptions "with" us and let us "with" Standard_Library - - ZCX_By_Default : constant Boolean; - -- Visible copy to allow Ada.Exceptions to know the exception model + -- To let Ada.Exceptions "with" us private - type Require_Body; - -- Dummy Taft-amendment type to make it legal (and required) to provide - -- a body for this package. - -- - -- We do this because this unit used to have a body in earlier versions - -- of GNAT, and it causes various bootstrap path problems etc if we remove - -- a body, since we may pick up old unwanted bodies. - -- - -- Note: we use this standard Ada method of requiring a body rather - -- than the cleaner pragma No_Body because System.Exceptions is a compiler - -- unit, and older bootstrap compilers do not support pragma No_Body. This - -- type can be removed, and s-except.adb can be replaced by a source - -- containing just that pragma, when we decide to move to a 2008 compiler - -- as the minimal bootstrap compiler version. ??? - - ZCX_By_Default : constant Boolean := System.ZCX_By_Default; - Foreign_Exception : exception; pragma Unreferenced (Foreign_Exception); -- This hidden exception is used to represent non-Ada exception to diff --git a/gcc/ada/libgnat/s-excmac__arm.adb b/gcc/ada/libgnat/s-excmac__arm.adb index faf53b7..8dc6974 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-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- -- diff --git a/gcc/ada/libgnat/s-excmac__arm.ads b/gcc/ada/libgnat/s-excmac__arm.ads index 65269ae..f69690d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-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- -- diff --git a/gcc/ada/libgnat/s-excmac__gcc.adb b/gcc/ada/libgnat/s-excmac__gcc.adb index ead0550..1b03a1b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-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- -- diff --git a/gcc/ada/libgnat/s-excmac__gcc.ads b/gcc/ada/libgnat/s-excmac__gcc.ads index f7148a3..ffb8ea3 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-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- -- diff --git a/gcc/ada/libgnat/s-exctab.adb b/gcc/ada/libgnat/s-exctab.adb index ec5e0a7..48e3247 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-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- -- diff --git a/gcc/ada/libgnat/s-exctab.ads b/gcc/ada/libgnat/s-exctab.ads index d0ead62..0d1774e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-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- -- diff --git a/gcc/ada/libgnat/s-exctra.adb b/gcc/ada/libgnat/s-exctra.adb index 2ada43b..963f5f9 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 e3b360f..6be48fb 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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-putaim.ads b/gcc/ada/libgnat/s-exnflt.ads index b4dd8c2..13079fc 100644 --- a/gcc/ada/libgnat/s-putaim.ads +++ b/gcc/ada/libgnat/s-exnflt.ads @@ -2,11 +2,11 @@ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- --- SYSTEM.PUT_TASK_IMAGES -- +-- S Y S T E M . E X N _ F L T -- -- -- -- S p e c -- -- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- +-- Copyright (C) 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- -- @@ -29,20 +29,13 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Strings.Text_Output; -with Ada.Task_Identification; +-- Float exponentiation (checks off) -package System.Put_Task_Images is +with System.Exponr; - -- This package contains subprograms that are called by the generated code - -- for the 'Put_Image attribute for protected and task types. This is - -- separate from System.Put_Images to avoid dragging the tasking runtimes - -- into nontasking programs. +package System.Exn_Flt is - subtype Sink is Ada.Strings.Text_Output.Sink; + function Exn_Float is new Exponr (Float); + pragma Pure_Function (Exn_Float); - procedure Put_Image_Protected (S : in out Sink'Class); - procedure Put_Image_Task - (S : in out Sink'Class; Id : Ada.Task_Identification.Task_Id); - -end System.Put_Task_Images; +end System.Exn_Flt; diff --git a/gcc/ada/libgnat/s-exnint.adb b/gcc/ada/libgnat/s-exnint.adb index 3914192..052dd1c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-exnint.ads b/gcc/ada/libgnat/s-exnint.ads index ac64e58..cfdf933 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-putaim.adb b/gcc/ada/libgnat/s-exnlfl.ads index 08fa7b7..58d4a4c 100644 --- a/gcc/ada/libgnat/s-putaim.adb +++ b/gcc/ada/libgnat/s-exnlfl.ads @@ -2,11 +2,11 @@ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- --- SYSTEM.PUT_TASK_IMAGES -- +-- S Y S T E M . E X N _ L F L T -- -- -- --- B o d y -- +-- S p e c -- -- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- +-- Copyright (C) 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- -- @@ -29,23 +29,13 @@ -- -- ------------------------------------------------------------------------------ -with Unchecked_Conversion; -with Ada.Strings.Text_Output.Utils; -use Ada.Strings.Text_Output; -use Ada.Strings.Text_Output.Utils; +-- Long_Float exponentiation (checks off) -package body System.Put_Task_Images is +with System.Exponr; - procedure Put_Image_Protected (S : in out Sink'Class) is - begin - Put_UTF_8 (S, "(protected object)"); - end Put_Image_Protected; +package System.Exn_LFlt is - procedure Put_Image_Task - (S : in out Sink'Class; Id : Ada.Task_Identification.Task_Id) - is - begin - Put_UTF_8 (S, "(task " & Ada.Task_Identification.Image (Id) & ")"); - end Put_Image_Task; + function Exn_Long_Float is new Exponr (Long_Float); + pragma Pure_Function (Exn_Long_Float); -end System.Put_Task_Images; +end System.Exn_LFlt; diff --git a/gcc/ada/libgnat/s-exnllf.adb b/gcc/ada/libgnat/s-exnllf.adb index 7ca2675..2186c6d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -29,154 +29,8 @@ -- -- ------------------------------------------------------------------------------ --- Note: the reason for treating exponents in the range 0 .. 4 specially is --- to ensure identical results to the static inline expansion in the case of --- a compile time known exponent in this range. The use of Float'Machine and --- Long_Float'Machine is to avoid unwanted extra precision in the results. +-- This package does not require a body, since it is an instantiation. We +-- provide a dummy file containing a No_Body pragma so that previous versions +-- of the body (which did exist) will not interfere. --- Note that for a negative exponent in Left ** Right, we compute the result --- as: - --- 1.0 / (Left ** (-Right)) - --- Note that the case of Left being zero is not special, it will simply result --- in a division by zero at the end, yielding a correctly signed infinity, or --- possibly generating an overflow. - --- Note on overflow: This coding assumes that the target generates infinities --- with standard IEEE semantics. If this is not the case, then the code --- for negative exponent may raise Constraint_Error. This follows the --- implementation permission given in RM 4.5.6(12). - -package body System.Exn_LLF is - - subtype Negative is Integer range Integer'First .. -1; - - function Exp - (Left : Long_Long_Float; - Right : Natural) return Long_Long_Float; - -- Common routine used if Right is greater or equal to 5 - - --------------- - -- Exn_Float -- - --------------- - - function Exn_Float - (Left : Float; - Right : Integer) return Float - is - Temp : Float; - begin - case Right is - when 0 => - return 1.0; - when 1 => - return Left; - when 2 => - return Float'Machine (Left * Left); - when 3 => - return Float'Machine (Left * Left * Left); - when 4 => - Temp := Float'Machine (Left * Left); - return Float'Machine (Temp * Temp); - when Negative => - return Float'Machine (1.0 / Exn_Float (Left, -Right)); - when others => - return - Float'Machine - (Float (Exp (Long_Long_Float (Left), Right))); - end case; - end Exn_Float; - - -------------------- - -- Exn_Long_Float -- - -------------------- - - function Exn_Long_Float - (Left : Long_Float; - Right : Integer) return Long_Float - is - Temp : Long_Float; - begin - case Right is - when 0 => - return 1.0; - when 1 => - return Left; - when 2 => - return Long_Float'Machine (Left * Left); - when 3 => - return Long_Float'Machine (Left * Left * Left); - when 4 => - Temp := Long_Float'Machine (Left * Left); - return Long_Float'Machine (Temp * Temp); - when Negative => - return Long_Float'Machine (1.0 / Exn_Long_Float (Left, -Right)); - when others => - return - Long_Float'Machine - (Long_Float (Exp (Long_Long_Float (Left), Right))); - end case; - end Exn_Long_Float; - - ------------------------- - -- Exn_Long_Long_Float -- - ------------------------- - - function Exn_Long_Long_Float - (Left : Long_Long_Float; - Right : Integer) return Long_Long_Float - is - Temp : Long_Long_Float; - begin - case Right is - when 0 => - return 1.0; - when 1 => - return Left; - when 2 => - return Left * Left; - when 3 => - return Left * Left * Left; - when 4 => - Temp := Left * Left; - return Temp * Temp; - when Negative => - return 1.0 / Exn_Long_Long_Float (Left, -Right); - when others => - return Exp (Left, Right); - end case; - end Exn_Long_Long_Float; - - --------- - -- Exp -- - --------- - - function Exp - (Left : Long_Long_Float; - Right : Natural) return Long_Long_Float - is - Result : Long_Long_Float := 1.0; - Factor : Long_Long_Float := Left; - Exp : Natural := Right; - - 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. If the low order bit or Exp is - -- set, multiply the result by this factor. - - loop - if Exp rem 2 /= 0 then - Result := Result * Factor; - end if; - - Exp := Exp / 2; - exit when Exp = 0; - Factor := Factor * Factor; - end loop; - - return Result; - end Exp; - -end System.Exn_LLF; +pragma No_Body; diff --git a/gcc/ada/libgnat/s-exnllf.ads b/gcc/ada/libgnat/s-exnllf.ads index 6a334de..2b02a65 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -29,21 +29,13 @@ -- -- ------------------------------------------------------------------------------ --- [Long_[Long_]]Float exponentiation (checks off) +-- Long_Long_Float exponentiation (checks off) -package System.Exn_LLF is - pragma Pure; - - function Exn_Float - (Left : Float; - Right : Integer) return Float; +with System.Exponr; - function Exn_Long_Float - (Left : Long_Float; - Right : Integer) return Long_Float; +package System.Exn_LLF is - function Exn_Long_Long_Float - (Left : Long_Long_Float; - Right : Integer) return Long_Long_Float; + function Exn_Long_Long_Float is new Exponr (Long_Long_Float); + pragma Pure_Function (Exn_Long_Long_Float); end System.Exn_LLF; diff --git a/gcc/ada/libgnat/s-exnlli.adb b/gcc/ada/libgnat/s-exnlli.adb index b1c33ea..4fdcf89 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-exnlli.ads b/gcc/ada/libgnat/s-exnlli.ads index 3c2786b..4a54344 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-exnllli.ads b/gcc/ada/libgnat/s-exnllli.ads index 9573d7d..06a9784 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-expint.adb b/gcc/ada/libgnat/s-expint.adb index 489d768..b19a72f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-expint.ads b/gcc/ada/libgnat/s-expint.ads index 70d16e0..f41b6fa 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-explli.adb b/gcc/ada/libgnat/s-explli.adb index 98946dc..ccfbec0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-explli.ads b/gcc/ada/libgnat/s-explli.ads index bf58a9a..d9c8544 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-expllli.ads b/gcc/ada/libgnat/s-expllli.ads index 0e4375d..1ee278d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-explllu.ads b/gcc/ada/libgnat/s-explllu.ads index 2f7c6a9..5a54ada 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-expllu.adb b/gcc/ada/libgnat/s-expllu.adb index 3a383f7..0c46560 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-expllu.ads b/gcc/ada/libgnat/s-expllu.ads index 9e30090..9f7b404 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-expmod.adb b/gcc/ada/libgnat/s-expmod.adb index 1d6b404..d3465d9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-expmod.ads b/gcc/ada/libgnat/s-expmod.ads index 925ae11..aa87efc 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-exponn.adb b/gcc/ada/libgnat/s-exponn.adb index f1522d0..8a1cd78 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-exponn.ads b/gcc/ada/libgnat/s-exponn.ads index f4cd18f..c95b0ed 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-exponr.adb b/gcc/ada/libgnat/s-exponr.adb new file mode 100644 index 0000000..ad7f401 --- /dev/null +++ b/gcc/ada/libgnat/s-exponr.adb @@ -0,0 +1,125 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . E X P O N R -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 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 that the reason for treating exponents in the range 0 .. 4 specially +-- is to ensure identical results with the static expansion in the case of a +-- compile-time known exponent in this range; similarly, the use 'Machine is +-- to avoid unwanted extra precision in the results. + +-- For a negative exponent, we compute the result as per RM 4.5.6(11/3): + +-- Left ** Right = 1.0 / (Left ** (-Right)) + +-- Note that the case of Left being zero is not special, it will simply result +-- in a division by zero at the end, yielding a correctly signed infinity, or +-- possibly raising an overflow exception. + +-- Note on overflow: this coding assumes that the target generates infinities +-- with standard IEEE semantics. If this is not the case, then the code for +-- negative exponents may raise Constraint_Error, which is in keeping with the +-- implementation permission given in RM 4.5.6(12). + +with System.Double_Real; + +function System.Exponr (Left : Num; Right : Integer) return Num is + + package Double_Real is new System.Double_Real (Num); + use type Double_Real.Double_T; + + subtype Double_T is Double_Real.Double_T; + -- The double floating-point type + + subtype Safe_Negative is Integer range Integer'First + 1 .. -1; + -- The range of safe negative exponents + + function Expon (Left : Num; Right : Natural) return Num; + -- Routine used if Right is greater than 4 + + ----------- + -- Expon -- + ----------- + + function Expon (Left : Num; Right : Natural) return Num is + Result : Double_T := Double_Real.To_Double (1.0); + Factor : Double_T := Double_Real.To_Double (Left); + Exp : Natural := Right; + + 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. If the low order bit or Exp + -- is set, multiply the result by this factor. + + loop + if Exp rem 2 /= 0 then + Result := Result * Factor; + exit when Exp = 1; + end if; + + Exp := Exp / 2; + Factor := Double_Real.Sqr (Factor); + end loop; + + return Double_Real.To_Single (Result); + end Expon; + +begin + case Right is + when 0 => + return 1.0; + + when 1 => + return Left; + + when 2 => + return Num'Machine (Left * Left); + + when 3 => + return Num'Machine (Left * Left * Left); + + when 4 => + declare + Sqr : constant Num := Num'Machine (Left * Left); + + begin + return Num'Machine (Sqr * Sqr); + end; + + when Safe_Negative => + return Num'Machine (1.0 / Exponr (Left, -Right)); + + when Integer'First => + return Num'Machine (1.0 / (Exponr (Left, Integer'Last) * Left)); + + when others => + return Num'Machine (Expon (Left, Right)); + end case; +end System.Exponr; diff --git a/gcc/ada/libgnat/a-stobbu.ads b/gcc/ada/libgnat/s-exponr.ads index 027e711..e5bdec7 100644 --- a/gcc/ada/libgnat/a-stobbu.ads +++ b/gcc/ada/libgnat/s-exponr.ads @@ -2,11 +2,11 @@ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- --- ADA.STRINGS.TEXT_OUTPUT.BIT_BUCKETS -- +-- S Y S T E M . E X P O N R -- -- -- -- S p e c -- -- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- +-- Copyright (C) 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- -- @@ -29,6 +29,10 @@ -- -- ------------------------------------------------------------------------------ -package Ada.Strings.Text_Output.Bit_Buckets is - function Bit_Bucket return Sink_Access; -end Ada.Strings.Text_Output.Bit_Buckets; +-- Real exponentiation (checks off) + +generic + + type Num is digits <>; + +function System.Exponr (Left : Num; Right : Integer) return Num; diff --git a/gcc/ada/libgnat/s-expont.adb b/gcc/ada/libgnat/s-expont.adb index bcdcae4..3c259cf 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-expont.ads b/gcc/ada/libgnat/s-expont.ads index 7a519fd..022cb64 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-exponu.adb b/gcc/ada/libgnat/s-exponu.adb index d2b9305..9525638 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-exponu.ads b/gcc/ada/libgnat/s-exponu.ads index 2a913d6..7faa122 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-expuns.adb b/gcc/ada/libgnat/s-expuns.adb index f513da2..6f943da 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-expuns.ads b/gcc/ada/libgnat/s-expuns.ads index 3826f4f..b49e7c0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-fatflt.ads b/gcc/ada/libgnat/s-fatflt.ads index 615e5f4..079326b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-fatgen.adb b/gcc/ada/libgnat/s-fatgen.adb index 9f25987..e591cca 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -35,15 +35,12 @@ -- floating-point implementations. with Ada.Unchecked_Conversion; -with Interfaces; with System.Unsigned_Types; pragma Warnings (Off, "non-static constant in preelaborated unit"); -- Every constant is static given our instantiation model package body System.Fat_Gen is - use type Interfaces.Unsigned_64; - pragma Assert (T'Machine_Radix = 2); -- This version does not handle radix 16 @@ -62,17 +59,6 @@ package body System.Fat_Gen is -- Tiny : constant T := Rad ** (T'Machine_Emin - Mantissa); -- Smallest positive denormalized number - Tiny16 : constant Interfaces.Unsigned_16 := 1; - Tiny32 : constant Interfaces.Unsigned_32 := 1; - Tiny64 : constant Interfaces.Unsigned_64 := 1; - Tiny80 : constant array (1 .. 2) of Interfaces.Unsigned_64 := - (1 * Standard'Default_Bit_Order, - 2**48 * (1 - Standard'Default_Bit_Order)); - for Tiny80'Alignment use Standard'Maximum_Alignment; - -- We cannot use the direct declaration because it cannot be translated - -- into C90, as the hexadecimal floating constants were introduced in C99. - -- So we work around this by using an overlay of the integer constant. - RM1 : constant T := Rad ** (Mantissa - 1); -- Smallest positive member of the large consecutive integers. It is equal -- to the ratio Small / Tiny, which means that multiplying by it normalizes @@ -110,22 +96,23 @@ package body System.Fat_Gen is -- component of Float_Rep, named Most Significant Word (MSW). -- - The sign occupies the most significant bit of the MSW and the - -- exponent is in the following bits. The exception is 80-bit - -- double extended, where they occupy the low 16-bit halfword. - - -- The low-level primitives Copy_Sign, Decompose, Scaling and Valid are - -- implemented by accessing the bit pattern of the floating-point number. - -- Only the normalization of denormalized numbers, if any, and the gradual - -- underflow are left to the hardware, mainly because there is some leeway - -- for the hardware implementation in this area: for example, the MSB of - -- the mantissa, which is 1 for normalized numbers and 0 for denormalized + -- exponent is in the following bits. + + -- The low-level primitives Copy_Sign, Decompose, Finite_Succ, Scaling and + -- Valid are implemented by accessing the bit pattern of the floating-point + -- number. Only the normalization of denormalized numbers, if any, and the + -- gradual underflow are left to the hardware, mainly because there is some + -- leeway for the hardware implementation in this area: for example the MSB + -- of the mantissa, that is 1 for normalized numbers and 0 for denormalized -- numbers, may or may not be stored by the hardware. - Siz : constant := (if System.Word_Size > 32 then 32 else System.Word_Size); + Siz : constant := 16; type Float_Word is mod 2**Siz; + -- We use the GCD of the size of all the supported floating-point formats - N : constant Natural := (T'Size + Siz - 1) / Siz; - Rep_Last : constant Natural := Natural'Min (N - 1, (Mantissa + 16) / Siz); + N : constant Natural := (T'Size + Siz - 1) / Siz; + NR : constant Natural := (Mantissa + 16 + Siz - 1) / Siz; + Rep_Last : constant Natural := Natural'Min (N, NR) - 1; -- Determine the number of Float_Words needed for representing the -- entire floating-point value. Do not take into account excessive -- padding, as occurs on IA-64 where 80 bits floats get padded to 128 @@ -143,12 +130,9 @@ package body System.Fat_Gen is -- we assume Word_Order = Bit_Order. Exp_Factor : constant Float_Word := - (if Mantissa = 64 - then 1 - else 2**(Siz - 1) / Float_Word (IEEE_Emax - IEEE_Emin + 3)); + 2**(Siz - 1) / Float_Word (IEEE_Emax - IEEE_Emin + 3); -- Factor that the extracted exponent needs to be divided by to be in - -- range 0 .. IEEE_Emax - IEEE_Emin + 2. The special case is 80-bit - -- double extended, where the exponent starts the 3rd float word. + -- range 0 .. IEEE_Emax - IEEE_Emin + 2 Exp_Mask : constant Float_Word := Float_Word (IEEE_Emax - IEEE_Emin + 2) * Exp_Factor; @@ -156,10 +140,8 @@ package body System.Fat_Gen is -- range 0 .. IEEE_Emax - IEEE_Emin + 2 contains 2**N values, for some -- N in Natural. - Sign_Mask : constant Float_Word := - (if Mantissa = 64 then 2**15 else 2**(Siz - 1)); - -- Value needed to mask out the sign field. The special case is 80-bit - -- double extended, where the exponent starts the 3rd float word. + Sign_Mask : constant Float_Word := 2**(Siz - 1); + -- Value needed to mask out the sign field ----------------------- -- Local Subprograms -- @@ -171,6 +153,9 @@ package body System.Fat_Gen is -- the sign of the exponent. The absolute value of Frac is in the range -- 0.0 <= Frac < 1.0. If Frac = 0.0 or -0.0, then Expo is always zero. + function Finite_Succ (X : T) return T; + -- Return the successor of X, a finite number not equal to T'Last + -------------- -- Adjacent -- -------------- @@ -306,6 +291,179 @@ package body System.Fat_Gen is return X_Exp; end Exponent; + ----------------- + -- Finite_Succ -- + ----------------- + + function Finite_Succ (X : T) return T is + XX : T := T'Machine (X); + + Rep : Float_Rep; + for Rep'Address use XX'Address; + -- Rep is a view of the input floating-point parameter + + begin + -- If the floating-point type does not support denormalized numbers, + -- there is a couple of problematic values, namely -Small and Zero, + -- because the increment is equal to Small in these cases. + + if not T'Denorm then + declare + Small : constant T := Rad ** (T'Machine_Emin - 1); + -- Smallest positive normalized number declared here and not at + -- library level for the sake of the CCG compiler, which cannot + -- currently compile the constant because the target is C90. + + begin + if X = -Small then + XX := 0.0; + return -XX; + elsif X = 0.0 then + return Small; + end if; + end; + end if; + + -- In all the other cases, the increment is equal to 1 in the binary + -- integer representation of the number if X is nonnegative and equal + -- to -1 if X is negative. + + if XX >= 0.0 then + -- First clear the sign of negative Zero + + Rep (MSW) := Rep (MSW) and not Sign_Mask; + + -- Deal with big endian + + if MSW = 0 then + for J in reverse 0 .. Rep_Last loop + Rep (J) := Rep (J) + 1; + + -- For 80-bit IEEE Extended, the MSB of the mantissa is stored + -- so, when it has been flipped, its status must be reanalyzed. + + if Mantissa = 64 and then J = 1 then + + -- If the MSB changed from denormalized to normalized, then + -- keep it normalized since the exponent will be bumped. + + if Rep (J) = 2**(Siz - 1) then + null; + + -- If the MSB changed from normalized, restore it since we + -- cannot denormalize in this context. + + elsif Rep (J) = 0 then + Rep (J) := 2**(Siz - 1); + + else + exit; + end if; + + -- In other cases, stop if there is no carry + + else + exit when Rep (J) > 0; + end if; + end loop; + + -- Deal with little endian + + else + for J in 0 .. Rep_Last loop + Rep (J) := Rep (J) + 1; + + -- For 80-bit IEEE Extended, the MSB of the mantissa is stored + -- so, when it has been flipped, its status must be reanalyzed. + + if Mantissa = 64 and then J = Rep_Last - 1 then + + -- If the MSB changed from denormalized to normalized, then + -- keep it normalized since the exponent will be bumped. + + if Rep (J) = 2**(Siz - 1) then + null; + + -- If the MSB changed from normalized, restore it since we + -- cannot denormalize in this context. + + elsif Rep (J) = 0 then + Rep (J) := 2**(Siz - 1); + + else + exit; + end if; + + -- In other cases, stop if there is no carry + + else + exit when Rep (J) > 0; + end if; + end loop; + end if; + + else + if MSW = 0 then + for J in reverse 0 .. Rep_Last loop + Rep (J) := Rep (J) - 1; + + -- For 80-bit IEEE Extended, the MSB of the mantissa is stored + -- so, when it has been flipped, its status must be reanalyzed. + + if Mantissa = 64 and then J = 1 then + + -- If the MSB changed from normalized to denormalized, then + -- keep it normalized if the exponent is not 1. + + if Rep (J) = 2**(Siz - 1) - 1 then + if Rep (0) /= 2**(Siz - 1) + 1 then + Rep (J) := 2**Siz - 1; + end if; + + else + exit; + end if; + + -- In other cases, stop if there is no borrow + + else + exit when Rep (J) < 2**Siz - 1; + end if; + end loop; + + else + for J in 0 .. Rep_Last loop + Rep (J) := Rep (J) - 1; + + -- For 80-bit IEEE Extended, the MSB of the mantissa is stored + -- so, when it has been flipped, its status must be reanalyzed. + + if Mantissa = 64 and then J = Rep_Last - 1 then + + -- If the MSB changed from normalized to denormalized, then + -- keep it normalized if the exponent is not 1. + + if Rep (J) = 2**(Siz - 1) - 1 then + if Rep (Rep_Last) /= 2**(Siz - 1) + 1 then + Rep (J) := 2**Siz - 1; + end if; + + else + exit; + end if; + + -- In other cases, stop if there is no borrow + + else + exit when Rep (J) < 2**Siz - 1; + end if; + end loop; + end if; + end if; + + return XX; + end Finite_Succ; + ----------- -- Floor -- ----------- @@ -424,66 +582,27 @@ package body System.Fat_Gen is ---------- function Pred (X : T) return T is - Tiny : constant T; - pragma Import (Ada, Tiny); - for Tiny'Address use (if T'Size = 16 then Tiny16'Address - elsif T'Size = 32 then Tiny32'Address - elsif T'Size = 64 then Tiny64'Address - elsif Mantissa = 64 then Tiny80'Address - else raise Program_Error); - X_Frac : T; - X_Exp : UI; - begin - -- Zero has to be treated specially, since its exponent is zero - - if X = 0.0 then - return -Tiny; - -- Special treatment for largest negative number: raise Constraint_Error - elsif X = T'First then + if X = T'First then raise Constraint_Error with "Pred of largest negative number"; - -- For infinities, return unchanged + -- For finite numbers, use the symmetry around zero of floating point - elsif X < T'First or else X > T'Last then + elsif X > T'First and then X <= T'Last then + pragma Annotate (CodePeer, Intentional, "test always true", + "Check for invalid float"); pragma Annotate (CodePeer, Intentional, "condition predetermined", "Check for invalid float"); - return X; - pragma Annotate (CodePeer, Intentional, "dead code", - "Check float range."); + return -Finite_Succ (-X); - -- Subtract from the given number a number equivalent to the value - -- of its least significant bit. Given that the most significant bit - -- represents a value of 1.0 * Radix ** (Exp - 1), the value we want - -- is obtained by shifting this by (Mantissa-1) bits to the right, - -- i.e. decreasing the exponent by that amount. + -- For infinities and NaNs, return unchanged else - Decompose (X, X_Frac, X_Exp); - - -- For a denormalized number or a normalized number with the lowest - -- exponent, just subtract the Tiny. - - if X_Exp <= T'Machine_Emin then - return X - Tiny; - - -- A special case, if the number we had was a power of two on the - -- positive side of zero, then we want to subtract half of what we - -- would have subtracted, since the exponent is going to be reduced. - - -- Note that X_Frac has the same sign as X so, if X_Frac is Invrad, - -- then we know that we had a power of two on the positive side. - - elsif X_Frac = Invrad then - return X - Scaling (1.0, X_Exp - Mantissa - 1); - - -- Otherwise the adjustment is unchanged - - else - return X - Scaling (1.0, X_Exp - Mantissa); - end if; + return X; + pragma Annotate (CodePeer, Intentional, "dead code", + "Check float range."); end if; end Pred; @@ -652,21 +771,26 @@ package body System.Fat_Gen is -- Check for overflow if Adjustment > IEEE_Emax - Exp then - XX := 0.0; - return (if Minus then -1.0 / XX else 1.0 / XX); - pragma Annotate - (CodePeer, Intentional, "overflow check", "Infinity produced"); - pragma Annotate - (CodePeer, Intentional, "divide by zero", "Infinity produced"); + -- Optionally raise Constraint_Error as per RM A.5.3(29) + + if T'Machine_Overflows then + raise Constraint_Error with "Too large exponent"; + + else + XX := 0.0; + return (if Minus then -1.0 / XX else 1.0 / XX); + pragma Annotate (CodePeer, Intentional, "overflow check", + "Infinity produced"); + pragma Annotate (CodePeer, Intentional, "divide by zero", + "Infinity produced"); + end if; -- Check for underflow elsif Adjustment < IEEE_Emin - Exp then - -- Check for gradual underflow + -- Check for possibly gradual underflow (up to the hardware) - if T'Denorm - and then Adjustment >= IEEE_Emin - (Mantissa - 1) - Exp - then + if Adjustment >= IEEE_Emin - Mantissa - Exp then Expf := IEEE_Emin; Expi := Exp + Adjustment - Expf; @@ -688,6 +812,16 @@ package body System.Fat_Gen is Float_Word (IEEE_Ebias + Expf) * Exp_Factor; if Expi < 0 then + -- Given that Expi >= -Mantissa, only -64 is problematic + + if Expi = -64 then + pragma Annotate + (CodePeer, Intentional, "test always false", + "test always false in some instantiations"); + XX := XX / 2.0; + Expi := -63; + end if; + XX := XX / T (UST.Long_Long_Unsigned (2) ** (-Expi)); end if; @@ -700,66 +834,27 @@ package body System.Fat_Gen is ---------- function Succ (X : T) return T is - Tiny : constant T; - pragma Import (Ada, Tiny); - for Tiny'Address use (if T'Size = 16 then Tiny16'Address - elsif T'Size = 32 then Tiny32'Address - elsif T'Size = 64 then Tiny64'Address - elsif Mantissa = 64 then Tiny80'Address - else raise Program_Error); - X_Frac : T; - X_Exp : UI; - begin - -- Treat zero specially since it has a zero exponent - - if X = 0.0 then - return Tiny; - -- Special treatment for largest positive number: raise Constraint_Error - elsif X = T'Last then + if X = T'Last then raise Constraint_Error with "Succ of largest positive number"; - -- For infinities, return unchanged + -- For finite numbers, call the specific routine - elsif X < T'First or else X > T'Last then + elsif X >= T'First and then X < T'Last then + pragma Annotate (CodePeer, Intentional, "test always true", + "Check for invalid float"); pragma Annotate (CodePeer, Intentional, "condition predetermined", "Check for invalid float"); - return X; - pragma Annotate (CodePeer, Intentional, "dead code", - "Check float range."); + return Finite_Succ (X); - -- Add to the given number a number equivalent to the value of its - -- least significant bit. Given that the most significant bit - -- represents a value of 1.0 * Radix ** (Exp - 1), the value we want - -- is obtained by shifting this by (Mantissa-1) bits to the right, - -- i.e. decreasing the exponent by that amount. + -- For infinities and NaNs, return unchanged else - Decompose (X, X_Frac, X_Exp); - - -- For a denormalized number or a normalized number with the lowest - -- exponent, just add the Tiny. - - if X_Exp <= T'Machine_Emin then - return X + Tiny; - - -- A special case, if the number we had was a power of two on the - -- negative side of zero, then we want to add half of what we would - -- have added, since the exponent is going to be reduced. - - -- Note that X_Frac has the same sign as X, so if X_Frac is -Invrad, - -- then we know that we had a power of two on the negative side. - - elsif X_Frac = -Invrad then - return X + Scaling (1.0, X_Exp - Mantissa - 1); - - -- Otherwise the adjustment is unchanged - - else - return X + Scaling (1.0, X_Exp - Mantissa); - end if; + return X; + pragma Annotate (CodePeer, Intentional, "dead code", + "Check float range."); end if; end Succ; @@ -879,7 +974,19 @@ package body System.Fat_Gen is else pragma Assert (Exp = IEEE_Emin - 1); -- This is a denormalized number, valid if T'Denorm is True or 0.0 - return T'Denorm or else X.all = 0.0; + if T'Denorm then + return True; + + -- Note that we cannot do a direct comparison with 0.0 because the + -- hardware may evaluate it to True for all denormalized numbers. + + else + -- First clear the sign bit (the exponent is already zero) + + Rep (MSW) := Rep (MSW) and not Sign_Mask; + + return (for all J in 0 .. Rep_Last => Rep (J) = 0); + end if; end if; end Valid; diff --git a/gcc/ada/libgnat/s-fatgen.ads b/gcc/ada/libgnat/s-fatgen.ads index 700cfdc..1b191e2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-fatlfl.ads b/gcc/ada/libgnat/s-fatlfl.ads index 2be41118..08e0764 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-fatllf.ads b/gcc/ada/libgnat/s-fatllf.ads index 6361296..7aad47a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-ficobl.ads b/gcc/ada/libgnat/s-ficobl.ads index 1532cdb..6fff2da 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-filatt.ads b/gcc/ada/libgnat/s-filatt.ads index d969cec..30fa836 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-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- -- diff --git a/gcc/ada/libgnat/s-fileio.adb b/gcc/ada/libgnat/s-fileio.adb index c574487..152cd96 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-fileio.ads b/gcc/ada/libgnat/s-fileio.ads index de464d8..56bd3e6 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-finmas.adb b/gcc/ada/libgnat/s-finmas.adb index 3e9ae58..05029e1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2015-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- -- diff --git a/gcc/ada/libgnat/s-finmas.ads b/gcc/ada/libgnat/s-finmas.ads index eb30ea1..ea5a3fb 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -74,7 +74,7 @@ package System.Finalization_Masters is for Finalization_Master_Ptr'Storage_Size use 0; procedure Attach (N : not null FM_Node_Ptr; L : not null FM_Node_Ptr); - -- Compiler interface, do not call from withing the run-time. Prepend a + -- Compiler interface, do not call from within the run-time. Prepend a -- node to a specific finalization master. procedure Attach_Unprotected diff --git a/gcc/ada/libgnat/s-finroo.adb b/gcc/ada/libgnat/s-finroo.adb index c56f8fa..591b474 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-finroo.ads b/gcc/ada/libgnat/s-finroo.ads index c3b36c0..23393c5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-flocon.adb b/gcc/ada/libgnat/s-flocon.adb index 9eabefc..008e629 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-2020, AdaCore -- +-- Copyright (C) 2011-2021, 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 a5617c0..0c66b78 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-2020, AdaCore -- +-- Copyright (C) 2000-2021, 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 1dc3132..baf4edd 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-2020, AdaCore -- +-- Copyright (C) 2011-2021, 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 200a020..c5490cf 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-fode32.ads b/gcc/ada/libgnat/s-fode32.ads index 15c07a4..7e0d377 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-fode64.ads b/gcc/ada/libgnat/s-fode64.ads index 7e98185..826aa50 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-fofi128.ads b/gcc/ada/libgnat/s-fofi128.ads index aaa117f..cbb9b02 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-fofi32.ads b/gcc/ada/libgnat/s-fofi32.ads index cf94fb8..b5b2645 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-fofi64.ads b/gcc/ada/libgnat/s-fofi64.ads index cdde204..41acc77 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-fore_d.adb b/gcc/ada/libgnat/s-fore_d.adb index 1141c67..73f563f 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-fore_d.ads b/gcc/ada/libgnat/s-fore_d.ads index 25e3449..b930370 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-fore_f.adb b/gcc/ada/libgnat/s-fore_f.adb index c9c476d..109bffa 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-fore_f.ads b/gcc/ada/libgnat/s-fore_f.ads index cf6d983..52cf449 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-forrea.adb b/gcc/ada/libgnat/s-forrea.adb index cb74dc6..739ac92 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -31,12 +31,12 @@ package body System.Fore_Real is - --------------- - -- Fore_Real -- - --------------- + ---------------- + -- Fore_Fixed -- + ---------------- - function Fore_Real (Lo, Hi : Long_Long_Float) return Natural is - T : Long_Long_Float := Long_Long_Float'Max (abs Lo, abs Hi); + function Fore_Fixed (Lo, Hi : Long_Float) return Natural is + T : Long_Float := Long_Float'Max (abs Lo, abs Hi); F : Natural; begin @@ -52,6 +52,6 @@ package body System.Fore_Real is end loop; return F; - end Fore_Real; + end Fore_Fixed; end System.Fore_Real; diff --git a/gcc/ada/libgnat/s-forrea.ads b/gcc/ada/libgnat/s-forrea.ads index 6b0a211..73784c0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -29,14 +29,14 @@ -- -- ------------------------------------------------------------------------------ --- This package contains the routine used for the Fore attribute of ordinary --- fixed point types whose Small is neither an integer nor its reciprocal. +-- This package contains the routine for the Fore attribute of ordinary fixed +-- point types whose Small is not a ratio of two sufficiently small integers. package System.Fore_Real is pragma Pure; - function Fore_Real (Lo, Hi : Long_Long_Float) return Natural; + function Fore_Fixed (Lo, Hi : Long_Float) return Natural; -- Compute Fore attribute value for a fixed point type. The parameters - -- are the low and high bounds, converted to Long_Long_Float. + -- are the low and high bounds, converted to Long_Float. end System.Fore_Real; diff --git a/gcc/ada/libgnat/s-gearop.adb b/gcc/ada/libgnat/s-gearop.adb index 3eaeec2..957efd5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-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- -- diff --git a/gcc/ada/libgnat/s-gearop.ads b/gcc/ada/libgnat/s-gearop.ads index 2ee455c..340cf96 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-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- -- diff --git a/gcc/ada/libgnat/s-genbig.adb b/gcc/ada/libgnat/s-genbig.adb index bf222ac..8d03f0a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-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- -- diff --git a/gcc/ada/libgnat/s-genbig.ads b/gcc/ada/libgnat/s-genbig.ads index be8340e..6fc1c10 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-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- -- diff --git a/gcc/ada/libgnat/s-geveop.adb b/gcc/ada/libgnat/s-geveop.adb index ff62a34..bfbb232 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-geveop.ads b/gcc/ada/libgnat/s-geveop.ads index 33f4e69..8ad85a5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-gloloc.adb b/gcc/ada/libgnat/s-gloloc.adb index 9c859cf..201fc6f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-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- -- diff --git a/gcc/ada/libgnat/s-gloloc.ads b/gcc/ada/libgnat/s-gloloc.ads index e95884f..8c27fab 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-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- -- diff --git a/gcc/ada/libgnat/s-gloloc__mingw.adb b/gcc/ada/libgnat/s-gloloc__mingw.adb index d8c180e..be92ba6 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 476f4aa..af2db2f 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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.ads b/gcc/ada/libgnat/s-htable.ads index 6313ab3..b3b3dfa 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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-imageb.adb b/gcc/ada/libgnat/s-imageb.adb index 72e8fb3..e8d367b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imageb.ads b/gcc/ada/libgnat/s-imageb.ads index 109f5c7..b739807 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imaged.adb b/gcc/ada/libgnat/s-imaged.adb index 726b9d8..42c6423 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-imaged.ads b/gcc/ada/libgnat/s-imaged.ads index 5c3f82a..b53f96f 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-imagef.adb b/gcc/ada/libgnat/s-imagef.adb index 94a7a2f..e18fbf3 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-imagef.ads b/gcc/ada/libgnat/s-imagef.ads index ace7e6b..cac268a 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -60,7 +60,7 @@ package System.Image_F is -- For0 and Aft0 are the values of the Fore and Aft attributes for the -- fixed point type whose mantissa type is Int and whose small is Num/Den. -- This function is used only for fixed point whose Small is an integer or - -- its reciprocal (see package System.Img_Real for the handling of other + -- its reciprocal (see package System.Image_R for the handling of other -- ordinary fixed-point types). The caller guarantees that S is long enough -- to hold the result and has a lower bound of 1. diff --git a/gcc/ada/libgnat/s-imagei.adb b/gcc/ada/libgnat/s-imagei.adb index 36c1f6f..a942eaf 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imagei.ads b/gcc/ada/libgnat/s-imagei.ads index 2163af8..f80d92d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imagen.adb b/gcc/ada/libgnat/s-imagen.adb new file mode 100644 index 0000000..48c2e9f --- /dev/null +++ b/gcc/ada/libgnat/s-imagen.adb @@ -0,0 +1,79 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . I M A G E _ N -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 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. -- +-- -- +------------------------------------------------------------------------------ + +with Ada.Unchecked_Conversion; + +package body System.Image_N is + + ----------------------- + -- Image_Enumeration -- + ----------------------- + + procedure Image_Enumeration + (Pos : Natural; + S : in out String; + P : out Natural; + Names : String; + Indexes : System.Address) + is + pragma Assert (S'First = 1); + + subtype Names_Index is + Index_Type range Index_Type (Names'First) + .. Index_Type (Names'Last) + 1; + subtype Index is Natural range Natural'First .. Names'Length; + type Index_Table is array (Index) of Names_Index; + type Index_Table_Ptr is access Index_Table; + + function To_Index_Table_Ptr is + new Ada.Unchecked_Conversion (System.Address, Index_Table_Ptr); + + IndexesT : constant Index_Table_Ptr := To_Index_Table_Ptr (Indexes); + + pragma Assert (Pos in IndexesT'Range); + pragma Assert (Pos + 1 in IndexesT'Range); + + Start : constant Natural := Natural (IndexesT (Pos)); + Next : constant Natural := Natural (IndexesT (Pos + 1)); + + pragma Assert (Next - 1 >= Start); + pragma Assert (Start >= Names'First); + pragma Assert (Next - 1 <= Names'Last); + + pragma Assert (Next - Start <= S'Last); + -- The caller should guarantee that S is large enough to contain the + -- enumeration image. + begin + S (1 .. Next - Start) := Names (Start .. Next - 1); + P := Next - Start; + end Image_Enumeration; + +end System.Image_N; diff --git a/gcc/ada/libgnat/s-imgenu.ads b/gcc/ada/libgnat/s-imagen.ads index ccb1d07..6598be9 100644 --- a/gcc/ada/libgnat/s-imgenu.ads +++ b/gcc/ada/libgnat/s-imagen.ads @@ -2,11 +2,11 @@ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- --- S Y S T E M . I M G _ E N U M -- +-- S Y S T E M . I M A G E _ N -- -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 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- -- @@ -34,45 +34,30 @@ -- package System (where it is too early to start building image tables). -- Special routines exist for the enumeration types in these packages. --- Note: this is an obsolete package, replaced by System.Img_Enum_New, which --- provides procedures instead of functions for these enumeration image calls. --- The reason we maintain this package is that when bootstrapping with old --- compilers, the old compiler will search for this unit, expecting to find --- these functions. The new compiler will search for procedures in the new --- version of the unit. +generic -pragma Compiler_Unit_Warning; + type Index_Type is range <>; -package System.Img_Enum is +package System.Image_N is pragma Pure; - function Image_Enumeration_8 + procedure Image_Enumeration (Pos : Natural; + S : in out String; + P : out Natural; Names : String; - Indexes : System.Address) return String; + Indexes : System.Address); -- Used to compute Enum'Image (Str) where Enum is some enumeration type - -- other than those defined in package Standard. Names is a string with a - -- lower bound of 1 containing the characters of all the enumeration - -- literals concatenated together in sequence. Indexes is the address of an - -- array of type array (0 .. N) of Natural_8, where N is the number of + -- other than those defined in package Standard. Names is a string with + -- a lower bound of 1 containing the characters of all the enumeration + -- literals concatenated together in sequence. Indexes is the address of + -- an array of type array (0 .. N) of Index_Type, where N is the number of -- enumeration literals in the type. The Indexes values are the starting -- subscript of each enumeration literal, indexed by Pos values, with an -- extra entry at the end containing Names'Length + 1. The reason that -- Indexes is passed by address is that the actual type is created on the - -- fly by the expander. The value returned is the desired 'Image value. + -- fly by the expander. The desired 'Image value is stored in S (1 .. P) + -- and P is set on return. The caller guarantees that S is long enough to + -- hold the result and that the lower bound is 1. - function Image_Enumeration_16 - (Pos : Natural; - Names : String; - Indexes : System.Address) return String; - -- Identical to Image_Enumeration_8 except that it handles types - -- using array (0 .. Num) of Natural_16 for the Indexes table. - - function Image_Enumeration_32 - (Pos : Natural; - Names : String; - Indexes : System.Address) return String; - -- Identical to Image_Enumeration_8 except that it handles types - -- using array (0 .. Num) of Natural_32 for the Indexes table. - -end System.Img_Enum; +end System.Image_N; diff --git a/gcc/ada/libgnat/s-imager.adb b/gcc/ada/libgnat/s-imager.adb new file mode 100644 index 0000000..882bb27 --- /dev/null +++ b/gcc/ada/libgnat/s-imager.adb @@ -0,0 +1,464 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . I M A G E _ R -- +-- -- +-- 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. -- +-- -- +------------------------------------------------------------------------------ + +with System.Double_Real; +with System.Float_Control; +with System.Img_Util; use System.Img_Util; + +package body System.Image_R is + + -- The following defines the maximum number of digits that we can convert + -- accurately. This is limited by the precision of the Num type, and also + -- by the number of digits that can be held in the Uns type, which is the + -- integer type we use as an intermediate in the computation. But, in both + -- cases, we can work with a double value in these types. + + -- Note that in the following, the "-2" accounts for the space and one + -- extra digit, since we need the maximum number of 9's that can be + -- represented, e.g. for the 64-bit case, Long_Long_Unsigned'Width is + -- 21, since the maximum value (approx 1.8E+19) has 20 digits, but the + -- maximum number of 9's that can be represented is only 19. + + Maxdigs : constant Natural := 2 * Natural'Min (Uns'Width - 2, Num'Digits); + + Maxscaling : constant := 5000; + -- Max decimal scaling required during conversion of floating-point + -- numbers to decimal. This is used to defend against infinite + -- looping in the conversion, as can be caused by erroneous executions. + -- The largest exponent used on any current system is 2**16383, which + -- is approximately 10**4932, and the highest number of decimal digits + -- is about 35 for 128-bit floating-point formats, so 5000 leaves + -- enough room for scaling such values + + package Double_Real is new System.Double_Real (Num); + use type Double_Real.Double_T; + + subtype Double_T is Double_Real.Double_T; + -- The double floating-point type + + function From_Unsigned is new Double_Real.From_Unsigned (Uns); + function To_Unsigned is new Double_Real.To_Unsigned (Uns); + -- Convert betwwen a double Num and a single Uns + + function Is_Negative (V : Num) return Boolean; + -- Return True if V is negative for the purpose of the output, i.e. return + -- True for negative zeros only if Signed_Zeros is True. + + ----------------------- + -- Image_Fixed_Point -- + ----------------------- + + procedure Image_Fixed_Point + (V : Num; + S : in out String; + P : out Natural; + Aft : Natural) + is + pragma Assert (S'First = 1); + + begin + -- Output space at start if non-negative + + if V >= 0.0 then + S (1) := ' '; + P := 1; + else + P := 0; + end if; + + Set_Image_Real (V, S, P, 1, Aft, 0); + end Image_Fixed_Point; + + -------------------------- + -- Image_Floating_Point -- + -------------------------- + + procedure Image_Floating_Point + (V : Num; + S : in out String; + P : out Natural; + Digs : Natural) + is + pragma Assert (S'First = 1); + + begin + -- Decide whether a blank should be prepended before the call to + -- Set_Image_Real. We generate a blank for positive values, and + -- also for positive zeros. For negative zeros, we generate a + -- blank only if Signed_Zeros is False (the RM only permits the + -- output of -0.0 when Signed_Zeros is True). We do not generate + -- a blank for positive infinity, since we output an explicit +. + + if not Is_Negative (V) and then V <= Num'Last then + pragma Annotate (CodePeer, False_Positive, "condition predetermined", + "CodePeer analysis ignores NaN and Inf values"); + pragma Assert (S'Last > 1); + -- The caller is responsible for S to be large enough for all + -- Image_Floating_Point operation. + S (1) := ' '; + P := 1; + else + P := 0; + end if; + + Set_Image_Real (V, S, P, 1, Digs - 1, 3); + end Image_Floating_Point; + + ----------------- + -- Is_Negative -- + ----------------- + + function Is_Negative (V : Num) return Boolean is + begin + if V < 0.0 then + return True; + + elsif V > 0.0 then + return False; + + elsif not Num'Signed_Zeros then + return False; + + else + return Num'Copy_Sign (1.0, V) < 0.0; + end if; + end Is_Negative; + + -------------------- + -- Set_Image_Real -- + -------------------- + + procedure Set_Image_Real + (V : Num; + S : in out String; + P : in out Natural; + Fore : Natural; + Aft : Natural; + Exp : Natural) + is + Powten : constant array (0 .. Maxpow) of Double_T; + pragma Import (Ada, Powten); + for Powten'Address use Powten_Address; + + NFrac : constant Natural := Natural'Max (Aft, 1); + -- Number of digits after the decimal point + + Digs : String (1 .. 3 + Maxdigs); + -- Array used to hold digits of converted integer value + + Ndigs : Natural; + -- Number of digits stored in Digs (and also subscript of last digit) + + Scale : Integer := 0; + -- Exponent such that the result is Digs (1 .. NDigs) * 10**(-Scale) + + X : Double_T; + -- Current absolute value of the input after scaling + + procedure Adjust_Scale (S : Natural); + -- Adjusts the value in X by multiplying or dividing by a power of + -- ten so that it is in the range 10**(S-1) <= X < 10**S. Scale is + -- adjusted to reflect the power of ten used to divide the result, + -- i.e. one is added to the scale value for each multiplication by + -- 10.0 and one is subtracted for each division by 10.0. + + ------------------ + -- Adjust_Scale -- + ------------------ + + procedure Adjust_Scale (S : Natural) is + Lo, Mid, Hi : Natural; + XP : Double_T; + + begin + -- Cases where scaling up is required + + if X < Powten (S - 1) then + + -- What we are looking for is a power of ten to multiply X by + -- so that the result lies within the required range. + + loop + XP := X * Powten (Maxpow); + exit when XP >= Powten (S - 1) or else Scale > Maxscaling; + X := XP; + Scale := Scale + Maxpow; + end loop; + + -- The following exception is only raised in case of erroneous + -- execution, where a number was considered valid but still + -- fails to scale up. One situation where this can happen is + -- when a system which is supposed to be IEEE-compliant, but + -- has been reconfigured to flush denormals to zero. + + if Scale > Maxscaling then + raise Constraint_Error; + end if; + + -- Here we know that we must multiply by at least 10**1 and that + -- 10**Maxpow takes us too far: binary search to find right one. + + -- Because of roundoff errors, it is possible for the value + -- of XP to be just outside of the interval when Lo >= Hi. In + -- that case we adjust explicitly by a factor of 10. This + -- can only happen with a value that is very close to an + -- exact power of 10. + + Lo := 1; + Hi := Maxpow; + + loop + Mid := (Lo + Hi) / 2; + XP := X * Powten (Mid); + + if XP < Powten (S - 1) then + + if Lo >= Hi then + Mid := Mid + 1; + XP := XP * 10.0; + exit; + + else + Lo := Mid + 1; + end if; + + elsif XP >= Powten (S) then + + if Lo >= Hi then + Mid := Mid - 1; + XP := XP / 10.0; + exit; + + else + Hi := Mid - 1; + end if; + + else + exit; + end if; + end loop; + + X := XP; + Scale := Scale + Mid; + + -- Cases where scaling down is required + + elsif X >= Powten (S) then + + -- What we are looking for is a power of ten to divide X by + -- so that the result lies within the required range. + + loop + XP := X / Powten (Maxpow); + exit when XP < Powten (S) or else Scale < -Maxscaling; + X := XP; + Scale := Scale - Maxpow; + end loop; + + -- The following exception is only raised in case of erroneous + -- execution, where a number was considered valid but still + -- fails to scale up. One situation where this can happen is + -- when a system which is supposed to be IEEE-compliant, but + -- has been reconfigured to flush denormals to zero. + + if Scale < -Maxscaling then + raise Constraint_Error; + end if; + + -- Here we know that we must divide by at least 10**1 and that + -- 10**Maxpow takes us too far, binary search to find right one. + + Lo := 1; + Hi := Maxpow; + + loop + Mid := (Lo + Hi) / 2; + XP := X / Powten (Mid); + + if XP < Powten (S - 1) then + + if Lo >= Hi then + XP := XP * 10.0; + Mid := Mid - 1; + exit; + + else + Hi := Mid - 1; + end if; + + elsif XP >= Powten (S) then + + if Lo >= Hi then + XP := XP / 10.0; + Mid := Mid + 1; + exit; + + else + Lo := Mid + 1; + end if; + + else + exit; + end if; + end loop; + + X := XP; + Scale := Scale - Mid; + + -- Here we are already scaled right + + else + null; + end if; + end Adjust_Scale; + + -- Start of processing for Set_Image_Real + + begin + -- We call the floating-point processor reset routine so we can be sure + -- that the processor is properly set for conversions. This is notably + -- needed on Windows, where calls to the operating system randomly reset + -- the processor into 64-bit mode. + + if Num'Machine_Mantissa = 64 then + System.Float_Control.Reset; + end if; + + -- Deal with invalid values first + + if not V'Valid then + + -- Note that we're taking our chances here, as V might be + -- an invalid bit pattern resulting from erroneous execution + -- (caused by using uninitialized variables for example). + + -- No matter what, we'll at least get reasonable behavior, + -- converting to infinity or some other value, or causing an + -- exception to be raised is fine. + + -- If the following two tests succeed, then we definitely have + -- an infinite value, so we print +Inf or -Inf. + + if V > Num'Last then + pragma Annotate (CodePeer, False_Positive, "dead code", + "CodePeer analysis ignores NaN and Inf values"); + pragma Annotate (CodePeer, False_Positive, "test always true", + "CodePeer analysis ignores NaN and Inf values"); + + Set_Floating_Invalid_Value (Infinity, S, P, Fore, Aft, Exp); + + elsif V < Num'First then + Set_Floating_Invalid_Value (Minus_Infinity, S, P, Fore, Aft, Exp); + + -- In all other cases we print NaN + + else + Set_Floating_Invalid_Value (Not_A_Number, S, P, Fore, Aft, Exp); + end if; + + return; + end if; + + -- Set the first character like Image + + Digs (1) := (if Is_Negative (V) then '-' else ' '); + Ndigs := 1; + + X := Double_Real.To_Double (abs (V)); + + -- If X is zero, we are done + + if X = 0.0 then + Digs (2) := '0'; + Ndigs := 2; + + -- Otherwise, scale X and convert it to an integer + + else + -- In exponent notation, we need exactly NFrac + 1 digits and always + -- round the last one. + + if Exp > 0 then + Adjust_Scale (Natural'Min (NFrac + 1, Maxdigs)); + X := X + 0.5; + + -- In straight notation, we compute the maximum number of digits and + -- compare how many of them will be put after the decimal point with + -- Nfrac, in order to find out whether we need to round the last one + -- here or whether the rounding is performed by Set_Decimal_Digits. + + else + Adjust_Scale (Maxdigs); + if Scale <= NFrac then + X := X + 0.5; + end if; + end if; + + -- If X fits in an Uns, do the conversion directly. Note that this is + -- always the case for the Image attribute. + + if X <= Num (Uns'Last) then + Set_Image_Unsigned (To_Unsigned (X), Digs, Ndigs); + + -- Otherwise, do the conversion in two steps + + else pragma Assert (X <= 10.0 ** Num'Digits * Num (Uns'Last)); + declare + Y : constant Uns := To_Unsigned (X / Powten (Num'Digits)); + + Buf : String (1 .. Num'Digits); + Len : Natural; + + begin + Set_Image_Unsigned (Y, Digs, Ndigs); + + X := X - From_Unsigned (Y) * Powten (Num'Digits); + + Len := 0; + Set_Image_Unsigned (To_Unsigned (X), Buf, Len); + + for J in 1 .. Num'Digits - Len loop + Digs (Ndigs + J) := '0'; + end loop; + + for J in 1 .. Len loop + Digs (Ndigs + Num'Digits - Len + J) := Buf (J); + end loop; + + Ndigs := Ndigs + Num'Digits; + end; + end if; + end if; + + Set_Decimal_Digits (Digs, Ndigs, S, P, Scale, Fore, Aft, Exp); + end Set_Image_Real; + +end System.Image_R; diff --git a/gcc/ada/libgnat/s-imager.ads b/gcc/ada/libgnat/s-imager.ads new file mode 100644 index 0000000..1aa8687 --- /dev/null +++ b/gcc/ada/libgnat/s-imager.ads @@ -0,0 +1,92 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . I M A G E _ R -- +-- -- +-- 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 routines for the Image attribute of real types, and +-- is also for Float_IO/Fixed_IO output. + +generic + + type Num is digits <>; + + Maxpow : Positive; + + Powten_Address : System.Address; + + type Uns is mod <>; + + with procedure Set_Image_Unsigned + (V : Uns; + S : in out String; + P : in out Natural); + +package System.Image_R is + pragma Pure; + + procedure Image_Fixed_Point + (V : Num; + S : in out String; + P : out Natural; + Aft : Natural); + -- Computes fixed_type'Image (V) and returns the result in S (1 .. P) + -- updating P on return. The result is computed according to the rules for + -- image for fixed-point types (RM 3.5(34)), where Aft is the value of the + -- Aft attribute for the fixed-point type. The caller guarantees that S is + -- long enough to hold the result and has a lower bound of 1. + -- + -- Note: this procedure should NOT be called with V = -0.0 or V = +/-Inf. + + procedure Image_Floating_Point + (V : Num; + S : in out String; + P : out Natural; + Digs : Natural); + -- Computes Uns'Image (V) and returns the result in S (1 .. P) updating P + -- on return. The result is computed according to the rules for image for + -- floating-point types (RM 3.5(33)), where Digs is the value of the Digits + -- attribute for the floating-point type. The caller guarantees that S is + -- long enough to hold the result and has a lower bound of 1. + + procedure Set_Image_Real + (V : Num; + S : in out String; + P : in out Natural; + Fore : Natural; + Aft : Natural; + Exp : Natural); + -- Sets the image of V starting at S (P + 1), updating P to point to the + -- last character stored, the caller promises that the buffer is large + -- enough and no check is made for this. Constraint_Error will not + -- necessarily be raised if this is violated, since it is perfectly valid + -- to compile this unit with checks off). The Fore, Aft and Exp values + -- can be set to any valid values for the case of use from Text_IO. Note + -- that no space is stored at the start for non-negative values. + +end System.Image_R; diff --git a/gcc/ada/libgnat/s-imageu.adb b/gcc/ada/libgnat/s-imageu.adb index 8ffb8f0..fa3ac80 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imageu.ads b/gcc/ada/libgnat/s-imageu.ads index 39e738a..4dcd6bc 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imagew.adb b/gcc/ada/libgnat/s-imagew.adb index dd3b96e..a76a4dc 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imagew.ads b/gcc/ada/libgnat/s-imagew.ads index 14c0c60..edf2ec3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imde128.ads b/gcc/ada/libgnat/s-imde128.ads index cffd0c0..1812325 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-imde32.ads b/gcc/ada/libgnat/s-imde32.ads index bf19e9c..f2583cc 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-imde64.ads b/gcc/ada/libgnat/s-imde64.ads index dfc8403..e603c5d 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-imen16.ads b/gcc/ada/libgnat/s-imen16.ads new file mode 100644 index 0000000..755549e --- /dev/null +++ b/gcc/ada/libgnat/s-imen16.ads @@ -0,0 +1,51 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . I M G _ E N U M _ 1 6 -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 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. -- +-- -- +------------------------------------------------------------------------------ + +-- Instantiation of System.Image_N for enumeration types whose names table +-- has a length that fits in a 16-bit but not a 8-bit integer. + +with Interfaces; +with System.Image_N; + +package System.Img_Enum_16 is + pragma Pure; + + package Impl is new Image_N (Interfaces.Integer_16); + + procedure Image_Enumeration_16 + (Pos : Natural; + S : in out String; + P : out Natural; + Names : String; + Indexes : System.Address) + renames Impl.Image_Enumeration; + +end System.Img_Enum_16; diff --git a/gcc/ada/libgnat/a-stobbu.adb b/gcc/ada/libgnat/s-imen32.ads index fba591d..3cb88d8 100644 --- a/gcc/ada/libgnat/a-stobbu.adb +++ b/gcc/ada/libgnat/s-imen32.ads @@ -2,11 +2,11 @@ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- --- ADA.STRINGS.TEXT_OUTPUT.BIT_BUCKETS -- +-- S Y S T E M . I M G _ E N U M _ 3 2 -- -- -- --- B o d y -- +-- S p e c -- -- -- --- Copyright (C) 2020, Free Software Foundation, Inc. -- +-- Copyright (C) 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- -- @@ -29,25 +29,23 @@ -- -- ------------------------------------------------------------------------------ -package body Ada.Strings.Text_Output.Bit_Buckets is +-- Instantiation of System.Image_N for enumeration types whose names table +-- has a length that fits in a 32-bit but not a 16-bit integer. - type Bit_Bucket_Type is new Sink with null record; - overriding procedure Full_Method (S : in out Bit_Bucket_Type); - overriding procedure Flush_Method (S : in out Bit_Bucket_Type); +with Interfaces; +with System.Image_N; - The_Bit_Bucket : aliased Bit_Bucket_Type - (Chunk_Length => Default_Chunk_Length); - function Bit_Bucket return Sink_Access is (The_Bit_Bucket'Access); +package System.Img_Enum_32 is + pragma Pure; - overriding procedure Full_Method (S : in out Bit_Bucket_Type) - renames Flush_Method; + package Impl is new Image_N (Interfaces.Integer_32); - overriding procedure Flush_Method (S : in out Bit_Bucket_Type) is - begin - S.Last := 0; - end Flush_Method; + procedure Image_Enumeration_32 + (Pos : Natural; + S : in out String; + P : out Natural; + Names : String; + Indexes : System.Address) + renames Impl.Image_Enumeration; -begin - The_Bit_Bucket.Indent_Amount := 0; - The_Bit_Bucket.Cur_Chunk := The_Bit_Bucket.Initial_Chunk'Access; -end Ada.Strings.Text_Output.Bit_Buckets; +end System.Img_Enum_32; diff --git a/gcc/ada/libgnat/s-imenne.adb b/gcc/ada/libgnat/s-imenne.adb index 3052ea2..4ca7a12 100644 --- a/gcc/ada/libgnat/s-imenne.adb +++ b/gcc/ada/libgnat/s-imenne.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2000-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-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- -- diff --git a/gcc/ada/libgnat/s-imenne.ads b/gcc/ada/libgnat/s-imenne.ads index e150891..eba31c2 100644 --- a/gcc/ada/libgnat/s-imenne.ads +++ b/gcc/ada/libgnat/s-imenne.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2000-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-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- -- @@ -34,11 +34,11 @@ -- package System (where it is too early to start building image tables). -- Special routines exist for the enumeration types in these packages. --- This is the new version of the package, for use by compilers built after --- Nov 21st, 2007, which provides procedures that avoid using the secondary --- stack. The original package System.Img_Enum is maintained in the sources --- for bootstrapping with older versions of the compiler which expect to find --- functions in this package. +-- Note: this is an obsolete package replaced by instantiations of the generic +-- package System.Image_N. The reason we maintain this package is that when +-- bootstrapping with an old compiler, the old compiler will search for this +-- unit, expecting to find these functions. The new compiler will search for +-- procedures in the instances of System.Image_N instead. pragma Compiler_Unit_Warning; diff --git a/gcc/ada/libgnat/s-imenu8.ads b/gcc/ada/libgnat/s-imenu8.ads new file mode 100644 index 0000000..8c5a64d --- /dev/null +++ b/gcc/ada/libgnat/s-imenu8.ads @@ -0,0 +1,51 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . I M G _ E N U M _ 8 -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 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. -- +-- -- +------------------------------------------------------------------------------ + +-- Instantiation of System.Image_N for enumeration types whose names table +-- has a length that fits in a 8-bit integer. + +with Interfaces; +with System.Image_N; + +package System.Img_Enum_8 is + pragma Pure; + + package Impl is new Image_N (Interfaces.Integer_8); + + procedure Image_Enumeration_8 + (Pos : Natural; + S : in out String; + P : out Natural; + Names : String; + Indexes : System.Address) + renames Impl.Image_Enumeration; + +end System.Img_Enum_8; diff --git a/gcc/ada/libgnat/s-imfi128.ads b/gcc/ada/libgnat/s-imfi128.ads index 24fdf97..ab988fa 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-imfi32.ads b/gcc/ada/libgnat/s-imfi32.ads index 8c425df..98b8e8c 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-imfi64.ads b/gcc/ada/libgnat/s-imfi64.ads index 9045bf6..ba83a50 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-imgbiu.adb b/gcc/ada/libgnat/s-imgbiu.adb index fbbbcec..ea8feb9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgbiu.ads b/gcc/ada/libgnat/s-imgbiu.ads index 9cf24ae..09171c3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgboo.adb b/gcc/ada/libgnat/s-imgboo.adb index 35ae001..69ee639 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgboo.ads b/gcc/ada/libgnat/s-imgboo.ads index 1bf8449..45b3bfa 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgcha.adb b/gcc/ada/libgnat/s-imgcha.adb index 06048eb..bfcae49 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgcha.ads b/gcc/ada/libgnat/s-imgcha.ads index 5c9ead8..6cd954d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgenu.adb b/gcc/ada/libgnat/s-imgenu.adb deleted file mode 100644 index 7eae182..0000000 --- a/gcc/ada/libgnat/s-imgenu.adb +++ /dev/null @@ -1,128 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M . I M G _ E N U M -- --- -- --- B o d y -- --- -- --- Copyright (C) 2000-2020, Free Software Foundation, Inc. -- --- -- --- GNAT is 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. -- --- -- ------------------------------------------------------------------------------- - -pragma Compiler_Unit_Warning; - -with Ada.Unchecked_Conversion; - -package body System.Img_Enum is - - ------------------------- - -- Image_Enumeration_8 -- - ------------------------- - - function Image_Enumeration_8 - (Pos : Natural; - Names : String; - Indexes : System.Address) - return String - is - type Natural_8 is range 0 .. 2 ** 7 - 1; - type Index_Table is array (Natural) of Natural_8; - type Index_Table_Ptr is access Index_Table; - - function To_Index_Table_Ptr is - new Ada.Unchecked_Conversion (System.Address, Index_Table_Ptr); - - IndexesT : constant Index_Table_Ptr := To_Index_Table_Ptr (Indexes); - - Start : constant Natural := Natural (IndexesT (Pos)); - Next : constant Natural := Natural (IndexesT (Pos + 1)); - - subtype Result_Type is String (1 .. Next - Start); - -- We need this result type to force the result to have the - -- required lower bound of 1, rather than the slice bounds. - - begin - return Result_Type (Names (Start .. Next - 1)); - end Image_Enumeration_8; - - -------------------------- - -- Image_Enumeration_16 -- - -------------------------- - - function Image_Enumeration_16 - (Pos : Natural; - Names : String; - Indexes : System.Address) - return String - is - type Natural_16 is range 0 .. 2 ** 15 - 1; - type Index_Table is array (Natural) of Natural_16; - type Index_Table_Ptr is access Index_Table; - - function To_Index_Table_Ptr is - new Ada.Unchecked_Conversion (System.Address, Index_Table_Ptr); - - IndexesT : constant Index_Table_Ptr := To_Index_Table_Ptr (Indexes); - - Start : constant Natural := Natural (IndexesT (Pos)); - Next : constant Natural := Natural (IndexesT (Pos + 1)); - - subtype Result_Type is String (1 .. Next - Start); - -- We need this result type to force the result to have the - -- required lower bound of 1, rather than the slice bounds. - - begin - return Result_Type (Names (Start .. Next - 1)); - end Image_Enumeration_16; - - -------------------------- - -- Image_Enumeration_32 -- - -------------------------- - - function Image_Enumeration_32 - (Pos : Natural; - Names : String; - Indexes : System.Address) - return String - is - type Natural_32 is range 0 .. 2 ** 31 - 1; - type Index_Table is array (Natural) of Natural_32; - type Index_Table_Ptr is access Index_Table; - - function To_Index_Table_Ptr is - new Ada.Unchecked_Conversion (System.Address, Index_Table_Ptr); - - IndexesT : constant Index_Table_Ptr := To_Index_Table_Ptr (Indexes); - - Start : constant Natural := Natural (IndexesT (Pos)); - Next : constant Natural := Natural (IndexesT (Pos + 1)); - - subtype Result_Type is String (1 .. Next - Start); - -- We need this result type to force the result to have the - -- required lower bound of 1, rather than the slice bounds. - - begin - return Result_Type (Names (Start .. Next - 1)); - end Image_Enumeration_32; - -end System.Img_Enum; diff --git a/gcc/ada/libgnat/s-imgflt.ads b/gcc/ada/libgnat/s-imgflt.ads new file mode 100644 index 0000000..44f00b8 --- /dev/null +++ b/gcc/ada/libgnat/s-imgflt.ads @@ -0,0 +1,66 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- S Y S T E M . I M G _ F L T -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 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 routines for the Image attribute of floating point +-- types based on Float, also used for Float_IO output. + +with System.Image_R; +with System.Img_Uns; +with System.Powten_Flt; +with System.Unsigned_Types; + +package System.Img_Flt is + pragma Pure; + + package Impl is new Image_R + (Float, + System.Powten_Flt.Maxpow, + System.Powten_Flt.Powten'Address, + Unsigned_Types.Unsigned, + System.Img_Uns.Set_Image_Unsigned); + + procedure Image_Float + (V : Float; + S : in out String; + P : out Natural; + Digs : Natural) + renames Impl.Image_Floating_Point; + + procedure Set_Image_Float + (V : Float; + S : in out String; + P : in out Natural; + Fore : Natural; + Aft : Natural; + Exp : Natural) + renames Impl.Set_Image_Real; + +end System.Img_Flt; diff --git a/gcc/ada/libgnat/s-imgint.adb b/gcc/ada/libgnat/s-imgint.adb index acadd1c..f031120 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgint.ads b/gcc/ada/libgnat/s-imgint.ads index 08ce31d..5a1b8ed 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imglfl.ads b/gcc/ada/libgnat/s-imglfl.ads new file mode 100644 index 0000000..48f7fc0 --- /dev/null +++ b/gcc/ada/libgnat/s-imglfl.ads @@ -0,0 +1,80 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- S Y S T E M . I M G _ L F L T -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 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 routines for the Image attribute of fixed or floating +-- point types based on Long_Float, also used for Float_IO/Fixed_IO output. + +with System.Img_LLU; +with System.Image_R; +with System.Powten_LFlt; +with System.Unsigned_Types; + +package System.Img_LFlt is + pragma Pure; + + -- Note that the following instantiation is really for a 32-bit target, + -- where 128-bit integer types are not available. For a 64-bit targaet, + -- it is possible to use Long_Long_Unsigned and Long_Long_Long_Unsigned + -- instead of Unsigned and Long_Long_Unsigned, in order to double the + -- number of significant digits. But we do not do it by default to avoid + -- dragging 128-bit integer types for the sake of backward compatibility. + + package Impl is new Image_R + (Long_Float, + System.Powten_LFlt.Maxpow, + System.Powten_LFlt.Powten'Address, + Unsigned_Types.Long_Long_Unsigned, + System.Img_LLU.Set_Image_Long_Long_Unsigned); + + procedure Image_Fixed + (V : Long_Float; + S : in out String; + P : out Natural; + Aft : Natural) + renames Impl.Image_Fixed_Point; + + procedure Image_Long_Float + (V : Long_Float; + S : in out String; + P : out Natural; + Digs : Natural) + renames Impl.Image_Floating_Point; + + procedure Set_Image_Long_Float + (V : Long_Float; + S : in out String; + P : in out Natural; + Fore : Natural; + Aft : Natural; + Exp : Natural) + renames Impl.Set_Image_Real; + +end System.Img_LFlt; diff --git a/gcc/ada/libgnat/s-imgllb.adb b/gcc/ada/libgnat/s-imgllb.adb index 90ba5ce..291a815 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgllb.ads b/gcc/ada/libgnat/s-imgllb.ads index bfaf2ee..b65dbed 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgllf.ads b/gcc/ada/libgnat/s-imgllf.ads new file mode 100644 index 0000000..2a5a3e2 --- /dev/null +++ b/gcc/ada/libgnat/s-imgllf.ads @@ -0,0 +1,73 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- S Y S T E M . I M G _ L L F -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 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 routines for the Image attribute of floating point +-- types based on Long_Long_Float, also used for Float_IO output. + +with System.Img_LLU; +with System.Image_R; +with System.Powten_LLF; +with System.Unsigned_Types; + +package System.Img_LLF is + pragma Pure; + + -- Note that the following instantiation is really for a 32-bit target, + -- where 128-bit integer types are not available. For a 64-bit targaet, + -- it is possible to use Long_Long_Unsigned and Long_Long_Long_Unsigned + -- instead of Unsigned and Long_Long_Unsigned, in order to double the + -- number of significant digits. But we do not do it by default to avoid + -- dragging 128-bit integer types for the sake of backward compatibility. + + package Impl is new Image_R + (Long_Long_Float, + System.Powten_LLF.Maxpow, + System.Powten_LLF.Powten'Address, + Unsigned_Types.Long_Long_Unsigned, + System.Img_LLU.Set_Image_Long_Long_Unsigned); + + procedure Image_Long_Long_Float + (V : Long_Long_Float; + S : in out String; + P : out Natural; + Digs : Natural) + renames Impl.Image_Floating_Point; + + procedure Set_Image_Long_Long_Float + (V : Long_Long_Float; + S : in out String; + P : in out Natural; + Fore : Natural; + Aft : Natural; + Exp : Natural) + renames Impl.Set_Image_Real; + +end System.Img_LLF; diff --git a/gcc/ada/libgnat/s-imglli.adb b/gcc/ada/libgnat/s-imglli.adb index cdaeb7e..6eb265c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imglli.ads b/gcc/ada/libgnat/s-imglli.ads index 49defc5..2e0b42c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imglllb.ads b/gcc/ada/libgnat/s-imglllb.ads index b246037..6d1e418 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgllli.ads b/gcc/ada/libgnat/s-imgllli.ads index c6d41f9..5ca2f39 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imglllu.ads b/gcc/ada/libgnat/s-imglllu.ads index 8b6f16a..4406cb1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imglllw.ads b/gcc/ada/libgnat/s-imglllw.ads index de33f18..8958f8c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgllu.adb b/gcc/ada/libgnat/s-imgllu.adb index 680b11b..050f357 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgllu.ads b/gcc/ada/libgnat/s-imgllu.ads index dabc68d..e8b9d77 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgllw.adb b/gcc/ada/libgnat/s-imgllw.adb index 5702a93..1c3f185 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgllw.ads b/gcc/ada/libgnat/s-imgllw.ads index 12986e5..1862b78 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgrea.adb b/gcc/ada/libgnat/s-imgrea.adb index 2ec6a1a..255e659 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -29,689 +29,8 @@ -- -- ------------------------------------------------------------------------------ -with System.Img_LLU; use System.Img_LLU; -with System.Img_Uns; use System.Img_Uns; -with System.Powten_LLF; use System.Powten_LLF; -with System.Float_Control; +-- This package does not require a body, since it is a package renaming. We +-- provide a dummy file containing a No_Body pragma so that previous versions +-- of the body (which did exist) will not interfere. -package body System.Img_Real is - - -- The following defines the maximum number of digits that we can convert - -- accurately. This is limited by the precision of Long_Long_Float, and - -- also by the number of digits we can hold in Long_Long_Unsigned, which - -- is the integer type we use as an intermediate for the result. - - -- We assume that in practice, the limitation will come from the digits - -- value, rather than the integer value. This is true for typical IEEE - -- implementations, and at worst, the only loss is for some precision - -- in very high precision floating-point output. - - -- Note that in the following, the "-2" accounts for the sign and one - -- extra digit, since we need the maximum number of 9's that can be - -- represented, e.g. for the 64-bit case, Long_Long_Unsigned'Width is - -- 21, since the maximum value (approx 1.8E+19) has 20 digits, but the - -- maximum number of 9's that can be represented is only 19. - - Maxdigs : constant := - Natural'Min - (Long_Long_Unsigned'Width - 2, Long_Long_Float'Digits); - - Unsdigs : constant := Unsigned'Width - 2; - -- Number of digits that can be converted using type Unsigned - - Maxscaling : constant := 5000; - -- Max decimal scaling required during conversion of floating-point - -- numbers to decimal. This is used to defend against infinite - -- looping in the conversion, as can be caused by erroneous executions. - -- The largest exponent used on any current system is 2**16383, which - -- is approximately 10**4932, and the highest number of decimal digits - -- is about 35 for 128-bit floating-point formats, so 5000 leaves - -- enough room for scaling such values - - function Is_Negative (V : Long_Long_Float) return Boolean; - pragma Import (Intrinsic, Is_Negative); - - -------------------------- - -- Image_Floating_Point -- - -------------------------- - - procedure Image_Floating_Point - (V : Long_Long_Float; - S : in out String; - P : out Natural; - Digs : Natural) - is - pragma Assert (S'First = 1); - - begin - -- Decide whether a blank should be prepended before the call to - -- Set_Image_Real. We generate a blank for positive values, and - -- also for positive zeroes. For negative zeroes, we generate a - -- blank only if Signed_Zeros is False (the RM only permits the - -- output of -0.0 when Signed_Zeros is True). We do not generate - -- a blank for positive infinity, since we output an explicit +. - - if (not Is_Negative (V) and then V <= Long_Long_Float'Last) - or else (not Long_Long_Float'Signed_Zeros and then V = -0.0) - then - pragma Annotate (CodePeer, False_Positive, "condition predetermined", - "CodePeer analysis ignores NaN and Inf values"); - pragma Assert (S'Last > 1); - -- The caller is responsible for S to be large enough for all - -- Image_Floating_Point operation. - S (1) := ' '; - P := 1; - else - P := 0; - end if; - - Set_Image_Real (V, S, P, 1, Digs - 1, 3); - end Image_Floating_Point; - - -------------------------------- - -- Image_Ordinary_Fixed_Point -- - -------------------------------- - - procedure Image_Ordinary_Fixed_Point - (V : Long_Long_Float; - S : in out String; - P : out Natural; - Aft : Natural) - is - pragma Assert (S'First = 1); - - begin - -- Output space at start if non-negative - - if V >= 0.0 then - S (1) := ' '; - P := 1; - else - P := 0; - end if; - - Set_Image_Real (V, S, P, 1, Aft, 0); - end Image_Ordinary_Fixed_Point; - - -------------------- - -- Set_Image_Real -- - -------------------- - - procedure Set_Image_Real - (V : Long_Long_Float; - S : out String; - P : in out Natural; - Fore : Natural; - Aft : Natural; - Exp : Natural) - is - NFrac : constant Natural := Natural'Max (Aft, 1); - Minus : Boolean; - X : Long_Long_Float; - Scale : Integer; - Expon : Integer; - - Digs : String (1 .. Max_Real_Image_Length); - -- Array used to hold digits of converted integer value. This is a large - -- enough buffer to accommodate ludicrous Fore/Aft/Exp combinations. - - Ndigs : Natural; - -- Number of digits stored in Digs (and also subscript of last digit) - - procedure Adjust_Scale (S : Natural); - -- Adjusts the value in X by multiplying or dividing by a power of - -- ten so that it is in the range 10**(S-1) <= X < 10**S. Includes - -- adding 0.5 to round the result, readjusting if the rounding causes - -- the result to wander out of the range. Scale is adjusted to reflect - -- the power of ten used to divide the result (i.e. one is added to - -- the scale value for each division by 10.0, or one is subtracted - -- for each multiplication by 10.0). - - procedure Convert_Integer; - -- Takes the value in X, outputs integer digits into Digs. On return, - -- Ndigs is set to the number of digits stored. The digits are stored - -- in Digs (1 .. Ndigs), - - procedure Set (C : Character); - -- Sets character C in output buffer - - procedure Set_Blanks_And_Sign (N : Integer); - -- Sets leading blanks and minus sign if needed. N is the number of - -- positions to be filled (a minus sign is output even if N is zero - -- or negative, but for a positive value, if N is non-positive, then - -- the call has no effect). - - procedure Set_Digs (S, E : Natural); - -- Set digits S through E from Digs buffer. No effect if S > E - - procedure Set_Special_Fill (N : Natural); - -- After outputting +Inf, -Inf or NaN, this routine fills out the - -- rest of the field with * characters. The argument is the number - -- of characters output so far (either 3 or 4) - - procedure Set_Zeros (N : Integer); - -- Set N zeros, no effect if N is negative - - pragma Inline (Set); - pragma Inline (Set_Digs); - pragma Inline (Set_Zeros); - - ------------------ - -- Adjust_Scale -- - ------------------ - - procedure Adjust_Scale (S : Natural) is - Lo : Natural; - Hi : Natural; - Mid : Natural; - XP : Long_Long_Float; - - begin - -- Cases where scaling up is required - - if X < Powten (S - 1) then - - -- What we are looking for is a power of ten to multiply X by - -- so that the result lies within the required range. - - loop - XP := X * Powten (Maxpow); - exit when XP >= Powten (S - 1) or else Scale < -Maxscaling; - X := XP; - Scale := Scale - Maxpow; - end loop; - - -- The following exception is only raised in case of erroneous - -- execution, where a number was considered valid but still - -- fails to scale up. One situation where this can happen is - -- when a system which is supposed to be IEEE-compliant, but - -- has been reconfigured to flush denormals to zero. - - if Scale < -Maxscaling then - raise Constraint_Error; - end if; - - -- Here we know that we must multiply by at least 10**1 and that - -- 10**Maxpow takes us too far: binary search to find right one. - - -- Because of roundoff errors, it is possible for the value - -- of XP to be just outside of the interval when Lo >= Hi. In - -- that case we adjust explicitly by a factor of 10. This - -- can only happen with a value that is very close to an - -- exact power of 10. - - Lo := 1; - Hi := Maxpow; - - loop - Mid := (Lo + Hi) / 2; - XP := X * Powten (Mid); - - if XP < Powten (S - 1) then - - if Lo >= Hi then - Mid := Mid + 1; - XP := XP * 10.0; - exit; - - else - Lo := Mid + 1; - end if; - - elsif XP >= Powten (S) then - - if Lo >= Hi then - Mid := Mid - 1; - XP := XP / 10.0; - exit; - - else - Hi := Mid - 1; - end if; - - else - exit; - end if; - end loop; - - X := XP; - Scale := Scale - Mid; - - -- Cases where scaling down is required - - elsif X >= Powten (S) then - - -- What we are looking for is a power of ten to divide X by - -- so that the result lies within the required range. - - pragma Assert (Powten (Maxpow) /= 0.0); - - loop - XP := X / Powten (Maxpow); - exit when XP < Powten (S) or else Scale > Maxscaling; - X := XP; - Scale := Scale + Maxpow; - end loop; - - -- The following exception is only raised in case of erroneous - -- execution, where a number was considered valid but still - -- fails to scale up. One situation where this can happen is - -- when a system which is supposed to be IEEE-compliant, but - -- has been reconfigured to flush denormals to zero. - - if Scale > Maxscaling then - raise Constraint_Error; - end if; - - -- Here we know that we must divide by at least 10**1 and that - -- 10**Maxpow takes us too far, binary search to find right one. - - Lo := 1; - Hi := Maxpow; - - loop - Mid := (Lo + Hi) / 2; - XP := X / Powten (Mid); - - if XP < Powten (S - 1) then - - if Lo >= Hi then - XP := XP * 10.0; - Mid := Mid - 1; - exit; - - else - Hi := Mid - 1; - end if; - - elsif XP >= Powten (S) then - - if Lo >= Hi then - XP := XP / 10.0; - Mid := Mid + 1; - exit; - - else - Lo := Mid + 1; - end if; - - else - exit; - end if; - end loop; - - X := XP; - Scale := Scale + Mid; - - -- Here we are already scaled right - - else - null; - end if; - - -- Round, readjusting scale if needed. Note that if a readjustment - -- occurs, then it is never necessary to round again, because there - -- is no possibility of such a second rounding causing a change. - - X := X + 0.5; - - if X >= Powten (S) then - X := X / 10.0; - Scale := Scale + 1; - end if; - - end Adjust_Scale; - - --------------------- - -- Convert_Integer -- - --------------------- - - procedure Convert_Integer is - begin - -- Use Unsigned routine if possible, since on many machines it will - -- be significantly more efficient than the Long_Long_Unsigned one. - - if X < Powten (Unsdigs) then - pragma Assert (X in 0.0 .. Long_Long_Float (Unsigned'Last)); - Ndigs := 0; - Set_Image_Unsigned - (Unsigned (Long_Long_Float'Truncation (X)), - Digs, Ndigs); - - -- But if we want more digits than fit in Unsigned, we have to use - -- the Long_Long_Unsigned routine after all. - - else - pragma Assert (X < Powten (Maxdigs)); - pragma Assert - (X in 0.0 .. Long_Long_Float (Long_Long_Unsigned'Last)); - - Ndigs := 0; - Set_Image_Long_Long_Unsigned - (Long_Long_Unsigned (Long_Long_Float'Truncation (X)), - Digs, Ndigs); - end if; - end Convert_Integer; - - --------- - -- Set -- - --------- - - procedure Set (C : Character) is - begin - pragma Assert (P in S'First - 1 .. S'Last - 1); - -- No check is done as documented in the header: updating P to point - -- to the last character stored, the caller promises that the buffer - -- is large enough and no check is made for this. Constraint_Error - -- will not necessarily be raised if this requirement is violated, - -- since it is perfectly valid to compile this unit with checks off. - P := P + 1; - S (P) := C; - end Set; - - ------------------------- - -- Set_Blanks_And_Sign -- - ------------------------- - - procedure Set_Blanks_And_Sign (N : Integer) is - begin - if Minus then - for J in 1 .. N - 1 loop - Set (' '); - end loop; - - Set ('-'); - - else - for J in 1 .. N loop - Set (' '); - end loop; - end if; - end Set_Blanks_And_Sign; - - -------------- - -- Set_Digs -- - -------------- - - procedure Set_Digs (S, E : Natural) is - begin - pragma Assert (S >= Digs'First and E <= Digs'Last); - -- S and E should be in the Digs array range - for J in S .. E loop - Set (Digs (J)); - end loop; - end Set_Digs; - - ---------------------- - -- Set_Special_Fill -- - ---------------------- - - procedure Set_Special_Fill (N : Natural) is - F : Natural; - - begin - pragma Assert ((Fore + Aft - N + 1) in Natural); - -- Fore + Aft - N + 1 should be in the Natural range - F := Fore + 1 + Aft - N; - - if Exp /= 0 then - pragma Assert (F + Exp + 1 <= Natural'Last); - -- F + Exp + 1 should be in the Natural range - F := F + Exp + 1; - end if; - - for J in 1 .. F loop - Set ('*'); - end loop; - end Set_Special_Fill; - - --------------- - -- Set_Zeros -- - --------------- - - procedure Set_Zeros (N : Integer) is - begin - for J in 1 .. N loop - Set ('0'); - end loop; - end Set_Zeros; - - -- Start of processing for Set_Image_Real - - begin - -- We call the floating-point processor reset routine so we can be sure - -- that the processor is properly set for conversions. This is notably - -- needed on Windows, where calls to the operating system randomly reset - -- the processor into 64-bit mode. - - System.Float_Control.Reset; - - Scale := 0; - - -- Deal with invalid values first, - - if not V'Valid then - - -- Note that we're taking our chances here, as V might be - -- an invalid bit pattern resulting from erroneous execution - -- (caused by using uninitialized variables for example). - - -- No matter what, we'll at least get reasonable behavior, - -- converting to infinity or some other value, or causing an - -- exception to be raised is fine. - - -- If the following test succeeds, then we definitely have - -- an infinite value, so we print Inf. - - if V > Long_Long_Float'Last then - pragma Annotate (CodePeer, False_Positive, "dead code", - "CodePeer analysis ignores NaN and Inf values"); - pragma Annotate (CodePeer, False_Positive, "test always true", - "CodePeer analysis ignores NaN and Inf values"); - Set ('+'); - Set ('I'); - Set ('n'); - Set ('f'); - Set_Special_Fill (4); - -- In all other cases we print NaN - - elsif V < Long_Long_Float'First then - Set ('-'); - Set ('I'); - Set ('n'); - Set ('f'); - Set_Special_Fill (4); - else - Set ('N'); - Set ('a'); - Set ('N'); - Set_Special_Fill (3); - end if; - - return; - end if; - - -- Positive values - - if V > 0.0 then - X := V; - Minus := False; - - -- Negative values - - elsif V < 0.0 then - X := -V; - Minus := True; - - -- Zero values - - elsif V = 0.0 then - if Long_Long_Float'Signed_Zeros and then Is_Negative (V) then - Minus := True; - else - Minus := False; - end if; - - Set_Blanks_And_Sign (Fore - 1); - Set ('0'); - Set ('.'); - Set_Zeros (NFrac); - - if Exp /= 0 then - Set ('E'); - Set ('+'); - Set_Zeros (Natural'Max (1, Exp - 1)); - end if; - - return; - - else - -- It should not be possible for a NaN to end up here. - -- Either the 'Valid test has failed, or we have some form - -- of erroneous execution. Raise Constraint_Error instead of - -- attempting to go ahead printing the value. - - raise Constraint_Error; - end if; - - -- X and Minus are set here, and X is known to be a valid, - -- non-zero floating-point number. - - -- Case of non-zero value with Exp = 0 - - if Exp = 0 then - - -- First step is to multiply by 10 ** Nfrac to get an integer - -- value to be output, an then add 0.5 to round the result. - - declare - NF : Natural := NFrac; - - begin - loop - -- If we are larger than Powten (Maxdigs) now, then - -- we have too many significant digits, and we have - -- not even finished multiplying by NFrac (NF shows - -- the number of unaccounted-for digits). - - if X >= Powten (Maxdigs) then - - -- In this situation, we only to generate a reasonable - -- number of significant digits, and then zeroes after. - -- So first we rescale to get: - - -- 10 ** (Maxdigs - 1) <= X < 10 ** Maxdigs - - -- and then convert the resulting integer - - Adjust_Scale (Maxdigs); - Convert_Integer; - - -- If that caused rescaling, then add zeros to the end - -- of the number to account for this scaling. Also add - -- zeroes to account for the undone multiplications - - for J in 1 .. Scale + NF loop - Ndigs := Ndigs + 1; - pragma Assert (Ndigs <= Digs'Last); - Digs (Ndigs) := '0'; - end loop; - - exit; - - -- If multiplication is complete, then convert the resulting - -- integer after rounding (note that X is non-negative) - - elsif NF = 0 then - X := X + 0.5; - Convert_Integer; - exit; - - -- Otherwise we can go ahead with the multiplication. If it - -- can be done in one step, then do it in one step. - - elsif NF < Maxpow then - X := X * Powten (NF); - NF := 0; - - -- If it cannot be done in one step, then do partial scaling - - else - X := X * Powten (Maxpow); - NF := NF - Maxpow; - end if; - end loop; - end; - - -- If number of available digits is less or equal to NFrac, - -- then we need an extra zero before the decimal point. - - if Ndigs <= NFrac then - Set_Blanks_And_Sign (Fore - 1); - Set ('0'); - Set ('.'); - Set_Zeros (NFrac - Ndigs); - Set_Digs (1, Ndigs); - - -- Normal case with some digits before the decimal point - - else - Set_Blanks_And_Sign (Fore - (Ndigs - NFrac)); - Set_Digs (1, Ndigs - NFrac); - Set ('.'); - Set_Digs (Ndigs - NFrac + 1, Ndigs); - end if; - - -- Case of non-zero value with non-zero Exp value - - else - -- If NFrac is less than Maxdigs, then all the fraction digits are - -- significant, so we can scale the resulting integer accordingly. - - if NFrac < Maxdigs then - Adjust_Scale (NFrac + 1); - Convert_Integer; - - -- Otherwise, we get the maximum number of digits available - - else - Adjust_Scale (Maxdigs); - Convert_Integer; - - for J in 1 .. NFrac - Maxdigs + 1 loop - Ndigs := Ndigs + 1; - pragma Assert (Ndigs <= Digs'Last); - Digs (Ndigs) := '0'; - Scale := Scale - 1; - end loop; - end if; - - Set_Blanks_And_Sign (Fore - 1); - Set (Digs (1)); - Set ('.'); - Set_Digs (2, Ndigs); - - -- The exponent is the scaling factor adjusted for the digits - -- that we output after the decimal point, since these were - -- included in the scaled digits that we output. - - Expon := Scale + NFrac; - - Set ('E'); - Ndigs := 0; - - if Expon >= 0 then - Set ('+'); - Set_Image_Unsigned (Unsigned (Expon), Digs, Ndigs); - else - Set ('-'); - Set_Image_Unsigned (Unsigned (-Expon), Digs, Ndigs); - end if; - - Set_Zeros (Exp - Ndigs - 1); - Set_Digs (1, Ndigs); - end if; - - end Set_Image_Real; - -end System.Img_Real; +pragma No_Body; diff --git a/gcc/ada/libgnat/s-imgrea.ads b/gcc/ada/libgnat/s-imgrea.ads index d8eb721..45abac1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -29,56 +29,20 @@ -- -- ------------------------------------------------------------------------------ --- Image for fixed and float types (also used for Float_IO/Fixed_IO output) +-- This obsolete package is preserved for the sake of backward compatibility + +with System.Img_LLF; package System.Img_Real is pragma Pure; - procedure Image_Ordinary_Fixed_Point - (V : Long_Long_Float; - S : in out String; - P : out Natural; - Aft : Natural); - -- Computes fixed_type'Image (V) and returns the result in S (1 .. P) - -- updating P on return. The result is computed according to the rules for - -- image for fixed-point types (RM 3.5(34)), where Aft is the value of the - -- Aft attribute for the fixed-point type. This function is used only for - -- ordinary fixed point (see package System.Img_Dec for handling of decimal - -- fixed point). The caller guarantees that S is long enough to hold the - -- result and has a lower bound of 1. - -- - -- Remark: This procedure should NOT be called with V = -0.0 or V = +/-Inf, - -- The result is irrelevant. - - procedure Image_Floating_Point - (V : Long_Long_Float; - S : in out String; - P : out Natural; - Digs : Natural); - -- Computes float_type'Image (V) and returns the result in S (1 .. P) - -- updating P on return. The result is computed according to the rules for - -- image for floating-point types (RM 3.5(33)), where Digs is the value of - -- the Digits attribute for the floating-point type. The caller guarantees - -- that S is long enough to hold the result and has a lower bound of 1. - procedure Set_Image_Real (V : Long_Long_Float; - S : out String; + S : in out String; P : in out Natural; Fore : Natural; Aft : Natural; - Exp : Natural); - -- Sets the image of V starting at S (P + 1), updating P to point to the - -- last character stored, the caller promises that the buffer is large - -- enough and no check is made for this. Constraint_Error will not - -- necessarily be raised if this is violated, since it is perfectly valid - -- to compile this unit with checks off). The Fore, Aft and Exp values - -- can be set to any valid values for the case of use from Text_IO. Note - -- that no space is stored at the start for non-negative values. - - Max_Real_Image_Length : constant := 5200; - -- If Exp is set to zero and Aft is set to Text_IO.Field'Last (i.e., 255) - -- then Long_Long_Float'Last generates an image whose length is - -- slightly less than 5200. + Exp : Natural) + renames System.Img_LLF.Set_Image_Long_Long_Float; end System.Img_Real; diff --git a/gcc/ada/libgnat/s-imguns.adb b/gcc/ada/libgnat/s-imguns.adb index 8db42b4..bc4d851 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imguns.ads b/gcc/ada/libgnat/s-imguns.ads index 746fff1..e44f4fc 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imguti.adb b/gcc/ada/libgnat/s-imguti.adb index 571fb67..e86be49 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -400,4 +400,85 @@ package body System.Img_Util is end if; end Set_Decimal_Digits; + -------------------------------- + -- Set_Floating_Invalid_Value -- + -------------------------------- + + procedure Set_Floating_Invalid_Value + (V : Floating_Invalid_Value; + S : out String; + P : in out Natural; + Fore : Natural; + Aft : Natural; + Exp : Natural) + is + procedure Set (C : Character); + -- Sets character C in output buffer + + procedure Set_Special_Fill (N : Natural); + -- After outputting +Inf, -Inf or NaN, this routine fills out the + -- rest of the field with * characters. The argument is the number + -- of characters output so far (either 3 or 4) + + --------- + -- Set -- + --------- + + procedure Set (C : Character) is + begin + pragma Assert (P in S'First - 1 .. S'Last - 1); + -- No check is done as documented in the header: updating P to point + -- to the last character stored, the caller promises that the buffer + -- is large enough and no check is made for this. Constraint_Error + -- will not necessarily be raised if this requirement is violated, + -- since it is perfectly valid to compile this unit with checks off. + + P := P + 1; + S (P) := C; + end Set; + + ---------------------- + -- Set_Special_Fill -- + ---------------------- + + procedure Set_Special_Fill (N : Natural) is + begin + if Exp /= 0 then + for J in N + 1 .. Fore + 1 + Aft + 1 + Exp loop + Set ('*'); + end loop; + + else + for J in N + 1 .. Fore + 1 + Aft loop + Set ('*'); + end loop; + end if; + end Set_Special_Fill; + + -- Start of processing for Set_Floating_Invalid_Value + + begin + case V is + when Minus_Infinity => + Set ('-'); + Set ('I'); + Set ('n'); + Set ('f'); + Set_Special_Fill (4); + + when Infinity => + Set ('+'); + Set ('I'); + Set ('n'); + Set ('f'); + Set_Special_Fill (4); + + when Not_A_Number => + Set ('N'); + Set ('a'); + Set ('N'); + Set_Special_Fill (3); + end case; + end Set_Floating_Invalid_Value; + end System.Img_Util; diff --git a/gcc/ada/libgnat/s-imguti.ads b/gcc/ada/libgnat/s-imguti.ads index 6e21c65..68e8e2a 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -34,6 +34,11 @@ package System.Img_Util is pragma Pure; + Max_Real_Image_Length : constant := 5200; + -- If Exp is set to zero and Aft is set to Text_IO.Field'Last (i.e., 255) + -- then Long_Long_Float'Last generates an image whose length is slightly + -- less than 5200. + procedure Set_Decimal_Digits (Digs : in out String; NDigs : Natural; @@ -58,4 +63,19 @@ package System.Img_Util is -- may destroy the value in Digs, which is why Digs is in-out (this happens -- if rounding is required). + type Floating_Invalid_Value is (Minus_Infinity, Infinity, Not_A_Number); + + procedure Set_Floating_Invalid_Value + (V : Floating_Invalid_Value; + S : out String; + P : in out Natural; + Fore : Natural; + Aft : Natural; + Exp : Natural); + -- Sets the image of a floating-point invalid value, starting at S (P + 1), + -- updating P to point to the last character stored. The caller promises + -- that the buffer is large enough and therefore no check is made for it. + -- Constraint_Error will not necessarily be raised if the requirement is + -- violated since it is valid to compile this unit with checks off. + end System.Img_Util; diff --git a/gcc/ada/libgnat/s-imgwch.adb b/gcc/ada/libgnat/s-imgwch.adb index 499a513..9663126 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgwch.ads b/gcc/ada/libgnat/s-imgwch.ads index efc1463..7b285f4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgwiu.adb b/gcc/ada/libgnat/s-imgwiu.adb index 9f04cce..a7e7d7a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-imgwiu.ads b/gcc/ada/libgnat/s-imgwiu.ads index 89515e8..605625a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-io.adb b/gcc/ada/libgnat/s-io.adb index 23301e9..9f42791 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-io.ads b/gcc/ada/libgnat/s-io.ads index 6b733b6..20284b1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-llflex.ads b/gcc/ada/libgnat/s-llflex.ads index bbc79a8..ff0d007 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-maccod.ads b/gcc/ada/libgnat/s-maccod.ads index d2465f6..c78dc91 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-mantis.adb b/gcc/ada/libgnat/s-mantis.adb index 48eb280..d7a4c60 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-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- -- diff --git a/gcc/ada/libgnat/s-mantis.ads b/gcc/ada/libgnat/s-mantis.ads index 7ad511e..fbf35f8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-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- -- diff --git a/gcc/ada/libgnat/s-mastop.adb b/gcc/ada/libgnat/s-mastop.adb index cf87731..26c874c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-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- -- diff --git a/gcc/ada/libgnat/s-mastop.ads b/gcc/ada/libgnat/s-mastop.ads index ffe04be..1df1047 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-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- -- diff --git a/gcc/ada/libgnat/s-memcop.ads b/gcc/ada/libgnat/s-memcop.ads index db33a57..147c161 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2021, 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 f6ecf47..c026bcf 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-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- -- diff --git a/gcc/ada/libgnat/s-memory.ads b/gcc/ada/libgnat/s-memory.ads index 57e8b24..728779d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-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- -- diff --git a/gcc/ada/libgnat/s-mmap.adb b/gcc/ada/libgnat/s-mmap.adb index 0e1f4f7..fc978a4 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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-mmap.ads b/gcc/ada/libgnat/s-mmap.ads index 305d1f8..939c1ce 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 4fbd00a..3a68579 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 631e0dd..588e42e 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 8c3a472..74ac1f6 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 e0b369f..6a3e4ce 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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.ads b/gcc/ada/libgnat/s-mmosin__unix.ads index 234ce42..e9338cb 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-2020, AdaCore -- +-- Copyright (C) 2007-2021, 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 e17872c..8c9ae2b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2010-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- -- diff --git a/gcc/ada/libgnat/s-objrea.adb b/gcc/ada/libgnat/s-objrea.adb index 0cfa522..9dd8c1f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- @@ -47,7 +47,7 @@ package body System.Object_Reader is function Trim_Trailing_Nuls (Str : String) return String; -- Return a copy of a string with any trailing NUL characters truncated - procedure Check_Read_Offset (S : in out Mapped_Stream; Size : uint32); + procedure Check_Read_Offset (S : Mapped_Stream; Size : uint32); -- Check that the SIZE bytes at the current offset are still in the stream ------------------------------------- @@ -78,6 +78,7 @@ package body System.Object_Reader is EM_SPARCV9 : constant := 43; -- SPARC v9 64-bit EM_IA_64 : constant := 50; -- Intel Merced EM_X86_64 : constant := 62; -- AMD x86-64 architecture + EM_AARCH64 : constant := 183; -- Aarch64 EN_NIDENT : constant := 16; @@ -648,6 +649,9 @@ package body System.Object_Reader is when EM_ARM => Res.Arch := ARM; + when EM_AARCH64 => + Res.Arch := AARCH64; + when others => raise Format_Error with "unrecognized architecture"; end case; @@ -1931,7 +1935,7 @@ package body System.Object_Reader is return To_String_Ptr_Len (Read (S)); end Read; - procedure Check_Read_Offset (S : in out Mapped_Stream; Size : uint32) is + procedure Check_Read_Offset (S : Mapped_Stream; Size : uint32) is begin if S.Off + Offset (Size) > Offset (Last (S.Region)) then raise IO_Error with "could not read from object file"; @@ -2038,7 +2042,8 @@ package body System.Object_Reader is Address_32 := Read (S); return uint64 (Address_32); - when IA64 + when AARCH64 + | IA64 | PPC64 | SPARC64 | x86_64 diff --git a/gcc/ada/libgnat/s-objrea.ads b/gcc/ada/libgnat/s-objrea.ads index b3cfe13..a83ca53 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- @@ -120,9 +120,12 @@ package System.Object_Reader is PPC64, -- 64-bit PowerPC - ARM); + ARM, -- 32-bit ARM + AARCH64); + -- 64-bit ARM + ------------------ -- Target types -- ------------------ diff --git a/gcc/ada/libgnat/s-optide.adb b/gcc/ada/libgnat/s-optide.adb index c979797..6ab0301 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-2020, AdaCore -- +-- Copyright (C) 2012-2021, 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 93522bc..19f4cf7 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-2020, AdaCore -- +-- Copyright (C) 1995-2021, 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- -- @@ -133,42 +133,6 @@ package body System.OS_Lib is -- Converts a C String to an Ada String. We could do this making use of -- Interfaces.C.Strings but we prefer not to import that entire package - --------- - -- "<" -- - --------- - - function "<" (X, Y : OS_Time) return Boolean is - begin - return Long_Integer (X) < Long_Integer (Y); - end "<"; - - ---------- - -- "<=" -- - ---------- - - function "<=" (X, Y : OS_Time) return Boolean is - begin - return Long_Integer (X) <= Long_Integer (Y); - end "<="; - - --------- - -- ">" -- - --------- - - function ">" (X, Y : OS_Time) return Boolean is - begin - return Long_Integer (X) > Long_Integer (Y); - end ">"; - - ---------- - -- ">=" -- - ---------- - - function ">=" (X, Y : OS_Time) return Boolean is - begin - return Long_Integer (X) >= Long_Integer (Y); - end ">="; - ----------------- -- Args_Length -- ----------------- @@ -1347,13 +1311,13 @@ package body System.OS_Lib is Second : out Second_Type) is procedure To_GM_Time - (P_Time_T : Address; - P_Year : Address; - P_Month : Address; - P_Day : Address; - P_Hours : Address; - P_Mins : Address; - P_Secs : Address); + (P_OS_Time : Address; + P_Year : Address; + P_Month : Address; + P_Day : Address; + P_Hours : Address; + P_Mins : Address; + P_Secs : Address); pragma Import (C, To_GM_Time, "__gnat_to_gm_time"); T : OS_Time := Date; @@ -1385,13 +1349,13 @@ package body System.OS_Lib is Locked_Processing : begin SSL.Lock_Task.all; To_GM_Time - (P_Time_T => T'Address, - P_Year => Y'Address, - P_Month => Mo'Address, - P_Day => D'Address, - P_Hours => H'Address, - P_Mins => Mn'Address, - P_Secs => S'Address); + (P_OS_Time => T'Address, + P_Year => Y'Address, + P_Month => Mo'Address, + P_Day => D'Address, + P_Hours => H'Address, + P_Mins => Mn'Address, + P_Secs => S'Address); SSL.Unlock_Task.all; exception @@ -1429,26 +1393,26 @@ package body System.OS_Lib is Second : Second_Type) return OS_Time is procedure To_OS_Time - (P_Time_T : Address; - P_Year : Integer; - P_Month : Integer; - P_Day : Integer; - P_Hours : Integer; - P_Mins : Integer; - P_Secs : Integer); + (P_OS_Time : Address; + P_Year : Integer; + P_Month : Integer; + P_Day : Integer; + P_Hours : Integer; + P_Mins : Integer; + P_Secs : Integer); pragma Import (C, To_OS_Time, "__gnat_to_os_time"); Result : OS_Time; begin To_OS_Time - (P_Time_T => Result'Address, - P_Year => Year - 1900, - P_Month => Month - 1, - P_Day => Day, - P_Hours => Hour, - P_Mins => Minute, - P_Secs => Second); + (P_OS_Time => Result'Address, + P_Year => Year - 1900, + P_Month => Month - 1, + P_Day => Day, + P_Hours => Hour, + P_Mins => Minute, + P_Secs => Second); return Result; end GM_Time_Of; @@ -2158,8 +2122,10 @@ package body System.OS_Lib is return On_Windows and then not Is_With_Drive (Name) and then (Name'Length < 2 -- not \\name case - or else Name (Name'First .. Name'First + 1) - /= Directory_Separator & Directory_Separator); + or else Name (Name'First) + /= Directory_Separator + or else Name (Name'First + 1) + /= Directory_Separator); end Missed_Drive_Letter; ----------------- diff --git a/gcc/ada/libgnat/s-os_lib.ads b/gcc/ada/libgnat/s-os_lib.ads index f786cca..2049e38 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-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- -- @@ -164,8 +164,21 @@ package System.OS_Lib is -- component parts to be interpreted in the local time zone, and returns -- an OS_Time. Returns Invalid_Time if the creation fails. - subtype time_t is Long_Integer; - -- C time_t type of the time representation + ------------------ + -- Time_t Stuff -- + ------------------ + + -- Note: Do not use time_t in the compiler and host-based tools; instead + -- use OS_Time. These 3 declarations are intended for use only by consumers + -- of the GNAT.OS_Lib renaming of this package. + + subtype time_t is Long_Long_Integer; + -- C time_t can be either long or long long, but this is a subtype not used + -- in the compiler or tools, but only for user applications, so we choose + -- the Ada equivalent of the latter because eventually that will be the + -- type used out of necessity. This may affect some user code on 32-bit + -- targets that have not yet migrated to the Posix 2008 standard, + -- particularly pre version 5 32-bit Linux. function To_C (Time : OS_Time) return time_t; -- Convert OS_Time to C time_t type @@ -1098,24 +1111,18 @@ private pragma Import (C, Current_Process_Id, "__gnat_current_process_id"); type OS_Time is - range -(2 ** (Standard'Address_Size - Integer'(1))) .. - +(2 ** (Standard'Address_Size - Integer'(1)) - 1); + range -(2 ** 63) .. +(2 ** 63 - 1); -- Type used for timestamps in the compiler. This type is used to hold -- time stamps, but may have a different representation than C's time_t. -- This type needs to match the declaration of OS_Time in adaint.h. - -- Add pragma Inline statements for comparison operations on OS_Time. It - -- would actually be nice to use pragma Import (Intrinsic) here, but this - -- was not properly supported till GNAT 3.15a, so that would cause - -- bootstrap path problems. To be changed later ??? - Invalid_Time : constant OS_Time := -1; -- This value should match the return value from __gnat_file_time_* - pragma Inline ("<"); - pragma Inline (">"); - pragma Inline ("<="); - pragma Inline (">="); + pragma Import (Intrinsic, "<"); + pragma Import (Intrinsic, ">"); + pragma Import (Intrinsic, "<="); + pragma Import (Intrinsic, ">="); pragma Inline (To_C); pragma Inline (To_Ada); diff --git a/gcc/ada/libgnat/s-osprim.ads b/gcc/ada/libgnat/s-osprim.ads index fce4203..fb4eb9ff 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2021, 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 8e85871..00d0ccb 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2021, 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- -- @@ -31,6 +31,7 @@ -- This version is for darwin +with System.Parameters; package body System.OS_Primitives is -- ??? These definitions are duplicated from System.OS_Interface @@ -45,7 +46,8 @@ package body System.OS_Primitives is pragma Convention (C, struct_timezone); type struct_timezone_ptr is access all struct_timezone; - type time_t is new Long_Integer; + type time_t is range -2 ** (System.Parameters.time_t_bits - 1) + .. 2 ** (System.Parameters.time_t_bits - 1) - 1; type struct_timeval is record tv_sec : time_t; diff --git a/gcc/ada/libgnat/s-osprim__lynxos.ads b/gcc/ada/libgnat/s-osprim__lynxos.ads index e181f7e..790c597 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2021, 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 8e0c425..61f24fd 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2021, 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 4413616..96bf70e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2021, 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- -- @@ -30,6 +30,7 @@ ------------------------------------------------------------------------------ -- This version is for POSIX-like operating systems +with System.Parameters; package body System.OS_Primitives is @@ -38,7 +39,8 @@ package body System.OS_Primitives is -- these declarations in System.OS_Interface and move these ones in -- the spec. - type time_t is new Long_Integer; + type time_t is range -2 ** (System.Parameters.time_t_bits - 1) + .. 2 ** (System.Parameters.time_t_bits - 1) - 1; type timespec is record tv_sec : time_t; diff --git a/gcc/ada/libgnat/s-osprim__posix2008.adb b/gcc/ada/libgnat/s-osprim__posix2008.adb index 87bbdc1..44f14c4f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2021, 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- -- @@ -33,6 +33,7 @@ with System.CRTL; with System.OS_Constants; +with System.Parameters; package body System.OS_Primitives is subtype int is System.CRTL.int; @@ -41,7 +42,8 @@ package body System.OS_Primitives is -- we don't want to depend on any package. Consider removing these -- declarations in System.OS_Interface and move these ones to the spec. - type time_t is new System.CRTL.int64; + type time_t is range -2 ** (System.Parameters.time_t_bits - 1) + .. 2 ** (System.Parameters.time_t_bits - 1) - 1; type timespec is record tv_sec : time_t; diff --git a/gcc/ada/libgnat/s-osprim__rtems.adb b/gcc/ada/libgnat/s-osprim__rtems.adb index 5cdc03d..23669e1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2021, 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- -- @@ -31,6 +31,7 @@ -- This version is for POSIX-like operating systems +with System.Parameters; package body System.OS_Primitives is -- ??? These definitions are duplicated from System.OS_Interface @@ -38,7 +39,8 @@ package body System.OS_Primitives is -- these declarations in System.OS_Interface and move these ones in -- the spec. - type time_t is new Long_Long_Integer; + type time_t is range -2 ** (System.Parameters.time_t_bits - 1) + .. 2 ** (System.Parameters.time_t_bits - 1) - 1; type timespec is record tv_sec : time_t; diff --git a/gcc/ada/libgnat/s-osprim__solaris.adb b/gcc/ada/libgnat/s-osprim__solaris.adb index 7165bc4..62e2d98 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2021, 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 9a936c6..4d2db9b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2021, 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__vxworks.adb b/gcc/ada/libgnat/s-osprim__vxworks.adb index 40e7d49..ad2ac40 100644 --- a/gcc/ada/libgnat/s-osprim__vxworks.adb +++ b/gcc/ada/libgnat/s-osprim__vxworks.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2021, 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 4a11379..9dc1ba9 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2021, 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- -- @@ -31,6 +31,8 @@ -- This version is for Linux/x32 +with System.Parameters; + package body System.OS_Primitives is -- ??? These definitions are duplicated from System.OS_Interface @@ -38,7 +40,8 @@ package body System.OS_Primitives is -- these declarations in System.OS_Interface and move these ones in -- the spec. - type time_t is new Long_Long_Integer; + type time_t is range -2 ** (System.Parameters.time_t_bits - 1) + .. 2 ** (System.Parameters.time_t_bits - 1) - 1; type timespec is record tv_sec : time_t; diff --git a/gcc/ada/libgnat/s-osvers__vxworks-653.ads b/gcc/ada/libgnat/s-osvers__vxworks-653.ads index 48b1c2a..e180e7c 100644 --- a/gcc/ada/libgnat/s-osvers__vxworks-653.ads +++ b/gcc/ada/libgnat/s-osvers__vxworks-653.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2010-2020, AdaCore -- +-- Copyright (C) 2010-2021, 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-pack03.adb b/gcc/ada/libgnat/s-pack03.adb index 32e7c0c..1f6c2ef 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack03.ads b/gcc/ada/libgnat/s-pack03.ads index 47d71f0..eb1094e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack05.adb b/gcc/ada/libgnat/s-pack05.adb index 78a7005..c7845aa 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack05.ads b/gcc/ada/libgnat/s-pack05.ads index cdcacc7..3f4ef87 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack06.adb b/gcc/ada/libgnat/s-pack06.adb index 623b955..02b5331 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack06.ads b/gcc/ada/libgnat/s-pack06.ads index 0c918a0..e7ca7b1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack07.adb b/gcc/ada/libgnat/s-pack07.adb index f0a3177..dbcb05e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack07.ads b/gcc/ada/libgnat/s-pack07.ads index 4fa1385..49be5ee 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack09.adb b/gcc/ada/libgnat/s-pack09.adb index 8517f4d..af5804c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack09.ads b/gcc/ada/libgnat/s-pack09.ads index cdf62e3..f03afc0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack10.adb b/gcc/ada/libgnat/s-pack10.adb index d08751d..1ba1769 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack10.ads b/gcc/ada/libgnat/s-pack10.ads index 33ed2dd1..621e84f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack100.adb b/gcc/ada/libgnat/s-pack100.adb index bae251c..d3211e3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack100.ads b/gcc/ada/libgnat/s-pack100.ads index dfb3e62..ada158d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack101.adb b/gcc/ada/libgnat/s-pack101.adb index dfa1cf3..9ef16e5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack101.ads b/gcc/ada/libgnat/s-pack101.ads index 2e77051..91eaf5c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack102.adb b/gcc/ada/libgnat/s-pack102.adb index ebf1094..9da1d19 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack102.ads b/gcc/ada/libgnat/s-pack102.ads index 065f338..22c17024 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack103.adb b/gcc/ada/libgnat/s-pack103.adb index b5df31e..158daf9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack103.ads b/gcc/ada/libgnat/s-pack103.ads index ad12b0e..0e1442f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack104.adb b/gcc/ada/libgnat/s-pack104.adb index 573fe4a..4cf7e0e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack104.ads b/gcc/ada/libgnat/s-pack104.ads index 3dee1a7..1e111f9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack105.adb b/gcc/ada/libgnat/s-pack105.adb index b5e2aab..44052c5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack105.ads b/gcc/ada/libgnat/s-pack105.ads index 2faf652..dfe49f8 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack106.adb b/gcc/ada/libgnat/s-pack106.adb index 645b5a2..a604456 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack106.ads b/gcc/ada/libgnat/s-pack106.ads index 27c7efa..b4a4711 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack107.adb b/gcc/ada/libgnat/s-pack107.adb index 7e1a86a..4c04486 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack107.ads b/gcc/ada/libgnat/s-pack107.ads index 3eba81d..dcd4c07 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack108.adb b/gcc/ada/libgnat/s-pack108.adb index afe28a5..6da22bd 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack108.ads b/gcc/ada/libgnat/s-pack108.ads index e751654..8bb2017 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack109.adb b/gcc/ada/libgnat/s-pack109.adb index e976ed4..3770666 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack109.ads b/gcc/ada/libgnat/s-pack109.ads index 2ea8b42..3d809c3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack11.adb b/gcc/ada/libgnat/s-pack11.adb index ca2b3ad..ed3b901 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack11.ads b/gcc/ada/libgnat/s-pack11.ads index e565d80..6298e49 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack110.adb b/gcc/ada/libgnat/s-pack110.adb index a85eb3d..c88fdd5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack110.ads b/gcc/ada/libgnat/s-pack110.ads index 570a994..74a5cf5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack111.adb b/gcc/ada/libgnat/s-pack111.adb index 168877b..b760b90 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack111.ads b/gcc/ada/libgnat/s-pack111.ads index 784b861..a653ed4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack112.adb b/gcc/ada/libgnat/s-pack112.adb index b8acf56..f6880fe 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack112.ads b/gcc/ada/libgnat/s-pack112.ads index 6b36a8b..fdc5349 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack113.adb b/gcc/ada/libgnat/s-pack113.adb index 58f84d4..d34b7d7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack113.ads b/gcc/ada/libgnat/s-pack113.ads index 2f0bfc2..5c864af 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack114.adb b/gcc/ada/libgnat/s-pack114.adb index 079abeb..b74a46e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack114.ads b/gcc/ada/libgnat/s-pack114.ads index 046026e..89bdec7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack115.adb b/gcc/ada/libgnat/s-pack115.adb index 0459777..882ce51 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack115.ads b/gcc/ada/libgnat/s-pack115.ads index a2063a6..3ace3c4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack116.adb b/gcc/ada/libgnat/s-pack116.adb index d03c857..f5c5aaa 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack116.ads b/gcc/ada/libgnat/s-pack116.ads index 3cd556d..fd219cb 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack117.adb b/gcc/ada/libgnat/s-pack117.adb index 92da470..817616f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack117.ads b/gcc/ada/libgnat/s-pack117.ads index 478663a..c7f03cc 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack118.adb b/gcc/ada/libgnat/s-pack118.adb index aa1d763..0b4003d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack118.ads b/gcc/ada/libgnat/s-pack118.ads index 0902c5c..3f5d0e1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack119.adb b/gcc/ada/libgnat/s-pack119.adb index 9003175..250f895 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack119.ads b/gcc/ada/libgnat/s-pack119.ads index 75d1c4a..6821bd5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack12.adb b/gcc/ada/libgnat/s-pack12.adb index d53e9a3..66c9dc1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack12.ads b/gcc/ada/libgnat/s-pack12.ads index 84323be..3808774 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack120.adb b/gcc/ada/libgnat/s-pack120.adb index 774085c..ad87b96 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack120.ads b/gcc/ada/libgnat/s-pack120.ads index ae5580a..b49d3bb 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack121.adb b/gcc/ada/libgnat/s-pack121.adb index a44f144..baeac89 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack121.ads b/gcc/ada/libgnat/s-pack121.ads index 5f4f5ed..a05586b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack122.adb b/gcc/ada/libgnat/s-pack122.adb index 13c59ac..7cb7ef6 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack122.ads b/gcc/ada/libgnat/s-pack122.ads index 0094896..57a4575 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack123.adb b/gcc/ada/libgnat/s-pack123.adb index 27d7417..630cc7e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack123.ads b/gcc/ada/libgnat/s-pack123.ads index f40fe87..b35eb86 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack124.adb b/gcc/ada/libgnat/s-pack124.adb index 2e6d9c0..8ca12eb 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack124.ads b/gcc/ada/libgnat/s-pack124.ads index 3a4f159..12cfee1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack125.adb b/gcc/ada/libgnat/s-pack125.adb index ffc2c1c..32193d9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack125.ads b/gcc/ada/libgnat/s-pack125.ads index dc4fdc9..b06dfcf 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack126.adb b/gcc/ada/libgnat/s-pack126.adb index c566fc9..c5529f4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack126.ads b/gcc/ada/libgnat/s-pack126.ads index fd83f78..a9a4edc 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack127.adb b/gcc/ada/libgnat/s-pack127.adb index 3895c1f..3a261df 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack127.ads b/gcc/ada/libgnat/s-pack127.ads index c37ae59..9f37b9a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack13.adb b/gcc/ada/libgnat/s-pack13.adb index 9d9ee0e..72aec3f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack13.ads b/gcc/ada/libgnat/s-pack13.ads index bb56cfc..e68e0c2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack14.adb b/gcc/ada/libgnat/s-pack14.adb index cceb09e..919a59a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack14.ads b/gcc/ada/libgnat/s-pack14.ads index 3c1c8e2..63f0929 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack15.adb b/gcc/ada/libgnat/s-pack15.adb index 0e91afc..231cb71 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack15.ads b/gcc/ada/libgnat/s-pack15.ads index fb73d29..0b3f4e3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack17.adb b/gcc/ada/libgnat/s-pack17.adb index 7ba49ca..28b1ecd 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack17.ads b/gcc/ada/libgnat/s-pack17.ads index f47c7bd..5aa9bf7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack18.adb b/gcc/ada/libgnat/s-pack18.adb index e4b7d9f..bc077bb5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack18.ads b/gcc/ada/libgnat/s-pack18.ads index 2e196bf..b96eccc 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack19.adb b/gcc/ada/libgnat/s-pack19.adb index 50336a9..cd424b2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack19.ads b/gcc/ada/libgnat/s-pack19.ads index 58d7837..6c5df71 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack20.adb b/gcc/ada/libgnat/s-pack20.adb index a2a2fda..2577f5a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack20.ads b/gcc/ada/libgnat/s-pack20.ads index 10d75e8..558d0d7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack21.adb b/gcc/ada/libgnat/s-pack21.adb index a7011ee..de2974d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack21.ads b/gcc/ada/libgnat/s-pack21.ads index eee9f6d..be56b08 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack22.adb b/gcc/ada/libgnat/s-pack22.adb index d41ed28..0dd92d0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack22.ads b/gcc/ada/libgnat/s-pack22.ads index 79b92d4..8d0e3d7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack23.adb b/gcc/ada/libgnat/s-pack23.adb index b15950d..54cced1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack23.ads b/gcc/ada/libgnat/s-pack23.ads index ec08bd9..eaf1b3b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack24.adb b/gcc/ada/libgnat/s-pack24.adb index c2a320d..2523a86 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack24.ads b/gcc/ada/libgnat/s-pack24.ads index c26a0e6..d690cac 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack25.adb b/gcc/ada/libgnat/s-pack25.adb index 99f1bb1..6c97572f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack25.ads b/gcc/ada/libgnat/s-pack25.ads index 2b6c7e2..04ec3a9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack26.adb b/gcc/ada/libgnat/s-pack26.adb index 6c80c55..24381f3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack26.ads b/gcc/ada/libgnat/s-pack26.ads index 150e331..e0d590a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack27.adb b/gcc/ada/libgnat/s-pack27.adb index f3c51b0..720d017 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack27.ads b/gcc/ada/libgnat/s-pack27.ads index 8ce481b..320ec17 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack28.adb b/gcc/ada/libgnat/s-pack28.adb index 7a11643..fd0defb 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack28.ads b/gcc/ada/libgnat/s-pack28.ads index 763b1d0..8a4d168 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack29.adb b/gcc/ada/libgnat/s-pack29.adb index e4209a2..e5dfa33 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack29.ads b/gcc/ada/libgnat/s-pack29.ads index f977d80..40f640a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack30.adb b/gcc/ada/libgnat/s-pack30.adb index 577012f..1ce3ea9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack30.ads b/gcc/ada/libgnat/s-pack30.ads index fc5965b..5d6b7cb 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack31.adb b/gcc/ada/libgnat/s-pack31.adb index debf3db..b754b69 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack31.ads b/gcc/ada/libgnat/s-pack31.ads index 22db441..7bc763c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack33.adb b/gcc/ada/libgnat/s-pack33.adb index f2afef0..27d6e05 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack33.ads b/gcc/ada/libgnat/s-pack33.ads index 5d8cb4d..a063099 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack34.adb b/gcc/ada/libgnat/s-pack34.adb index 2f9580a..953b001 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack34.ads b/gcc/ada/libgnat/s-pack34.ads index cd5d7fa..4e87915 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack35.adb b/gcc/ada/libgnat/s-pack35.adb index 49cad6f..ba0a0e6 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack35.ads b/gcc/ada/libgnat/s-pack35.ads index 21ca7d4..eca6935 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack36.adb b/gcc/ada/libgnat/s-pack36.adb index bdb3fe3..b273b09 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack36.ads b/gcc/ada/libgnat/s-pack36.ads index 924268f..a8e9739 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack37.adb b/gcc/ada/libgnat/s-pack37.adb index 7f1ead5..5a5a1da 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack37.ads b/gcc/ada/libgnat/s-pack37.ads index 089434f..b5ade3f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack38.adb b/gcc/ada/libgnat/s-pack38.adb index f3feac3..d2bd084 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack38.ads b/gcc/ada/libgnat/s-pack38.ads index bb1c504..6a629190 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack39.adb b/gcc/ada/libgnat/s-pack39.adb index 821d954..647610c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack39.ads b/gcc/ada/libgnat/s-pack39.ads index bac16de..c97fc9e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack40.adb b/gcc/ada/libgnat/s-pack40.adb index b7a9e02..097d58c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack40.ads b/gcc/ada/libgnat/s-pack40.ads index bb367d6..4d3c43f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack41.adb b/gcc/ada/libgnat/s-pack41.adb index 28a0def..5d6ff71 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack41.ads b/gcc/ada/libgnat/s-pack41.ads index ce92fd9..8e54781 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack42.adb b/gcc/ada/libgnat/s-pack42.adb index c759f94..d059ded 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack42.ads b/gcc/ada/libgnat/s-pack42.ads index a1c58ab..1c20804 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack43.adb b/gcc/ada/libgnat/s-pack43.adb index 137ce06..3b58202 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack43.ads b/gcc/ada/libgnat/s-pack43.ads index c586e47..f7b80fc 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack44.adb b/gcc/ada/libgnat/s-pack44.adb index d8eaaac..90aee39 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack44.ads b/gcc/ada/libgnat/s-pack44.ads index e3873ee..0f2ce7e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack45.adb b/gcc/ada/libgnat/s-pack45.adb index 3739136..cfc75fb 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack45.ads b/gcc/ada/libgnat/s-pack45.ads index dfdd7a9..d95e52a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack46.adb b/gcc/ada/libgnat/s-pack46.adb index 1bae1b9..4b7dc25 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack46.ads b/gcc/ada/libgnat/s-pack46.ads index 81c00df..38f6897 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack47.adb b/gcc/ada/libgnat/s-pack47.adb index e5ab870..d6ab3fd 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack47.ads b/gcc/ada/libgnat/s-pack47.ads index 0de9bc6..6b2141d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack48.adb b/gcc/ada/libgnat/s-pack48.adb index 0ca74f5..088474c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack48.ads b/gcc/ada/libgnat/s-pack48.ads index 225789a..67ed8ba 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack49.adb b/gcc/ada/libgnat/s-pack49.adb index f475e62..c73cac5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack49.ads b/gcc/ada/libgnat/s-pack49.ads index 6ad4144..9b9db07 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack50.adb b/gcc/ada/libgnat/s-pack50.adb index 2e55724..2f5704c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack50.ads b/gcc/ada/libgnat/s-pack50.ads index bb3049a..65203a3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack51.adb b/gcc/ada/libgnat/s-pack51.adb index 9af3cb7..4c474c5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack51.ads b/gcc/ada/libgnat/s-pack51.ads index 70506d2..0b2b99e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack52.adb b/gcc/ada/libgnat/s-pack52.adb index 1d6becb..b4c313a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack52.ads b/gcc/ada/libgnat/s-pack52.ads index 40d9142..04f1289 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack53.adb b/gcc/ada/libgnat/s-pack53.adb index a2771a1..3b1b699 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack53.ads b/gcc/ada/libgnat/s-pack53.ads index 5512185..3c794d7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack54.adb b/gcc/ada/libgnat/s-pack54.adb index 06d3aeb..33eafe4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack54.ads b/gcc/ada/libgnat/s-pack54.ads index 52b29ae..046ca04 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack55.adb b/gcc/ada/libgnat/s-pack55.adb index 6e2b628..400e55c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack55.ads b/gcc/ada/libgnat/s-pack55.ads index 97115c6..5421a2e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack56.adb b/gcc/ada/libgnat/s-pack56.adb index b8ecc0b..f2d7814 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack56.ads b/gcc/ada/libgnat/s-pack56.ads index 510fc35..10539e7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack57.adb b/gcc/ada/libgnat/s-pack57.adb index 2402e8b..e151840 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack57.ads b/gcc/ada/libgnat/s-pack57.ads index 8ac91c7..a93ae11 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack58.adb b/gcc/ada/libgnat/s-pack58.adb index 75f00a1..3c9f73d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack58.ads b/gcc/ada/libgnat/s-pack58.ads index d8d6e91..2949cc3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack59.adb b/gcc/ada/libgnat/s-pack59.adb index ec001fa..b54b1ff 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack59.ads b/gcc/ada/libgnat/s-pack59.ads index ee00f65..5bdf60c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack60.adb b/gcc/ada/libgnat/s-pack60.adb index 35b93f5..b543ac5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack60.ads b/gcc/ada/libgnat/s-pack60.ads index 95e0fd2..0362a3c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack61.adb b/gcc/ada/libgnat/s-pack61.adb index 89b94ac..aa631c5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack61.ads b/gcc/ada/libgnat/s-pack61.ads index 5681500..6d0d4c7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack62.adb b/gcc/ada/libgnat/s-pack62.adb index da6932a..66dd8a1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack62.ads b/gcc/ada/libgnat/s-pack62.ads index 121c26f..826df31 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack63.adb b/gcc/ada/libgnat/s-pack63.adb index 37b6767..b4a210b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack63.ads b/gcc/ada/libgnat/s-pack63.ads index 7ca3d03..9a8e5c4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack65.adb b/gcc/ada/libgnat/s-pack65.adb index c5b7310..33e4dbd 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack65.ads b/gcc/ada/libgnat/s-pack65.ads index 8752c9c..023208d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack66.adb b/gcc/ada/libgnat/s-pack66.adb index 5e90ceb..80a7ce4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack66.ads b/gcc/ada/libgnat/s-pack66.ads index b45d317..9ae24a8 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack67.adb b/gcc/ada/libgnat/s-pack67.adb index d7c77e8..c7ec770 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack67.ads b/gcc/ada/libgnat/s-pack67.ads index f77b651..33ecc80 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack68.adb b/gcc/ada/libgnat/s-pack68.adb index 03a0361..d0180ab 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack68.ads b/gcc/ada/libgnat/s-pack68.ads index 5565b32..62eeb61 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack69.adb b/gcc/ada/libgnat/s-pack69.adb index f383029..3342385 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack69.ads b/gcc/ada/libgnat/s-pack69.ads index 76a221d..5819f20 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack70.adb b/gcc/ada/libgnat/s-pack70.adb index 7dab227..6071a50 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack70.ads b/gcc/ada/libgnat/s-pack70.ads index b978d1c..d6cfed9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack71.adb b/gcc/ada/libgnat/s-pack71.adb index f3560de..017d584 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack71.ads b/gcc/ada/libgnat/s-pack71.ads index 842a232..89147c4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack72.adb b/gcc/ada/libgnat/s-pack72.adb index 14fbb15..1d60757 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack72.ads b/gcc/ada/libgnat/s-pack72.ads index b1add35..a5f47e3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack73.adb b/gcc/ada/libgnat/s-pack73.adb index f4853cb..46e9c63 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack73.ads b/gcc/ada/libgnat/s-pack73.ads index 5f103de..a5fb008 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack74.adb b/gcc/ada/libgnat/s-pack74.adb index 984b4c0..4973866 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack74.ads b/gcc/ada/libgnat/s-pack74.ads index 5dde51b..55c394f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack75.adb b/gcc/ada/libgnat/s-pack75.adb index 6c7c14f..e6b6467 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack75.ads b/gcc/ada/libgnat/s-pack75.ads index 551833a..97249ec 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack76.adb b/gcc/ada/libgnat/s-pack76.adb index 6a7c5fa..b94586a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack76.ads b/gcc/ada/libgnat/s-pack76.ads index 6a600c9..4cde3f3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack77.adb b/gcc/ada/libgnat/s-pack77.adb index f29cdf1..6b660ea 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack77.ads b/gcc/ada/libgnat/s-pack77.ads index 9308a78..e5a1277 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack78.adb b/gcc/ada/libgnat/s-pack78.adb index e321c1e..03f6fbd 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack78.ads b/gcc/ada/libgnat/s-pack78.ads index 54fdd95..564f5c8 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack79.adb b/gcc/ada/libgnat/s-pack79.adb index 75fb14c..d2eecb2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack79.ads b/gcc/ada/libgnat/s-pack79.ads index 337be86..909e992 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack80.adb b/gcc/ada/libgnat/s-pack80.adb index d66588b..f5d98d0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack80.ads b/gcc/ada/libgnat/s-pack80.ads index c1f0de4..5021045 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack81.adb b/gcc/ada/libgnat/s-pack81.adb index 5157882..8c564d8 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack81.ads b/gcc/ada/libgnat/s-pack81.ads index 9f17734..03009c3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack82.adb b/gcc/ada/libgnat/s-pack82.adb index 7e409dd..21180b7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack82.ads b/gcc/ada/libgnat/s-pack82.ads index 96a75bf..445035d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack83.adb b/gcc/ada/libgnat/s-pack83.adb index 5fe2441..fdea99e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack83.ads b/gcc/ada/libgnat/s-pack83.ads index 75ccd5b..dfb4887 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack84.adb b/gcc/ada/libgnat/s-pack84.adb index 29b6454..c72b08e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack84.ads b/gcc/ada/libgnat/s-pack84.ads index c3055f9..77c9c95 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack85.adb b/gcc/ada/libgnat/s-pack85.adb index 6edf9d1..be9a18c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack85.ads b/gcc/ada/libgnat/s-pack85.ads index 71bb986..5f516d0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack86.adb b/gcc/ada/libgnat/s-pack86.adb index 39e8bca..1b64c7c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack86.ads b/gcc/ada/libgnat/s-pack86.ads index 0dee449..def41d3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack87.adb b/gcc/ada/libgnat/s-pack87.adb index 8bfc7b4..4cc3b61f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack87.ads b/gcc/ada/libgnat/s-pack87.ads index ad80713..6c0b83c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack88.adb b/gcc/ada/libgnat/s-pack88.adb index 638581a..a51bd48 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack88.ads b/gcc/ada/libgnat/s-pack88.ads index bd38bd7..f03323b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack89.adb b/gcc/ada/libgnat/s-pack89.adb index eff29c0..d2bc53d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack89.ads b/gcc/ada/libgnat/s-pack89.ads index 5ab8102..bdc668b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack90.adb b/gcc/ada/libgnat/s-pack90.adb index bed4845..19ec737 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack90.ads b/gcc/ada/libgnat/s-pack90.ads index 2960293..bbabf19 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack91.adb b/gcc/ada/libgnat/s-pack91.adb index 25c9f14..fe20def 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack91.ads b/gcc/ada/libgnat/s-pack91.ads index 065c1b5..b35d96c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack92.adb b/gcc/ada/libgnat/s-pack92.adb index b9ea0a6..147d628 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack92.ads b/gcc/ada/libgnat/s-pack92.ads index 5184bc6..22424db 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack93.adb b/gcc/ada/libgnat/s-pack93.adb index 1fe486c..8db201a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack93.ads b/gcc/ada/libgnat/s-pack93.ads index 618ab64..eb4359e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack94.adb b/gcc/ada/libgnat/s-pack94.adb index 5a65908..53c9f89 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack94.ads b/gcc/ada/libgnat/s-pack94.ads index 692a4dc..01efbca 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack95.adb b/gcc/ada/libgnat/s-pack95.adb index f8d6be6..1179506 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack95.ads b/gcc/ada/libgnat/s-pack95.ads index 288a787..38d54b8 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack96.adb b/gcc/ada/libgnat/s-pack96.adb index 1371ee1..617a91f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack96.ads b/gcc/ada/libgnat/s-pack96.ads index 355f00a..d19b65b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack97.adb b/gcc/ada/libgnat/s-pack97.adb index 000f8ed..b7ddb81 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack97.ads b/gcc/ada/libgnat/s-pack97.ads index 4c8a936..c04ecbc 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack98.adb b/gcc/ada/libgnat/s-pack98.adb index 1ac4c66..2c3def5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack98.ads b/gcc/ada/libgnat/s-pack98.ads index 239eca1..23e08ed 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack99.adb b/gcc/ada/libgnat/s-pack99.adb index a8bde88..26485cf 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pack99.ads b/gcc/ada/libgnat/s-pack99.ads index fa805c4..4f49623 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-parame.adb b/gcc/ada/libgnat/s-parame.adb index c555a82..9001626 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-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- -- diff --git a/gcc/ada/libgnat/s-parame.ads b/gcc/ada/libgnat/s-parame.ads index f9bc3d0..0f76a65 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -100,6 +100,13 @@ package System.Parameters is -- Indicates if secondary stacks can grow and shrink at run-time. If False, -- the size of a secondary stack is fixed at the point of its creation. + ------------------------------------ + -- Characteristics of time_t type -- + ------------------------------------ + + time_t_bits : constant := Long_Integer'Size; + -- Number of bits in type time_t + ---------------------------------------------- -- Characteristics of types in Interfaces.C -- ---------------------------------------------- diff --git a/gcc/ada/libgnat/s-parame__ae653.ads b/gcc/ada/libgnat/s-parame__ae653.ads index 3e73f5e..f838b41 100644 --- a/gcc/ada/libgnat/s-parame__ae653.ads +++ b/gcc/ada/libgnat/s-parame__ae653.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -100,6 +100,13 @@ package System.Parameters is -- Indicates if secondary stacks can grow and shrink at run-time. If False, -- the size of a secondary stack is fixed at the point of its creation. + ------------------------------------ + -- Characteristics of time_t type -- + ------------------------------------ + + time_t_bits : constant := Long_Integer'Size; + -- Number of bits in type time_t + ---------------------------------------------- -- Characteristics of types in Interfaces.C -- ---------------------------------------------- diff --git a/gcc/ada/libgnat/s-parame__hpux.ads b/gcc/ada/libgnat/s-parame__hpux.ads index e09313f..d6d4e10 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -98,6 +98,13 @@ package System.Parameters is -- Indicates if secondary stacks can grow and shrink at run-time. If False, -- the size of a secondary stack is fixed at the point of its creation. + ------------------------------------ + -- Characteristics of time_t type -- + ------------------------------------ + + time_t_bits : constant := Long_Integer'Size; + -- Number of bits in type time_t + ---------------------------------------------- -- Characteristics of Types in Interfaces.C -- ---------------------------------------------- diff --git a/gcc/ada/libgnat/s-parame__posix2008.ads b/gcc/ada/libgnat/s-parame__posix2008.ads new file mode 100644 index 0000000..af299ec --- /dev/null +++ b/gcc/ada/libgnat/s-parame__posix2008.ads @@ -0,0 +1,193 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- S Y S T E M . P A R A M E T E R 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 is the Posix 2008 version for 64 bit time_t. + +-- This package defines some system dependent parameters for GNAT. These +-- are values that are referenced by the runtime library and are therefore +-- relevant to the target machine. + +-- The parameters whose value is defined in the spec are not generally +-- expected to be changed. If they are changed, it will be necessary to +-- recompile the run-time library. + +-- The parameters which are defined by functions can be changed by modifying +-- the body of System.Parameters in file s-parame.adb. A change to this body +-- requires only rebinding and relinking of the application. + +-- 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; + + --------------------------------------- + -- Task And Stack Allocation Control -- + --------------------------------------- + + type Size_Type is range + -(2 ** (Integer'(Standard'Address_Size) - 1)) .. + +(2 ** (Integer'(Standard'Address_Size) - 1)) - 1; + -- Type used to provide task stack sizes to the runtime. Sized to permit + -- stack sizes of up to half the total addressable memory space. This may + -- seem excessively large (even for 32-bit systems), however there are many + -- instances of users requiring large stack sizes (for example string + -- processing). + + Unspecified_Size : constant Size_Type := Size_Type'First; + -- Value used to indicate that no size type is set + + function Default_Stack_Size return Size_Type; + -- Default task stack size used if none is specified + + function Minimum_Stack_Size return Size_Type; + -- Minimum task stack size permitted + + function Adjust_Storage_Size (Size : Size_Type) return Size_Type; + -- Given the storage size stored in the TCB, return the Storage_Size + -- value required by the RM for the Storage_Size attribute. The + -- required adjustment is as follows: + -- + -- when Size = Unspecified_Size, return Default_Stack_Size + -- when Size < Minimum_Stack_Size, return Minimum_Stack_Size + -- otherwise return given Size + + Default_Env_Stack_Size : constant Size_Type := 8_192_000; + -- Assumed size of the environment task, if no other information is + -- available. This value is used when stack checking is enabled and + -- no GNAT_STACK_LIMIT environment variable is set. + + Stack_Grows_Down : constant Boolean := True; + -- This constant indicates whether the stack grows up (False) or + -- down (True) in memory as functions are called. It is used for + -- proper implementation of the stack overflow check. + + Runtime_Default_Sec_Stack_Size : constant Size_Type := 10 * 1024; + -- The run-time chosen default size for secondary stacks that may be + -- overridden by the user with the use of binder -D switch. + + Sec_Stack_Dynamic : constant Boolean := True; + -- Indicates if secondary stacks can grow and shrink at run-time. If False, + -- the size of a secondary stack is fixed at the point of its creation. + + ------------------------------------ + -- Characteristics of time_t type -- + ------------------------------------ + + time_t_bits : constant := Long_Long_Integer'Size; + -- Number of bits in type time_t. Use for targets that are Posix 2008 + -- compliant (fixes the year 2038 time_t overflow). + + ---------------------------------------------- + -- Characteristics of types in Interfaces.C -- + ---------------------------------------------- + + long_bits : constant := Long_Integer'Size; + -- Number of bits in type long and unsigned_long. The normal convention + -- is that this is the same as type Long_Integer, but this may not be true + -- of all targets. + + ptr_bits : constant := Standard'Address_Size; + subtype C_Address is System.Address; + -- Number of bits in Interfaces.C pointers, normally a standard address + + C_Malloc_Linkname : constant String := "__gnat_malloc"; + -- Name of runtime function used to allocate such a pointer + + ---------------------------------------------- + -- Behavior of Pragma Finalize_Storage_Only -- + ---------------------------------------------- + + -- Garbage_Collected is a Boolean constant whose value indicates the + -- effect of the pragma Finalize_Storage_Entry on a controlled type. + + -- Garbage_Collected = False + + -- The system releases all storage on program termination only, + -- but not other garbage collection occurs, so finalization calls + -- are omitted only for outer level objects can be omitted if + -- pragma Finalize_Storage_Only is used. + + -- Garbage_Collected = True + + -- The system provides full garbage collection, so it is never + -- necessary to release storage for controlled objects for which + -- a pragma Finalize_Storage_Only is used. + + Garbage_Collected : constant Boolean := False; + -- The storage mode for this system (release on program exit) + + --------------------- + -- Tasking Profile -- + --------------------- + + -- In the following sections, constant parameters are defined to + -- allow some optimizations and fine tuning within the tasking run time + -- based on restrictions on the tasking features. + + ------------------- + -- Task Abortion -- + ------------------- + + No_Abort : constant Boolean := False; + -- This constant indicates whether abort statements and asynchronous + -- transfer of control (ATC) are disallowed. If set to True, it is + -- assumed that neither construct is used, and the run time does not + -- need to defer/undefer abort and check for pending actions at + -- completion points. A value of True for No_Abort corresponds to: + -- pragma Restrictions (No_Abort_Statements); + -- pragma Restrictions (Max_Asynchronous_Select_Nesting => 0); + + --------------------- + -- Task Attributes -- + --------------------- + + Max_Attribute_Count : constant := 32; + -- Number of task attributes stored in the task control block + + ----------------------- + -- Task Image Length -- + ----------------------- + + Max_Task_Image_Length : constant := 256; + -- This constant specifies the maximum length of a task's image + + ------------------------------ + -- Exception Message Length -- + ------------------------------ + + Default_Exception_Msg_Max_Length : constant := 200; + -- This constant specifies the default number of characters to allow + -- in an exception message (200 is minimum required by RM 11.4.1(18)). + +end System.Parameters; diff --git a/gcc/ada/libgnat/s-parame__rtems.adb b/gcc/ada/libgnat/s-parame__rtems.adb index f350343..1a6d577 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1997-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- -- diff --git a/gcc/ada/libgnat/s-parame__vxworks.adb b/gcc/ada/libgnat/s-parame__vxworks.adb index 7d0a206..5970eb0 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-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- -- diff --git a/gcc/ada/libgnat/s-parame__vxworks.ads b/gcc/ada/libgnat/s-parame__vxworks.ads index c836444..11b408b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -100,6 +100,21 @@ package System.Parameters is -- Indicates if secondary stacks can grow and shrink at run-time. If False, -- the size of a secondary stack is fixed at the point of its creation. + ------------------------------------ + -- Characteristics of time_t type -- + ------------------------------------ + + -- IMPORTANT NOTE: + -- Select the appropriate time_t_bits for the VSB in use, then rebuild + -- the runtime using instructions in adainclude/libada.gpr. + + time_t_bits : constant := Long_Integer'Size; + -- Number of bits in type time_t for SR0650 and before and SR0660 with + -- non-default configuration. + + -- time_t_bits : constant := Long_Long_Integer'Size; + -- Number of bits in type time_t for SR0660 with default configuration. + ---------------------------------------------- -- Characteristics of types in Interfaces.C -- ---------------------------------------------- diff --git a/gcc/ada/libgnat/s-parint.adb b/gcc/ada/libgnat/s-parint.adb index f984a49..24e8d1b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2021, 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 b037571..f311a09 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2021, 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 new file mode 100644 index 0000000..218c1cb --- /dev/null +++ b/gcc/ada/libgnat/s-pehage.adb @@ -0,0 +1,2235 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- S Y S T E M . P E R F E C T _ H A S H _ G E N E R A T O R S -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 2002-2021, 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- -- +-- 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. -- +-- -- +------------------------------------------------------------------------------ + +with GNAT.Heap_Sort_G; +with GNAT.Table; + +with System.OS_Lib; use System.OS_Lib; + +package body System.Perfect_Hash_Generators is + + -- We are using the algorithm of J. Czech as described in Zbigniew J. + -- Czech, George Havas, and Bohdan S. Majewski ``An Optimal Algorithm for + -- Generating Minimal Perfect Hash Functions'', Information Processing + -- Letters, 43(1992) pp.257-264, Oct.1992 + + -- This minimal perfect hash function generator is based on random graphs + -- and produces a hash function of the form: + + -- h (w) = (g (f1 (w)) + g (f2 (w))) mod m + + -- where f1 and f2 are functions that map strings into integers, and g is + -- a function that maps integers into [0, m-1]. h can be order preserving. + -- For instance, let W = {w_0, ..., w_i, ..., w_m-1}, h can be defined + -- such that h (w_i) = i. + + -- This algorithm defines two possible constructions of f1 and f2. Method + -- b) stores the hash function in less memory space at the expense of + -- greater CPU time. + + -- a) fk (w) = sum (for i in 1 .. length (w)) (Tk (i, w (i))) mod n + + -- size (Tk) = max (for w in W) (length (w)) * size (used char set) + + -- b) fk (w) = sum (for i in 1 .. length (w)) (Tk (i) * w (i)) mod n + + -- size (Tk) = max (for w in W) (length (w)) but the table lookups are + -- replaced by multiplications. + + -- where Tk values are randomly generated. n is defined later on but the + -- algorithm recommends to use a value a little bit greater than 2m. Note + -- that for large values of m, the main memory space requirements comes + -- from the memory space for storing function g (>= 2m entries). + + -- Random graphs are frequently used to solve difficult problems that do + -- not have polynomial solutions. This algorithm is based on a weighted + -- undirected graph. It comprises two steps: mapping and assignment. + + -- In the mapping step, a graph G = (V, E) is constructed, where = {0, 1, + -- ..., n-1} and E = {(for w in W) (f1 (w), f2 (w))}. In order for the + -- assignment step to be successful, G has to be acyclic. To have a high + -- probability of generating an acyclic graph, n >= 2m. If it is not + -- acyclic, Tk have to be regenerated. + + -- In the assignment step, the algorithm builds function g. As G is + -- acyclic, there is a vertex v1 with only one neighbor v2. Let w_i be + -- the word such that v1 = f1 (w_i) and v2 = f2 (w_i). Let g (v1) = 0 by + -- construction and g (v2) = (i - g (v1)) mod n (or h (i) - g (v1) mod n). + -- If word w_j is such that v2 = f1 (w_j) and v3 = f2 (w_j), g (v3) = (j - + -- g (v2)) mod (or to be general, (h (j) - g (v2)) mod n). If w_i has no + -- neighbor, then another vertex is selected. The algorithm traverses G to + -- assign values to all the vertices. It cannot assign a value to an + -- already assigned vertex as G is acyclic. + + subtype Word_Id is Integer; + subtype Key_Id is Integer; + subtype Vertex_Id is Integer; + subtype Edge_Id is Integer; + subtype Table_Id is Integer; + + No_Vertex : constant Vertex_Id := -1; + No_Edge : constant Edge_Id := -1; + No_Table : constant Table_Id := -1; + + type Word_Type is new String_Access; + procedure Free_Word (W : in out Word_Type) renames Free; + function New_Word (S : String) return Word_Type; + + procedure Resize_Word (W : in out Word_Type; Len : Natural); + -- Resize string W to have a length Len + + type Key_Type is record + Edge : Edge_Id; + end record; + -- A key corresponds to an edge in the algorithm graph + + type Vertex_Type is record + First : Edge_Id; + Last : Edge_Id; + end record; + -- A vertex can be involved in several edges. First and Last are the bounds + -- of an array of edges stored in a global edge table. + + type Edge_Type is record + X : Vertex_Id; + Y : Vertex_Id; + Key : Key_Id; + end record; + -- An edge is a peer of vertices. In the algorithm, a key is associated to + -- an edge. + + package WT is new GNAT.Table (Word_Type, Word_Id, 0, 32, 32); + package IT is new GNAT.Table (Integer, Integer, 0, 32, 32); + -- The two main tables. WT is used to store the words in their initial + -- version and in their reduced version (that is words reduced to their + -- significant characters). As an instance of GNAT.Table, WT does not + -- initialize string pointers to null. This initialization has to be done + -- manually when the table is allocated. IT is used to store several + -- tables of components containing only integers. + + function Image (Int : Integer; W : Natural := 0) return String; + function Image (Str : String; W : Natural := 0) return String; + -- Return a string which includes string Str or integer Int preceded by + -- leading spaces if required by width W. + + function Trim_Trailing_Nuls (Str : String) return String; + -- Return Str with trailing NUL characters removed + + Output : File_Descriptor renames System.OS_Lib.Standout; + -- Shortcuts + + EOL : constant Character := ASCII.LF; + + Max : constant := 78; + Last : Natural := 0; + Line : String (1 .. Max); + -- Use this line to provide buffered IO + + procedure Add (C : Character); + procedure Add (S : String); + -- Add a character or a string in Line and update Last + + procedure Put + (F : File_Descriptor; + S : String; + F1 : Natural; + L1 : Natural; + C1 : Natural; + F2 : Natural; + L2 : Natural; + C2 : Natural); + -- Write string S into file F as a element of an array of one or two + -- dimensions. Fk (resp. Lk and Ck) indicates the first (resp last and + -- current) index in the k-th dimension. If F1 = L1 the array is considered + -- as a one dimension array. This dimension is described by F2 and L2. This + -- routine takes care of all the parenthesis, spaces and commas needed to + -- format correctly the array. Moreover, the array is well indented and is + -- wrapped to fit in a 80 col line. When the line is full, the routine + -- writes it into file F. When the array is completed, the routine adds + -- semi-colon and writes the line into file F. + + procedure New_Line (File : File_Descriptor); + -- Simulate Ada.Text_IO.New_Line with GNAT.OS_Lib + + procedure Put (File : File_Descriptor; Str : String); + -- Simulate Ada.Text_IO.Put with GNAT.OS_Lib + + procedure Put_Used_Char_Set (File : File_Descriptor; Title : String); + -- Output a title and a used character set + + procedure Put_Int_Vector + (File : File_Descriptor; + Title : String; + Vector : Integer; + Length : Natural); + -- Output a title and a vector + + procedure Put_Int_Matrix + (File : File_Descriptor; + Title : String; + Table : Table_Id; + Len_1 : Natural; + Len_2 : Natural); + -- Output a title and a matrix. When the matrix has only one non-empty + -- dimension (Len_2 = 0), output a vector. + + procedure Put_Edges (File : File_Descriptor; Title : String); + -- Output a title and an edge table + + procedure Put_Initial_Keys (File : File_Descriptor; Title : String); + -- Output a title and a key table + + procedure Put_Reduced_Keys (File : File_Descriptor; Title : String); + -- Output a title and a key table + + procedure Put_Vertex_Table (File : File_Descriptor; Title : String); + -- Output a title and a vertex table + + ---------------------------------- + -- Character Position Selection -- + ---------------------------------- + + -- We reduce the maximum key size by selecting representative positions + -- in these keys. We build a matrix with one word per line. We fill the + -- remaining space of a line with ASCII.NUL. The heuristic selects the + -- position that induces the minimum number of collisions. If there are + -- collisions, select another position on the reduced key set responsible + -- of the collisions. Apply the heuristic until there is no more collision. + + procedure Apply_Position_Selection; + -- Apply Position selection and build the reduced key table + + procedure Parse_Position_Selection (Argument : String); + -- Parse Argument and compute the position set. Argument is list of + -- substrings separated by commas. Each substring represents a position + -- or a range of positions (like x-y). + + procedure Select_Character_Set; + -- Define an optimized used character set like Character'Pos in order not + -- to allocate tables of 256 entries. + + procedure Select_Char_Position; + -- Find a min char position set in order to reduce the max key length. The + -- heuristic selects the position that induces the minimum number of + -- collisions. If there are collisions, select another position on the + -- reduced key set responsible of the collisions. Apply the heuristic until + -- there is no collision. + + ----------------------------- + -- Random Graph Generation -- + ----------------------------- + + procedure Random (Seed : in out Natural); + -- Simulate Ada.Discrete_Numerics.Random + + procedure Generate_Mapping_Table + (Tab : Table_Id; + L1 : Natural; + L2 : Natural; + Seed : in out Natural); + -- Random generation of the tables below. T is already allocated + + procedure Generate_Mapping_Tables + (Opt : Optimization; + Seed : in out Natural); + -- Generate the mapping tables T1 and T2. They are used to define fk (w) = + -- sum (for i in 1 .. length (w)) (Tk (i, w (i))) mod n. Keys, NK and Chars + -- are used to compute the matrix size. + + --------------------------- + -- Algorithm Computation -- + --------------------------- + + procedure Compute_Edges_And_Vertices (Opt : Optimization); + -- Compute the edge and vertex tables. These are empty when a self loop is + -- detected (f1 (w) = f2 (w)). The edge table is sorted by X value and then + -- Y value. Keys is the key table and NK the number of keys. Chars is the + -- set of characters really used in Keys. NV is the number of vertices + -- recommended by the algorithm. T1 and T2 are the mapping tables needed to + -- compute f1 (w) and f2 (w). + + function Acyclic return Boolean; + -- Return True when the graph is acyclic. Vertices is the current vertex + -- table and Edges the current edge table. + + procedure Assign_Values_To_Vertices; + -- Execute the assignment step of the algorithm. Keys is the current key + -- table. Vertices and Edges represent the random graph. G is the result of + -- the assignment step such that: + -- h (w) = (g (f1 (w)) + g (f2 (w))) mod m + + function Sum + (Word : Word_Type; + Table : Table_Id; + Opt : Optimization) return Natural; + -- For an optimization of CPU_Time return + -- fk (w) = sum (for i in 1 .. length (w)) (Tk (i, w (i))) mod n + -- For an optimization of Memory_Space return + -- fk (w) = sum (for i in 1 .. length (w)) (Tk (i) * w (i)) mod n + -- Here NV = n + + ------------------------------- + -- Internal Table Management -- + ------------------------------- + + function Allocate (N : Natural; S : Natural := 1) return Table_Id; + -- Allocate N * S ints from IT table + + ---------- + -- Keys -- + ---------- + + Keys : Table_Id := No_Table; + NK : Natural := 0; + -- NK : Number of Keys + + function Initial (K : Key_Id) return Word_Id; + pragma Inline (Initial); + + function Reduced (K : Key_Id) return Word_Id; + pragma Inline (Reduced); + + function Get_Key (N : Key_Id) return Key_Type; + procedure Set_Key (N : Key_Id; Item : Key_Type); + -- Get or Set Nth element of Keys table + + ------------------ + -- Char_Pos_Set -- + ------------------ + + Char_Pos_Set : Table_Id := No_Table; + Char_Pos_Set_Len : Natural; + -- Character Selected Position Set + + function Get_Char_Pos (P : Natural) return Natural; + procedure Set_Char_Pos (P : Natural; Item : Natural); + -- Get or Set the string position of the Pth selected character + + ------------------- + -- Used_Char_Set -- + ------------------- + + Used_Char_Set : Table_Id := No_Table; + Used_Char_Set_Len : Natural; + -- Used Character Set : Define a new character mapping. When all the + -- characters are not present in the keys, in order to reduce the size + -- of some tables, we redefine the character mapping. + + function Get_Used_Char (C : Character) return Natural; + procedure Set_Used_Char (C : Character; Item : Natural); + + ------------ + -- Tables -- + ------------ + + T1 : Table_Id := No_Table; + T2 : Table_Id := No_Table; + T1_Len : Natural; + T2_Len : Natural; + -- T1 : Values table to compute F1 + -- T2 : Values table to compute F2 + + function Get_Table (T : Integer; X, Y : Natural) return Natural; + procedure Set_Table (T : Integer; X, Y : Natural; Item : Natural); + + ----------- + -- Graph -- + ----------- + + G : Table_Id := No_Table; + G_Len : Natural; + -- Values table to compute G + + NT : Natural; + -- Number of tries running the algorithm before raising an error + + function Get_Graph (N : Natural) return Integer; + procedure Set_Graph (N : Natural; Item : Integer); + -- Get or Set Nth element of graph + + ----------- + -- Edges -- + ----------- + + Edge_Size : constant := 3; + Edges : Table_Id := No_Table; + Edges_Len : Natural; + -- Edges : Edge table of the random graph G + + function Get_Edges (F : Natural) return Edge_Type; + procedure Set_Edges (F : Natural; Item : Edge_Type); + + -------------- + -- Vertices -- + -------------- + + Vertex_Size : constant := 2; + + Vertices : Table_Id := No_Table; + -- Vertex table of the random graph G + + NV : Natural; + -- Number of Vertices + + function Get_Vertices (F : Natural) return Vertex_Type; + procedure Set_Vertices (F : Natural; Item : Vertex_Type); + -- Comments needed ??? + + Opt : Optimization; + -- Optimization mode (memory vs CPU) + + Max_Key_Len : Natural := 0; + Min_Key_Len : Natural := 0; + -- Maximum and minimum of all the word length + + S : Natural; + -- Seed + + function Type_Size (L : Natural) return Natural; + -- Given the last L of an unsigned integer type T, return its size + + ------------- + -- Acyclic -- + ------------- + + function Acyclic return Boolean is + Marks : array (0 .. NV - 1) of Vertex_Id := (others => No_Vertex); + + function Traverse (Edge : Edge_Id; Mark : Vertex_Id) return Boolean; + -- Propagate Mark from X to Y. X is already marked. Mark Y and propagate + -- it to the edges of Y except the one representing the same key. Return + -- False when Y is marked with Mark. + + -------------- + -- Traverse -- + -------------- + + function Traverse (Edge : Edge_Id; Mark : Vertex_Id) return Boolean is + E : constant Edge_Type := Get_Edges (Edge); + K : constant Key_Id := E.Key; + Y : constant Vertex_Id := E.Y; + M : constant Vertex_Id := Marks (E.Y); + V : Vertex_Type; + + begin + if M = Mark then + return False; + + elsif M = No_Vertex then + Marks (Y) := Mark; + V := Get_Vertices (Y); + + for J in V.First .. V.Last loop + + -- Do not propagate to the edge representing the same key + + if Get_Edges (J).Key /= K + and then not Traverse (J, Mark) + then + return False; + end if; + end loop; + end if; + + return True; + end Traverse; + + Edge : Edge_Type; + + -- Start of processing for Acyclic + + begin + -- Edges valid range is + + for J in 1 .. Edges_Len - 1 loop + + Edge := Get_Edges (J); + + -- Mark X of E when it has not been already done + + if Marks (Edge.X) = No_Vertex then + Marks (Edge.X) := Edge.X; + end if; + + -- Traverse E when this has not already been done + + if Marks (Edge.Y) = No_Vertex + and then not Traverse (J, Edge.X) + then + return False; + end if; + end loop; + + return True; + end Acyclic; + + --------- + -- Add -- + --------- + + procedure Add (C : Character) is + pragma Assert (C /= ASCII.NUL); + begin + Line (Last + 1) := C; + Last := Last + 1; + end Add; + + --------- + -- Add -- + --------- + + procedure Add (S : String) is + Len : constant Natural := S'Length; + begin + for J in S'Range loop + pragma Assert (S (J) /= ASCII.NUL); + null; + end loop; + + Line (Last + 1 .. Last + Len) := S; + Last := Last + Len; + end Add; + + -------------- + -- Allocate -- + -------------- + + function Allocate (N : Natural; S : Natural := 1) return Table_Id is + L : constant Integer := IT.Last; + begin + IT.Set_Last (L + N * S); + + -- Initialize, so debugging printouts don't trip over uninitialized + -- components. + + for J in L + 1 .. IT.Last loop + IT.Table (J) := -1; + end loop; + + return L + 1; + end Allocate; + + ------------------------------ + -- Apply_Position_Selection -- + ------------------------------ + + procedure Apply_Position_Selection is + begin + for J in 0 .. NK - 1 loop + declare + IW : constant String := WT.Table (Initial (J)).all; + RW : String (1 .. IW'Length) := (others => ASCII.NUL); + N : Natural := IW'First - 1; + + begin + -- Select the characters of Word included in the position + -- selection. + + for C in 0 .. Char_Pos_Set_Len - 1 loop + exit when IW (Get_Char_Pos (C)) = ASCII.NUL; + N := N + 1; + RW (N) := IW (Get_Char_Pos (C)); + end loop; + + -- Build the new table with the reduced word. Be careful + -- to deallocate the old version to avoid memory leaks. + + Free_Word (WT.Table (Reduced (J))); + WT.Table (Reduced (J)) := New_Word (RW); + Set_Key (J, (Edge => No_Edge)); + end; + end loop; + end Apply_Position_Selection; + + ------------------------------- + -- Assign_Values_To_Vertices -- + ------------------------------- + + procedure Assign_Values_To_Vertices is + X : Vertex_Id; + + procedure Assign (X : Vertex_Id); + -- Execute assignment on X's neighbors except the vertex that we are + -- coming from which is already assigned. + + ------------ + -- Assign -- + ------------ + + procedure Assign (X : Vertex_Id) is + E : Edge_Type; + V : constant Vertex_Type := Get_Vertices (X); + + begin + for J in V.First .. V.Last loop + E := Get_Edges (J); + + if Get_Graph (E.Y) = -1 then + pragma Assert (NK /= 0); + Set_Graph (E.Y, (E.Key - Get_Graph (X)) mod NK); + Assign (E.Y); + end if; + end loop; + end Assign; + + -- Start of processing for Assign_Values_To_Vertices + + begin + -- Value -1 denotes an uninitialized value as it is supposed to + -- be in the range 0 .. NK. + + if G = No_Table then + G_Len := NV; + G := Allocate (G_Len, 1); + end if; + + for J in 0 .. G_Len - 1 loop + Set_Graph (J, -1); + end loop; + + for K in 0 .. NK - 1 loop + X := Get_Edges (Get_Key (K).Edge).X; + + if Get_Graph (X) = -1 then + Set_Graph (X, 0); + Assign (X); + end if; + end loop; + + for J in 0 .. G_Len - 1 loop + if Get_Graph (J) = -1 then + Set_Graph (J, 0); + end if; + end loop; + + if Verbose then + Put_Int_Vector (Output, "Assign Values To Vertices", G, G_Len); + end if; + end Assign_Values_To_Vertices; + + ------------- + -- Compute -- + ------------- + + procedure Compute (Position : String) is + Success : Boolean := False; + + begin + if NK = 0 then + raise Program_Error with "keywords set cannot be empty"; + end if; + + if Verbose then + Put_Initial_Keys (Output, "Initial Key Table"); + end if; + + if Position'Length /= 0 then + Parse_Position_Selection (Position); + else + Select_Char_Position; + end if; + + if Verbose then + Put_Int_Vector + (Output, "Char Position Set", Char_Pos_Set, Char_Pos_Set_Len); + end if; + + Apply_Position_Selection; + + if Verbose then + Put_Reduced_Keys (Output, "Reduced Keys Table"); + end if; + + Select_Character_Set; + + if Verbose then + Put_Used_Char_Set (Output, "Character Position Table"); + end if; + + -- Perform Czech's algorithm + + for J in 1 .. NT loop + Generate_Mapping_Tables (Opt, S); + Compute_Edges_And_Vertices (Opt); + + -- When graph is not empty (no self-loop from previous operation) and + -- not acyclic. + + if 0 < Edges_Len and then Acyclic then + Success := True; + exit; + end if; + end loop; + + if not Success then + raise Too_Many_Tries; + end if; + + Assign_Values_To_Vertices; + end Compute; + + -------------------------------- + -- Compute_Edges_And_Vertices -- + -------------------------------- + + procedure Compute_Edges_And_Vertices (Opt : Optimization) is + X : Natural; + Y : Natural; + Key : Key_Type; + Edge : Edge_Type; + Vertex : Vertex_Type; + Not_Acyclic : Boolean := False; + + procedure Move (From : Natural; To : Natural); + function Lt (L, R : Natural) return Boolean; + -- Subprograms needed for GNAT.Heap_Sort_G + + -------- + -- Lt -- + -------- + + function Lt (L, R : Natural) return Boolean is + EL : constant Edge_Type := Get_Edges (L); + ER : constant Edge_Type := Get_Edges (R); + begin + return EL.X < ER.X or else (EL.X = ER.X and then EL.Y < ER.Y); + end Lt; + + ---------- + -- Move -- + ---------- + + procedure Move (From : Natural; To : Natural) is + begin + Set_Edges (To, Get_Edges (From)); + end Move; + + package Sorting is new GNAT.Heap_Sort_G (Move, Lt); + + -- Start of processing for Compute_Edges_And_Vertices + + begin + -- We store edges from 1 to 2 * NK and leave zero alone in order to use + -- GNAT.Heap_Sort_G. + + Edges_Len := 2 * NK + 1; + + if Edges = No_Table then + Edges := Allocate (Edges_Len, Edge_Size); + end if; + + if Vertices = No_Table then + Vertices := Allocate (NV, Vertex_Size); + end if; + + for J in 0 .. NV - 1 loop + Set_Vertices (J, (No_Vertex, No_Vertex - 1)); + end loop; + + -- For each w, X = f1 (w) and Y = f2 (w) + + for J in 0 .. NK - 1 loop + Key := Get_Key (J); + Key.Edge := No_Edge; + Set_Key (J, Key); + + X := Sum (WT.Table (Reduced (J)), T1, Opt); + Y := Sum (WT.Table (Reduced (J)), T2, Opt); + + -- Discard T1 and T2 as soon as we discover a self loop + + if X = Y then + Not_Acyclic := True; + exit; + end if; + + -- We store (X, Y) and (Y, X) to ease assignment step + + Set_Edges (2 * J + 1, (X, Y, J)); + Set_Edges (2 * J + 2, (Y, X, J)); + end loop; + + -- Return an empty graph when self loop detected + + if Not_Acyclic then + Edges_Len := 0; + + else + if Verbose then + Put_Edges (Output, "Unsorted Edge Table"); + Put_Int_Matrix (Output, "Function Table 1", T1, + T1_Len, T2_Len); + Put_Int_Matrix (Output, "Function Table 2", T2, + T1_Len, T2_Len); + end if; + + -- Enforce consistency between edges and keys. Construct Vertices and + -- compute the list of neighbors of a vertex First .. Last as Edges + -- is sorted by X and then Y. To compute the neighbor list, sort the + -- edges. + + Sorting.Sort (Edges_Len - 1); + + if Verbose then + Put_Edges (Output, "Sorted Edge Table"); + Put_Int_Matrix (Output, "Function Table 1", T1, + T1_Len, T2_Len); + Put_Int_Matrix (Output, "Function Table 2", T2, + T1_Len, T2_Len); + end if; + + -- Edges valid range is 1 .. 2 * NK + + for E in 1 .. Edges_Len - 1 loop + Edge := Get_Edges (E); + Key := Get_Key (Edge.Key); + + if Key.Edge = No_Edge then + Key.Edge := E; + Set_Key (Edge.Key, Key); + end if; + + Vertex := Get_Vertices (Edge.X); + + if Vertex.First = No_Edge then + Vertex.First := E; + end if; + + Vertex.Last := E; + Set_Vertices (Edge.X, Vertex); + end loop; + + if Verbose then + Put_Reduced_Keys (Output, "Key Table"); + Put_Edges (Output, "Edge Table"); + Put_Vertex_Table (Output, "Vertex Table"); + end if; + end if; + end Compute_Edges_And_Vertices; + + ------------ + -- Define -- + ------------ + + procedure Define + (Name : Table_Name; + Item_Size : out Natural; + Length_1 : out Natural; + Length_2 : out Natural) + is + begin + case Name is + when Character_Position => + Item_Size := 31; + Length_1 := Char_Pos_Set_Len; + Length_2 := 0; + + when Used_Character_Set => + Item_Size := 8; + Length_1 := 256; + Length_2 := 0; + + when Function_Table_1 + | Function_Table_2 + => + Item_Size := Type_Size (NV); + Length_1 := T1_Len; + Length_2 := T2_Len; + + when Graph_Table => + Item_Size := Type_Size (NK); + Length_1 := NV; + Length_2 := 0; + end case; + end Define; + + -------------- + -- Finalize -- + -------------- + + procedure Finalize is + begin + if Verbose then + Put (Output, "Finalize"); + New_Line (Output); + end if; + + -- Deallocate all the WT components (both initial and reduced ones) to + -- avoid memory leaks. + + for W in 0 .. WT.Last loop + + -- Note: WT.Table (NK) is a temporary variable, do not free it since + -- this would cause a double free. + + if W /= NK then + Free_Word (WT.Table (W)); + end if; + end loop; + + WT.Release; + IT.Release; + + -- Reset all variables for next usage + + Keys := No_Table; + + Char_Pos_Set := No_Table; + Char_Pos_Set_Len := 0; + + Used_Char_Set := No_Table; + Used_Char_Set_Len := 0; + + T1 := No_Table; + T2 := No_Table; + + T1_Len := 0; + T2_Len := 0; + + G := No_Table; + G_Len := 0; + + Edges := No_Table; + Edges_Len := 0; + + Vertices := No_Table; + NV := 0; + + NK := 0; + Max_Key_Len := 0; + Min_Key_Len := 0; + end Finalize; + + ---------------------------- + -- Generate_Mapping_Table -- + ---------------------------- + + procedure Generate_Mapping_Table + (Tab : Integer; + L1 : Natural; + L2 : Natural; + Seed : in out Natural) + is + begin + for J in 0 .. L1 - 1 loop + for K in 0 .. L2 - 1 loop + Random (Seed); + Set_Table (Tab, J, K, Seed mod NV); + end loop; + end loop; + end Generate_Mapping_Table; + + ----------------------------- + -- Generate_Mapping_Tables -- + ----------------------------- + + procedure Generate_Mapping_Tables + (Opt : Optimization; + Seed : in out Natural) + is + begin + -- If T1 and T2 are already allocated no need to do it twice. Reuse them + -- as their size has not changed. + + if T1 = No_Table and then T2 = No_Table then + declare + Used_Char_Last : Natural := 0; + Used_Char : Natural; + + begin + if Opt = CPU_Time then + for P in reverse Character'Range loop + Used_Char := Get_Used_Char (P); + if Used_Char /= 0 then + Used_Char_Last := Used_Char; + exit; + end if; + end loop; + end if; + + T1_Len := Char_Pos_Set_Len; + T2_Len := Used_Char_Last + 1; + T1 := Allocate (T1_Len * T2_Len); + T2 := Allocate (T1_Len * T2_Len); + end; + end if; + + Generate_Mapping_Table (T1, T1_Len, T2_Len, Seed); + Generate_Mapping_Table (T2, T1_Len, T2_Len, Seed); + + if Verbose then + Put_Used_Char_Set (Output, "Used Character Set"); + Put_Int_Matrix (Output, "Function Table 1", T1, + T1_Len, T2_Len); + Put_Int_Matrix (Output, "Function Table 2", T2, + T1_Len, T2_Len); + end if; + end Generate_Mapping_Tables; + + ------------------ + -- Get_Char_Pos -- + ------------------ + + function Get_Char_Pos (P : Natural) return Natural is + N : constant Natural := Char_Pos_Set + P; + begin + return IT.Table (N); + end Get_Char_Pos; + + --------------- + -- Get_Edges -- + --------------- + + function Get_Edges (F : Natural) return Edge_Type is + N : constant Natural := Edges + (F * Edge_Size); + E : Edge_Type; + begin + E.X := IT.Table (N); + E.Y := IT.Table (N + 1); + E.Key := IT.Table (N + 2); + return E; + end Get_Edges; + + --------------- + -- Get_Graph -- + --------------- + + function Get_Graph (N : Natural) return Integer is + begin + return IT.Table (G + N); + end Get_Graph; + + ------------- + -- Get_Key -- + ------------- + + function Get_Key (N : Key_Id) return Key_Type is + K : Key_Type; + begin + K.Edge := IT.Table (Keys + N); + return K; + end Get_Key; + + --------------- + -- Get_Table -- + --------------- + + function Get_Table (T : Integer; X, Y : Natural) return Natural is + N : constant Natural := T + (Y * T1_Len) + X; + begin + return IT.Table (N); + end Get_Table; + + ------------------- + -- Get_Used_Char -- + ------------------- + + function Get_Used_Char (C : Character) return Natural is + N : constant Natural := Used_Char_Set + Character'Pos (C); + begin + return IT.Table (N); + end Get_Used_Char; + + ------------------ + -- Get_Vertices -- + ------------------ + + function Get_Vertices (F : Natural) return Vertex_Type is + N : constant Natural := Vertices + (F * Vertex_Size); + V : Vertex_Type; + begin + V.First := IT.Table (N); + V.Last := IT.Table (N + 1); + return V; + end Get_Vertices; + + ----------- + -- Image -- + ----------- + + function Image (Int : Integer; W : Natural := 0) return String is + B : String (1 .. 32); + L : Natural := 0; + + procedure Img (V : Natural); + -- Compute image of V into B, starting at B (L), incrementing L + + --------- + -- Img -- + --------- + + procedure Img (V : Natural) is + begin + if V > 9 then + Img (V / 10); + end if; + + L := L + 1; + B (L) := Character'Val ((V mod 10) + Character'Pos ('0')); + end Img; + + -- Start of processing for Image + + begin + if Int < 0 then + L := L + 1; + B (L) := '-'; + Img (-Int); + else + Img (Int); + end if; + + return Image (B (1 .. L), W); + end Image; + + ----------- + -- Image -- + ----------- + + function Image (Str : String; W : Natural := 0) return String is + Len : constant Natural := Str'Length; + Max : Natural := Len; + + begin + if Max < W then + Max := W; + end if; + + declare + Buf : String (1 .. Max) := (1 .. Max => ' '); + + begin + for J in 0 .. Len - 1 loop + Buf (Max - Len + 1 + J) := Str (Str'First + J); + end loop; + + return Buf; + end; + end Image; + + ------------- + -- Initial -- + ------------- + + function Initial (K : Key_Id) return Word_Id is + begin + return K; + end Initial; + + ---------------- + -- Initialize -- + ---------------- + + procedure Initialize + (Seed : Natural; + V : Positive; + Optim : Optimization; + Tries : Positive) + is + begin + if Verbose then + Put (Output, "Initialize"); + New_Line (Output); + end if; + + -- Deallocate the part of the table concerning the reduced words. + -- Initial words are already present in the table. We may have reduced + -- words already there because a previous computation failed. We are + -- currently retrying and the reduced words have to be deallocated. + + for W in Reduced (0) .. WT.Last loop + Free_Word (WT.Table (W)); + end loop; + + IT.Init; + + -- Initialize of computation variables + + Keys := No_Table; + + Char_Pos_Set := No_Table; + Char_Pos_Set_Len := 0; + + Used_Char_Set := No_Table; + Used_Char_Set_Len := 0; + + T1 := No_Table; + T2 := No_Table; + + T1_Len := 0; + T2_Len := 0; + + G := No_Table; + G_Len := 0; + + Edges := No_Table; + Edges_Len := 0; + + if V <= 2 * NK then + raise Program_Error with "K to V ratio cannot be lower than 2"; + end if; + + Vertices := No_Table; + NV := V; + + S := Seed; + Opt := Optim; + NT := Tries; + + Keys := Allocate (NK); + + -- Resize initial words to have all of them at the same size + -- (so the size of the largest one). + + for K in 0 .. NK - 1 loop + Resize_Word (WT.Table (Initial (K)), Max_Key_Len); + end loop; + + -- Allocated the table to store the reduced words. As WT is a + -- GNAT.Table (using C memory management), pointers have to be + -- explicitly initialized to null. + + WT.Set_Last (Reduced (NK - 1)); + + -- Note: Reduced (0) = NK + 1 + + WT.Table (NK) := null; + + for W in 0 .. NK - 1 loop + WT.Table (Reduced (W)) := null; + end loop; + end Initialize; + + ------------ + -- Insert -- + ------------ + + procedure Insert (Value : String) is + Len : constant Natural := Value'Length; + + begin + if Verbose then + Put (Output, "Inserting """ & Value & """"); + New_Line (Output); + end if; + + for J in Value'Range loop + pragma Assert (Value (J) /= ASCII.NUL); + null; + end loop; + + WT.Set_Last (NK); + WT.Table (NK) := New_Word (Value); + NK := NK + 1; + + if Max_Key_Len < Len then + Max_Key_Len := Len; + end if; + + if Min_Key_Len = 0 or else Len < Min_Key_Len then + Min_Key_Len := Len; + end if; + end Insert; + + -------------- + -- New_Line -- + -------------- + + procedure New_Line (File : File_Descriptor) is + begin + if Write (File, EOL'Address, 1) /= 1 then + raise Program_Error; + end if; + end New_Line; + + -------------- + -- New_Word -- + -------------- + + function New_Word (S : String) return Word_Type is + begin + return new String'(S); + end New_Word; + + ------------------------------ + -- Parse_Position_Selection -- + ------------------------------ + + procedure Parse_Position_Selection (Argument : String) is + N : Natural := Argument'First; + L : constant Natural := Argument'Last; + M : constant Natural := Max_Key_Len; + + T : array (1 .. M) of Boolean := (others => False); + + function Parse_Index return Natural; + -- Parse argument starting at index N to find an index + + ----------------- + -- Parse_Index -- + ----------------- + + function Parse_Index return Natural is + C : Character := Argument (N); + V : Natural := 0; + + begin + if C = '$' then + N := N + 1; + return M; + end if; + + if C not in '0' .. '9' then + raise Program_Error with "cannot read position argument"; + end if; + + while C in '0' .. '9' loop + V := V * 10 + (Character'Pos (C) - Character'Pos ('0')); + N := N + 1; + exit when L < N; + C := Argument (N); + end loop; + + return V; + end Parse_Index; + + -- Start of processing for Parse_Position_Selection + + begin + -- Empty specification means all the positions + + if L < N then + Char_Pos_Set_Len := M; + Char_Pos_Set := Allocate (Char_Pos_Set_Len); + + for C in 0 .. Char_Pos_Set_Len - 1 loop + Set_Char_Pos (C, C + 1); + end loop; + + else + loop + declare + First, Last : Natural; + + begin + First := Parse_Index; + Last := First; + + -- Detect a range + + if N <= L and then Argument (N) = '-' then + N := N + 1; + Last := Parse_Index; + end if; + + -- Include the positions in the selection + + for J in First .. Last loop + T (J) := True; + end loop; + end; + + exit when L < N; + + if Argument (N) /= ',' then + raise Program_Error with "cannot read position argument"; + end if; + + N := N + 1; + end loop; + + -- Compute position selection length + + N := 0; + for J in T'Range loop + if T (J) then + N := N + 1; + end if; + end loop; + + -- Fill position selection + + Char_Pos_Set_Len := N; + Char_Pos_Set := Allocate (Char_Pos_Set_Len); + + N := 0; + for J in T'Range loop + if T (J) then + Set_Char_Pos (N, J); + N := N + 1; + end if; + end loop; + end if; + end Parse_Position_Selection; + + --------- + -- Put -- + --------- + + procedure Put (File : File_Descriptor; Str : String) is + Len : constant Natural := Str'Length; + begin + for J in Str'Range loop + pragma Assert (Str (J) /= ASCII.NUL); + null; + end loop; + + if Write (File, Str'Address, Len) /= Len then + raise Program_Error; + end if; + end Put; + + --------- + -- Put -- + --------- + + procedure Put + (F : File_Descriptor; + S : String; + F1 : Natural; + L1 : Natural; + C1 : Natural; + F2 : Natural; + L2 : Natural; + C2 : Natural) + is + Len : constant Natural := S'Length; + + procedure Flush; + -- Write current line, followed by LF + + ----------- + -- Flush -- + ----------- + + procedure Flush is + begin + Put (F, Line (1 .. Last)); + New_Line (F); + Last := 0; + end Flush; + + -- Start of processing for Put + + begin + if C1 = F1 and then C2 = F2 then + Last := 0; + end if; + + if Last + Len + 3 >= Max then + Flush; + end if; + + if Last = 0 then + Add (" "); + + if F1 <= L1 then + if C1 = F1 and then C2 = F2 then + Add ('('); + + if F1 = L1 then + Add ("0 .. 0 => "); + end if; + + else + Add (' '); + end if; + end if; + end if; + + if C2 = F2 then + Add ('('); + + if F2 = L2 then + Add ("0 .. 0 => "); + end if; + + else + Add (' '); + end if; + + Add (S); + + if C2 = L2 then + Add (')'); + + if F1 > L1 then + Add (';'); + Flush; + + elsif C1 /= L1 then + Add (','); + Flush; + + else + Add (')'); + Add (';'); + Flush; + end if; + + else + Add (','); + end if; + end Put; + + --------------- + -- Put_Edges -- + --------------- + + procedure Put_Edges (File : File_Descriptor; Title : String) is + E : Edge_Type; + F1 : constant Natural := 1; + L1 : constant Natural := Edges_Len - 1; + M : constant Natural := Max / 5; + + begin + Put (File, Title); + New_Line (File); + + -- Edges valid range is 1 .. Edge_Len - 1 + + for J in F1 .. L1 loop + E := Get_Edges (J); + Put (File, Image (J, M), F1, L1, J, 1, 4, 1); + Put (File, Image (E.X, M), F1, L1, J, 1, 4, 2); + Put (File, Image (E.Y, M), F1, L1, J, 1, 4, 3); + Put (File, Image (E.Key, M), F1, L1, J, 1, 4, 4); + end loop; + end Put_Edges; + + ---------------------- + -- Put_Initial_Keys -- + ---------------------- + + procedure Put_Initial_Keys (File : File_Descriptor; Title : String) is + F1 : constant Natural := 0; + L1 : constant Natural := NK - 1; + M : constant Natural := Max / 5; + K : Key_Type; + + begin + Put (File, Title); + New_Line (File); + + for J in F1 .. L1 loop + K := Get_Key (J); + Put (File, Image (J, M), F1, L1, J, 1, 3, 1); + Put (File, Image (K.Edge, M), F1, L1, J, 1, 3, 2); + Put (File, Trim_Trailing_Nuls (WT.Table (Initial (J)).all), + F1, L1, J, 1, 3, 3); + end loop; + end Put_Initial_Keys; + + -------------------- + -- Put_Int_Matrix -- + -------------------- + + procedure Put_Int_Matrix + (File : File_Descriptor; + Title : String; + Table : Integer; + Len_1 : Natural; + Len_2 : Natural) + is + F1 : constant Integer := 0; + L1 : constant Integer := Len_1 - 1; + F2 : constant Integer := 0; + L2 : constant Integer := Len_2 - 1; + Ix : Natural; + + begin + Put (File, Title); + New_Line (File); + + if Len_2 = 0 then + for J in F1 .. L1 loop + Ix := IT.Table (Table + J); + Put (File, Image (Ix), 1, 0, 1, F1, L1, J); + end loop; + + else + for J in F1 .. L1 loop + for K in F2 .. L2 loop + Ix := IT.Table (Table + J + K * Len_1); + Put (File, Image (Ix), F1, L1, J, F2, L2, K); + end loop; + end loop; + end if; + end Put_Int_Matrix; + + -------------------- + -- Put_Int_Vector -- + -------------------- + + procedure Put_Int_Vector + (File : File_Descriptor; + Title : String; + Vector : Integer; + Length : Natural) + is + F2 : constant Natural := 0; + L2 : constant Natural := Length - 1; + + begin + Put (File, Title); + New_Line (File); + + for J in F2 .. L2 loop + Put (File, Image (IT.Table (Vector + J)), 1, 0, 1, F2, L2, J); + end loop; + end Put_Int_Vector; + + ---------------------- + -- Put_Reduced_Keys -- + ---------------------- + + procedure Put_Reduced_Keys (File : File_Descriptor; Title : String) is + F1 : constant Natural := 0; + L1 : constant Natural := NK - 1; + M : constant Natural := Max / 5; + K : Key_Type; + + begin + Put (File, Title); + New_Line (File); + + for J in F1 .. L1 loop + K := Get_Key (J); + Put (File, Image (J, M), F1, L1, J, 1, 3, 1); + Put (File, Image (K.Edge, M), F1, L1, J, 1, 3, 2); + Put (File, Trim_Trailing_Nuls (WT.Table (Reduced (J)).all), + F1, L1, J, 1, 3, 3); + end loop; + end Put_Reduced_Keys; + + ----------------------- + -- Put_Used_Char_Set -- + ----------------------- + + procedure Put_Used_Char_Set (File : File_Descriptor; Title : String) is + F : constant Natural := Character'Pos (Character'First); + L : constant Natural := Character'Pos (Character'Last); + + begin + Put (File, Title); + New_Line (File); + + for J in Character'Range loop + Put + (File, Image (Get_Used_Char (J)), 1, 0, 1, F, L, Character'Pos (J)); + end loop; + end Put_Used_Char_Set; + + ---------------------- + -- Put_Vertex_Table -- + ---------------------- + + procedure Put_Vertex_Table (File : File_Descriptor; Title : String) is + F1 : constant Natural := 0; + L1 : constant Natural := NV - 1; + M : constant Natural := Max / 4; + V : Vertex_Type; + + begin + Put (File, Title); + New_Line (File); + + for J in F1 .. L1 loop + V := Get_Vertices (J); + Put (File, Image (J, M), F1, L1, J, 1, 3, 1); + Put (File, Image (V.First, M), F1, L1, J, 1, 3, 2); + Put (File, Image (V.Last, M), F1, L1, J, 1, 3, 3); + end loop; + end Put_Vertex_Table; + + ------------ + -- Random -- + ------------ + + procedure Random (Seed : in out Natural) is + + -- Park & Miller Standard Minimal using Schrage's algorithm to avoid + -- overflow: Xn+1 = 16807 * Xn mod (2 ** 31 - 1) + + R : Natural; + Q : Natural; + X : Integer; + + begin + R := Seed mod 127773; + Q := Seed / 127773; + X := 16807 * R - 2836 * Q; + + Seed := (if X < 0 then X + 2147483647 else X); + end Random; + + ------------- + -- Reduced -- + ------------- + + function Reduced (K : Key_Id) return Word_Id is + begin + return K + NK + 1; + end Reduced; + + ----------------- + -- Resize_Word -- + ----------------- + + procedure Resize_Word (W : in out Word_Type; Len : Natural) is + S1 : constant String := W.all; + S2 : String (1 .. Len) := (others => ASCII.NUL); + L : constant Natural := S1'Length; + begin + if L /= Len then + Free_Word (W); + S2 (1 .. L) := S1; + W := New_Word (S2); + end if; + end Resize_Word; + + -------------------------- + -- Select_Char_Position -- + -------------------------- + + procedure Select_Char_Position is + + type Vertex_Table_Type is array (Natural range <>) of Vertex_Type; + + procedure Build_Identical_Keys_Sets + (Table : in out Vertex_Table_Type; + Last : in out Natural; + Pos : Natural); + -- Build a list of keys subsets that are identical with the current + -- position selection plus Pos. Once this routine is called, reduced + -- words are sorted by subsets and each item (First, Last) in Sets + -- defines the range of identical keys. + -- Need comment saying exactly what Last is ??? + + function Count_Different_Keys + (Table : Vertex_Table_Type; + Last : Natural; + Pos : Natural) return Natural; + -- For each subset in Sets, count the number of different keys if we add + -- Pos to the current position selection. + + Sel_Position : IT.Table_Type (1 .. Max_Key_Len); + Last_Sel_Pos : Natural := 0; + Max_Sel_Pos : Natural := 0; + + ------------------------------- + -- Build_Identical_Keys_Sets -- + ------------------------------- + + procedure Build_Identical_Keys_Sets + (Table : in out Vertex_Table_Type; + Last : in out Natural; + Pos : Natural) + is + S : constant Vertex_Table_Type := Table (Table'First .. Last); + C : constant Natural := Pos; + -- Shortcuts (why are these not renames ???) + + F : Integer; + L : Integer; + -- First and last words of a subset + + Offset : Natural; + -- GNAT.Heap_Sort assumes that the first array index is 1. Offset + -- defines the translation to operate. + + function Lt (L, R : Natural) return Boolean; + procedure Move (From : Natural; To : Natural); + -- Subprograms needed by GNAT.Heap_Sort_G + + -------- + -- Lt -- + -------- + + function Lt (L, R : Natural) return Boolean is + C : constant Natural := Pos; + Left : Natural; + Right : Natural; + + begin + if L = 0 then + Left := NK; + Right := Offset + R; + elsif R = 0 then + Left := Offset + L; + Right := NK; + else + Left := Offset + L; + Right := Offset + R; + end if; + + return WT.Table (Left)(C) < WT.Table (Right)(C); + end Lt; + + ---------- + -- Move -- + ---------- + + procedure Move (From : Natural; To : Natural) is + Target, Source : Natural; + + begin + if From = 0 then + Source := NK; + Target := Offset + To; + elsif To = 0 then + Source := Offset + From; + Target := NK; + else + Source := Offset + From; + Target := Offset + To; + end if; + + WT.Table (Target) := WT.Table (Source); + WT.Table (Source) := null; + end Move; + + package Sorting is new GNAT.Heap_Sort_G (Move, Lt); + + -- Start of processing for Build_Identical_Key_Sets + + begin + Last := 0; + + -- For each subset in S, extract the new subsets we have by adding C + -- in the position selection. + + for J in S'Range loop + pragma Annotate (CodePeer, Modified, S (J)); + + if S (J).First = S (J).Last then + F := S (J).First; + L := S (J).Last; + Last := Last + 1; + Table (Last) := (F, L); + + else + Offset := Reduced (S (J).First) - 1; + Sorting.Sort (S (J).Last - S (J).First + 1); + + F := S (J).First; + L := F; + for N in S (J).First .. S (J).Last loop + + -- For the last item, close the last subset + + if N = S (J).Last then + Last := Last + 1; + Table (Last) := (F, N); + + -- Two contiguous words are identical when they have the + -- same Cth character. + + elsif WT.Table (Reduced (N))(C) = + WT.Table (Reduced (N + 1))(C) + then + L := N + 1; + + -- Find a new subset of identical keys. Store the current + -- one and create a new subset. + + else + Last := Last + 1; + Table (Last) := (F, L); + F := N + 1; + L := F; + end if; + end loop; + end if; + end loop; + end Build_Identical_Keys_Sets; + + -------------------------- + -- Count_Different_Keys -- + -------------------------- + + function Count_Different_Keys + (Table : Vertex_Table_Type; + Last : Natural; + Pos : Natural) return Natural + is + N : array (Character) of Natural; + C : Character; + T : Natural := 0; + + begin + -- For each subset, count the number of words that are still + -- different when we include Pos in the position selection. Only + -- focus on this position as the other positions already produce + -- identical keys. + + for S in 1 .. Last loop + + -- Count the occurrences of the different characters + + N := (others => 0); + for K in Table (S).First .. Table (S).Last loop + C := WT.Table (Reduced (K))(Pos); + N (C) := N (C) + 1; + end loop; + + -- Update the number of different keys. Each character used + -- denotes a different key. + + for J in N'Range loop + if N (J) > 0 then + T := T + 1; + end if; + end loop; + end loop; + + return T; + end Count_Different_Keys; + + -- Start of processing for Select_Char_Position + + begin + -- Initialize the reduced words set + + for K in 0 .. NK - 1 loop + WT.Table (Reduced (K)) := New_Word (WT.Table (Initial (K)).all); + end loop; + + declare + Differences : Natural; + Max_Differences : Natural := 0; + Old_Differences : Natural; + Max_Diff_Sel_Pos : Natural := 0; -- init to kill warning + Max_Diff_Sel_Pos_Idx : Natural := 0; -- init to kill warning + Same_Keys_Sets_Table : Vertex_Table_Type (1 .. NK); + Same_Keys_Sets_Last : Natural := 1; + + begin + for C in Sel_Position'Range loop + Sel_Position (C) := C; + end loop; + + Same_Keys_Sets_Table (1) := (0, NK - 1); + + loop + -- Preserve maximum number of different keys and check later on + -- that this value is strictly incrementing. Otherwise, it means + -- that two keys are strictly identical. + + Old_Differences := Max_Differences; + + -- The first position should not exceed the minimum key length. + -- Otherwise, we may end up with an empty word once reduced. + + Max_Sel_Pos := + (if Last_Sel_Pos = 0 then Min_Key_Len else Max_Key_Len); + + -- Find which position increases more the number of differences + + for J in Last_Sel_Pos + 1 .. Max_Sel_Pos loop + Differences := Count_Different_Keys + (Same_Keys_Sets_Table, + Same_Keys_Sets_Last, + Sel_Position (J)); + + if Verbose then + Put (Output, + "Selecting position" & Sel_Position (J)'Img & + " results in" & Differences'Img & + " differences"); + New_Line (Output); + end if; + + if Differences > Max_Differences then + Max_Differences := Differences; + Max_Diff_Sel_Pos := Sel_Position (J); + Max_Diff_Sel_Pos_Idx := J; + end if; + end loop; + + if Old_Differences = Max_Differences then + raise Program_Error with "some keys are identical"; + end if; + + -- Insert selected position and sort Sel_Position table + + Last_Sel_Pos := Last_Sel_Pos + 1; + Sel_Position (Last_Sel_Pos + 1 .. Max_Diff_Sel_Pos_Idx) := + Sel_Position (Last_Sel_Pos .. Max_Diff_Sel_Pos_Idx - 1); + Sel_Position (Last_Sel_Pos) := Max_Diff_Sel_Pos; + + for P in 1 .. Last_Sel_Pos - 1 loop + if Max_Diff_Sel_Pos < Sel_Position (P) then + pragma Annotate + (CodePeer, False_Positive, + "test always false", "false positive?"); + + Sel_Position (P + 1 .. Last_Sel_Pos) := + Sel_Position (P .. Last_Sel_Pos - 1); + Sel_Position (P) := Max_Diff_Sel_Pos; + exit; + end if; + end loop; + + exit when Max_Differences = NK; + + Build_Identical_Keys_Sets + (Same_Keys_Sets_Table, + Same_Keys_Sets_Last, + Max_Diff_Sel_Pos); + + if Verbose then + Put (Output, + "Selecting position" & Max_Diff_Sel_Pos'Img & + " results in" & Max_Differences'Img & + " differences"); + New_Line (Output); + Put (Output, "--"); + New_Line (Output); + for J in 1 .. Same_Keys_Sets_Last loop + for K in + Same_Keys_Sets_Table (J).First .. + Same_Keys_Sets_Table (J).Last + loop + Put (Output, + Trim_Trailing_Nuls (WT.Table (Reduced (K)).all)); + New_Line (Output); + end loop; + Put (Output, "--"); + New_Line (Output); + end loop; + end if; + end loop; + end; + + Char_Pos_Set_Len := Last_Sel_Pos; + Char_Pos_Set := Allocate (Char_Pos_Set_Len); + + for C in 1 .. Last_Sel_Pos loop + Set_Char_Pos (C - 1, Sel_Position (C)); + end loop; + end Select_Char_Position; + + -------------------------- + -- Select_Character_Set -- + -------------------------- + + procedure Select_Character_Set is + Last : Natural := 0; + Used : array (Character) of Boolean := (others => False); + Char : Character; + + begin + for J in 0 .. NK - 1 loop + for K in 0 .. Char_Pos_Set_Len - 1 loop + Char := WT.Table (Initial (J))(Get_Char_Pos (K)); + exit when Char = ASCII.NUL; + Used (Char) := True; + end loop; + end loop; + + Used_Char_Set_Len := 256; + Used_Char_Set := Allocate (Used_Char_Set_Len); + + for J in Used'Range loop + if Used (J) then + Set_Used_Char (J, Last); + Last := Last + 1; + else + Set_Used_Char (J, 0); + end if; + end loop; + end Select_Character_Set; + + ------------------ + -- Set_Char_Pos -- + ------------------ + + procedure Set_Char_Pos (P : Natural; Item : Natural) is + N : constant Natural := Char_Pos_Set + P; + begin + IT.Table (N) := Item; + end Set_Char_Pos; + + --------------- + -- Set_Edges -- + --------------- + + procedure Set_Edges (F : Natural; Item : Edge_Type) is + N : constant Natural := Edges + (F * Edge_Size); + begin + IT.Table (N) := Item.X; + IT.Table (N + 1) := Item.Y; + IT.Table (N + 2) := Item.Key; + end Set_Edges; + + --------------- + -- Set_Graph -- + --------------- + + procedure Set_Graph (N : Natural; Item : Integer) is + begin + IT.Table (G + N) := Item; + end Set_Graph; + + ------------- + -- Set_Key -- + ------------- + + procedure Set_Key (N : Key_Id; Item : Key_Type) is + begin + IT.Table (Keys + N) := Item.Edge; + end Set_Key; + + --------------- + -- Set_Table -- + --------------- + + procedure Set_Table (T : Integer; X, Y : Natural; Item : Natural) is + N : constant Natural := T + ((Y * T1_Len) + X); + begin + IT.Table (N) := Item; + end Set_Table; + + ------------------- + -- Set_Used_Char -- + ------------------- + + procedure Set_Used_Char (C : Character; Item : Natural) is + N : constant Natural := Used_Char_Set + Character'Pos (C); + begin + IT.Table (N) := Item; + end Set_Used_Char; + + ------------------ + -- Set_Vertices -- + ------------------ + + procedure Set_Vertices (F : Natural; Item : Vertex_Type) is + N : constant Natural := Vertices + (F * Vertex_Size); + begin + IT.Table (N) := Item.First; + IT.Table (N + 1) := Item.Last; + end Set_Vertices; + + --------- + -- Sum -- + --------- + + function Sum + (Word : Word_Type; + Table : Table_Id; + Opt : Optimization) return Natural + is + S : Natural := 0; + R : Natural; + + begin + case Opt is + when CPU_Time => + for J in 0 .. T1_Len - 1 loop + exit when Word (J + 1) = ASCII.NUL; + R := Get_Table (Table, J, Get_Used_Char (Word (J + 1))); + pragma Assert (NV /= 0); + S := (S + R) mod NV; + end loop; + + when Memory_Space => + for J in 0 .. T1_Len - 1 loop + exit when Word (J + 1) = ASCII.NUL; + R := Get_Table (Table, J, 0); + pragma Assert (NV /= 0); + S := (S + R * Character'Pos (Word (J + 1))) mod NV; + end loop; + end case; + + return S; + end Sum; + + ------------------------ + -- Trim_Trailing_Nuls -- + ------------------------ + + function Trim_Trailing_Nuls (Str : String) return String is + begin + for J in reverse Str'Range loop + if Str (J) /= ASCII.NUL then + return Str (Str'First .. J); + end if; + end loop; + + return Str; + end Trim_Trailing_Nuls; + + --------------- + -- Type_Size -- + --------------- + + function Type_Size (L : Natural) return Natural is + begin + if L <= 2 ** 8 then + return 8; + elsif L <= 2 ** 16 then + return 16; + else + return 32; + end if; + end Type_Size; + + ----------- + -- Value -- + ----------- + + function Value + (Name : Table_Name; + J : Natural; + K : Natural := 0) return Natural + is + begin + case Name is + when Character_Position => + return Get_Char_Pos (J); + + when Used_Character_Set => + return Get_Used_Char (Character'Val (J)); + + when Function_Table_1 => + return Get_Table (T1, J, K); + + when Function_Table_2 => + return Get_Table (T2, J, K); + + when Graph_Table => + return Get_Graph (J); + end case; + end Value; + +end System.Perfect_Hash_Generators; diff --git a/gcc/ada/libgnat/s-pehage.ads b/gcc/ada/libgnat/s-pehage.ads new file mode 100644 index 0000000..f8b8129 --- /dev/null +++ b/gcc/ada/libgnat/s-pehage.ads @@ -0,0 +1,212 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- S Y S T E M . P E R F E C T _ H A S H _ G E N E R A T O R S -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2002-2021, 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- -- +-- 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 provides a generator of static minimal perfect hash functions. +-- To understand what a perfect hash function is, we define several notions. +-- These definitions are inspired from the following paper: + +-- Zbigniew J. Czech, George Havas, and Bohdan S. Majewski ``An Optimal +-- Algorithm for Generating Minimal Perfect Hash Functions'', Information +-- Processing Letters, 43(1992) pp.257-264, Oct.1992 + +-- Let W be a set of m words. A hash function h is a function that maps the +-- set of words W into some given interval I of integers [0, k-1], where k is +-- an integer, usually k >= m. h (w) where w is a word in W computes an +-- address or an integer from I for the storage or the retrieval of that +-- item. The storage area used to store items is known as a hash table. Words +-- for which the same address is computed are called synonyms. Due to the +-- existence of synonyms a situation called collision may arise in which two +-- items w1 and w2 have the same address. Several schemes for resolving +-- collisions are known. A perfect hash function is an injection from the word +-- set W to the integer interval I with k >= m. If k = m, then h is a minimal +-- perfect hash function. A hash function is order preserving if it puts +-- entries into the hash table in a prespecified order. + +-- A minimal perfect hash function is defined by two properties: + +-- Since no collisions occur each item can be retrieved from the table in +-- *one* probe. This represents the "perfect" property. + +-- The hash table size corresponds to the exact size of W and *no larger*. +-- This represents the "minimal" property. + +-- The functions generated by this package require the words to be known in +-- advance (they are "static" hash functions). The hash functions are also +-- order preserving. If w2 is inserted after w1 in the generator, then h (w1) +-- < 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); + -- Optimize either the memory space or the execution time. Note: in + -- practice, the optimization mode has little effect on speed. The tables + -- are somewhat smaller with Memory_Space. + + Verbose : Boolean := False; + -- Output the status of the algorithm. For instance, the tables, the random + -- graph (edges, vertices) and selected char positions are output between + -- two iterations. + + procedure Initialize + (Seed : Natural; + V : Positive; + Optim : Optimization; + Tries : Positive); + -- Initialize the generator and its internal structures. Set the number of + -- vertices in the random graphs. This value has to be greater than twice + -- the number of keys in order for the algorithm to succeed. The word set + -- is not modified (in particular when it is already set). For instance, it + -- is possible to run several times the generator with different settings + -- on the same words. + -- + -- A classical way of doing is to Insert all the words and then to invoke + -- Initialize and Compute. If this fails to find a perfect hash function, + -- invoke Initialize again with other configuration parameters (probably + -- with a greater number of vertices). Once successful, invoke Define and + -- Value, and then Finalize. + + procedure Finalize; + -- Deallocate the internal structures and the words table + + procedure Insert (Value : String); + -- Insert a new word into the table. ASCII.NUL characters are not allowed. + + Too_Many_Tries : exception; + -- Raised after Tries unsuccessful runs + + procedure Compute (Position : String); + -- Compute the hash function. Position allows the definition of selection + -- of character positions used in the word hash function. Positions can be + -- separated by commas and ranges like x-y may be used. Character '$' + -- represents the final character of a word. With an empty position, the + -- generator automatically produces positions to reduce the memory usage. + -- Raise Too_Many_Tries if the algorithm does not succeed within Tries + -- attempts (see Initialize). + + -- The procedure Define returns the lengths of an internal table and its + -- item type size. The function Value returns the value of each item in + -- the table. Together they can be used to retrieve the parameters of the + -- hash function which has been computed by a call to Compute. + + -- The hash function has the following form: + + -- h (w) = (g (f1 (w)) + g (f2 (w))) mod m + + -- G is a function based on a graph table [0,n-1] -> [0,m-1]. m is the + -- number of keys. n is an internally computed value and it can be obtained + -- as the length of vector G. + + -- F1 and F2 are two functions based on two function tables T1 and T2. + -- Their definition depends on the chosen optimization mode. + + -- Only some character positions are used in the words because they are + -- significant. They are listed in a character position table (P in the + -- pseudo-code below). For instance, in {"jan", "feb", "mar", "apr", "jun", + -- "jul", "aug", "sep", "oct", "nov", "dec"}, only positions 2 and 3 are + -- significant (the first character can be ignored). In this example, P = + -- {2, 3} + + -- When Optimization is CPU_Time, the first dimension of T1 and T2 + -- corresponds to the character position in the word and the second to the + -- character set. As all the character set is not used, we define a used + -- character table which associates a distinct index to each used character + -- (unused characters are mapped to zero). In this case, the second + -- dimension of T1 and T2 is reduced to the used character set (C in the + -- pseudo-code below). Therefore, the hash function has the following: + + -- function Hash (S : String) return Natural is + -- F : constant Natural := S'First - 1; + -- L : constant Natural := S'Length; + -- F1, F2 : Natural := 0; + -- J : <t>; + + -- begin + -- for K in P'Range loop + -- exit when L < P (K); + -- J := C (S (P (K) + F)); + -- F1 := (F1 + Natural (T1 (K, J))) mod <n>; + -- F2 := (F2 + Natural (T2 (K, J))) mod <n>; + -- end loop; + + -- return (Natural (G (F1)) + Natural (G (F2))) mod <m>; + -- end Hash; + + -- When Optimization is Memory_Space, the first dimension of T1 and T2 + -- corresponds to the character position in the word and the second + -- dimension is ignored. T1 and T2 are no longer matrices but vectors. + -- Therefore, the used character table is not available. The hash function + -- has the following form: + + -- function Hash (S : String) return Natural is + -- F : constant Natural := S'First - 1; + -- L : constant Natural := S'Length; + -- F1, F2 : Natural := 0; + -- J : <t>; + + -- begin + -- for K in P'Range loop + -- exit when L < P (K); + -- J := Character'Pos (S (P (K) + F)); + -- F1 := (F1 + Natural (T1 (K) * J)) mod <n>; + -- F2 := (F2 + Natural (T2 (K) * J)) mod <n>; + -- end loop; + + -- return (Natural (G (F1)) + Natural (G (F2))) mod <m>; + -- end Hash; + + type Table_Name is + (Character_Position, + Used_Character_Set, + Function_Table_1, + Function_Table_2, + Graph_Table); + + procedure Define + (Name : Table_Name; + Item_Size : out Natural; + Length_1 : out Natural; + Length_2 : out Natural); + -- Return the definition of the table Name. This includes the length of + -- dimensions 1 and 2 and the size of an unsigned integer item. When + -- Length_2 is zero, the table has only one dimension. All the ranges + -- start from zero. + + function Value + (Name : Table_Name; + J : Natural; + K : Natural := 0) return Natural; + -- Return the value of the component (J, K) of the table Name. When the + -- table has only one dimension, K is ignored. + +end System.Perfect_Hash_Generators; diff --git a/gcc/ada/libgnat/s-pooglo.adb b/gcc/ada/libgnat/s-pooglo.adb index d1eaf53..b957eff 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pooglo.ads b/gcc/ada/libgnat/s-pooglo.ads index 8c19837..67518c2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pooloc.adb b/gcc/ada/libgnat/s-pooloc.adb index 04a0532..5592348 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-pooloc.ads b/gcc/ada/libgnat/s-pooloc.ads index 6ba152a..6e33260 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-poosiz.adb b/gcc/ada/libgnat/s-poosiz.adb index bc6ae24..fd984bb 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-poosiz.ads b/gcc/ada/libgnat/s-poosiz.ads index 3921b1c..f52593f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-powflt.ads b/gcc/ada/libgnat/s-powflt.ads index 9d58967..0967403 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -34,52 +34,34 @@ package System.Powten_Flt is pragma Pure; - Maxpow : constant := 38; - -- Largest power of ten representable with Float - Maxpow_Exact : constant := 10; -- Largest power of ten exactly representable with Float. It is equal to -- floor (M * log 2 / log 5), when M is the size of the mantissa (24). - Powten : constant array (0 .. Maxpow) of Float := - (00 => 1.0E+00, - 01 => 1.0E+01, - 02 => 1.0E+02, - 03 => 1.0E+03, - 04 => 1.0E+04, - 05 => 1.0E+05, - 06 => 1.0E+06, - 07 => 1.0E+07, - 08 => 1.0E+08, - 09 => 1.0E+09, - 10 => 1.0E+10, - 11 => 1.0E+11, - 12 => 1.0E+12, - 13 => 1.0E+13, - 14 => 1.0E+14, - 15 => 1.0E+15, - 16 => 1.0E+16, - 17 => 1.0E+17, - 18 => 1.0E+18, - 19 => 1.0E+19, - 20 => 1.0E+20, - 21 => 1.0E+21, - 22 => 1.0E+22, - 23 => 1.0E+23, - 24 => 1.0E+24, - 25 => 1.0E+25, - 26 => 1.0E+26, - 27 => 1.0E+27, - 28 => 1.0E+28, - 29 => 1.0E+29, - 30 => 1.0E+30, - 31 => 1.0E+31, - 32 => 1.0E+32, - 33 => 1.0E+33, - 34 => 1.0E+34, - 35 => 1.0E+35, - 36 => 1.0E+36, - 37 => 1.0E+37, - 38 => 1.0E+38); + Maxpow : constant := Maxpow_Exact * 2; + -- 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))); end System.Powten_Flt; diff --git a/gcc/ada/libgnat/s-powlfl.ads b/gcc/ada/libgnat/s-powlfl.ads index d191eff..7800f2f 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -34,322 +34,58 @@ package System.Powten_LFlt is pragma Pure; - Maxpow : constant := 308; - -- Largest power of ten representable with Long_Float - Maxpow_Exact : constant := 22; -- Largest power of ten exactly representable with Long_Float. It is equal -- to floor (M * log 2 / log 5), when M is the size of the mantissa (53). - Powten : constant array (0 .. Maxpow) of Long_Float := - (00 => 1.0E+00, - 01 => 1.0E+01, - 02 => 1.0E+02, - 03 => 1.0E+03, - 04 => 1.0E+04, - 05 => 1.0E+05, - 06 => 1.0E+06, - 07 => 1.0E+07, - 08 => 1.0E+08, - 09 => 1.0E+09, - 10 => 1.0E+10, - 11 => 1.0E+11, - 12 => 1.0E+12, - 13 => 1.0E+13, - 14 => 1.0E+14, - 15 => 1.0E+15, - 16 => 1.0E+16, - 17 => 1.0E+17, - 18 => 1.0E+18, - 19 => 1.0E+19, - 20 => 1.0E+20, - 21 => 1.0E+21, - 22 => 1.0E+22, - 23 => 1.0E+23, - 24 => 1.0E+24, - 25 => 1.0E+25, - 26 => 1.0E+26, - 27 => 1.0E+27, - 28 => 1.0E+28, - 29 => 1.0E+29, - 30 => 1.0E+30, - 31 => 1.0E+31, - 32 => 1.0E+32, - 33 => 1.0E+33, - 34 => 1.0E+34, - 35 => 1.0E+35, - 36 => 1.0E+36, - 37 => 1.0E+37, - 38 => 1.0E+38, - 39 => 1.0E+39, - 40 => 1.0E+40, - 41 => 1.0E+41, - 42 => 1.0E+42, - 43 => 1.0E+43, - 44 => 1.0E+44, - 45 => 1.0E+45, - 46 => 1.0E+46, - 47 => 1.0E+47, - 48 => 1.0E+48, - 49 => 1.0E+49, - 50 => 1.0E+50, - 51 => 1.0E+51, - 52 => 1.0E+52, - 53 => 1.0E+53, - 54 => 1.0E+54, - 55 => 1.0E+55, - 56 => 1.0E+56, - 57 => 1.0E+57, - 58 => 1.0E+58, - 59 => 1.0E+59, - 60 => 1.0E+60, - 61 => 1.0E+61, - 62 => 1.0E+62, - 63 => 1.0E+63, - 64 => 1.0E+64, - 65 => 1.0E+65, - 66 => 1.0E+66, - 67 => 1.0E+67, - 68 => 1.0E+68, - 69 => 1.0E+69, - 70 => 1.0E+70, - 71 => 1.0E+71, - 72 => 1.0E+72, - 73 => 1.0E+73, - 74 => 1.0E+74, - 75 => 1.0E+75, - 76 => 1.0E+76, - 77 => 1.0E+77, - 78 => 1.0E+78, - 79 => 1.0E+79, - 80 => 1.0E+80, - 81 => 1.0E+81, - 82 => 1.0E+82, - 83 => 1.0E+83, - 84 => 1.0E+84, - 85 => 1.0E+85, - 86 => 1.0E+86, - 87 => 1.0E+87, - 88 => 1.0E+88, - 89 => 1.0E+89, - 90 => 1.0E+90, - 91 => 1.0E+91, - 92 => 1.0E+92, - 93 => 1.0E+93, - 94 => 1.0E+94, - 95 => 1.0E+95, - 96 => 1.0E+96, - 97 => 1.0E+97, - 98 => 1.0E+98, - 99 => 1.0E+99, - 100 => 1.0E+100, - 101 => 1.0E+101, - 102 => 1.0E+102, - 103 => 1.0E+103, - 104 => 1.0E+104, - 105 => 1.0E+105, - 106 => 1.0E+106, - 107 => 1.0E+107, - 108 => 1.0E+108, - 109 => 1.0E+109, - 110 => 1.0E+110, - 111 => 1.0E+111, - 112 => 1.0E+112, - 113 => 1.0E+113, - 114 => 1.0E+114, - 115 => 1.0E+115, - 116 => 1.0E+116, - 117 => 1.0E+117, - 118 => 1.0E+118, - 119 => 1.0E+119, - 120 => 1.0E+120, - 121 => 1.0E+121, - 122 => 1.0E+122, - 123 => 1.0E+123, - 124 => 1.0E+124, - 125 => 1.0E+125, - 126 => 1.0E+126, - 127 => 1.0E+127, - 128 => 1.0E+128, - 129 => 1.0E+129, - 130 => 1.0E+130, - 131 => 1.0E+131, - 132 => 1.0E+132, - 133 => 1.0E+133, - 134 => 1.0E+134, - 135 => 1.0E+135, - 136 => 1.0E+136, - 137 => 1.0E+137, - 138 => 1.0E+138, - 139 => 1.0E+139, - 140 => 1.0E+140, - 141 => 1.0E+141, - 142 => 1.0E+142, - 143 => 1.0E+143, - 144 => 1.0E+144, - 145 => 1.0E+145, - 146 => 1.0E+146, - 147 => 1.0E+147, - 148 => 1.0E+148, - 149 => 1.0E+149, - 150 => 1.0E+150, - 151 => 1.0E+151, - 152 => 1.0E+152, - 153 => 1.0E+153, - 154 => 1.0E+154, - 155 => 1.0E+155, - 156 => 1.0E+156, - 157 => 1.0E+157, - 158 => 1.0E+158, - 159 => 1.0E+159, - 160 => 1.0E+160, - 161 => 1.0E+161, - 162 => 1.0E+162, - 163 => 1.0E+163, - 164 => 1.0E+164, - 165 => 1.0E+165, - 166 => 1.0E+166, - 167 => 1.0E+167, - 168 => 1.0E+168, - 169 => 1.0E+169, - 170 => 1.0E+170, - 171 => 1.0E+171, - 172 => 1.0E+172, - 173 => 1.0E+173, - 174 => 1.0E+174, - 175 => 1.0E+175, - 176 => 1.0E+176, - 177 => 1.0E+177, - 178 => 1.0E+178, - 179 => 1.0E+179, - 180 => 1.0E+180, - 181 => 1.0E+181, - 182 => 1.0E+182, - 183 => 1.0E+183, - 184 => 1.0E+184, - 185 => 1.0E+185, - 186 => 1.0E+186, - 187 => 1.0E+187, - 188 => 1.0E+188, - 189 => 1.0E+189, - 190 => 1.0E+190, - 191 => 1.0E+191, - 192 => 1.0E+192, - 193 => 1.0E+193, - 194 => 1.0E+194, - 195 => 1.0E+195, - 196 => 1.0E+196, - 197 => 1.0E+197, - 198 => 1.0E+198, - 199 => 1.0E+199, - 200 => 1.0E+200, - 201 => 1.0E+201, - 202 => 1.0E+202, - 203 => 1.0E+203, - 204 => 1.0E+204, - 205 => 1.0E+205, - 206 => 1.0E+206, - 207 => 1.0E+207, - 208 => 1.0E+208, - 209 => 1.0E+209, - 210 => 1.0E+210, - 211 => 1.0E+211, - 212 => 1.0E+212, - 213 => 1.0E+213, - 214 => 1.0E+214, - 215 => 1.0E+215, - 216 => 1.0E+216, - 217 => 1.0E+217, - 218 => 1.0E+218, - 219 => 1.0E+219, - 220 => 1.0E+220, - 221 => 1.0E+221, - 222 => 1.0E+222, - 223 => 1.0E+223, - 224 => 1.0E+224, - 225 => 1.0E+225, - 226 => 1.0E+226, - 227 => 1.0E+227, - 228 => 1.0E+228, - 229 => 1.0E+229, - 230 => 1.0E+230, - 231 => 1.0E+231, - 232 => 1.0E+232, - 233 => 1.0E+233, - 234 => 1.0E+234, - 235 => 1.0E+235, - 236 => 1.0E+236, - 237 => 1.0E+237, - 238 => 1.0E+238, - 239 => 1.0E+239, - 240 => 1.0E+240, - 241 => 1.0E+241, - 242 => 1.0E+242, - 243 => 1.0E+243, - 244 => 1.0E+244, - 245 => 1.0E+245, - 246 => 1.0E+246, - 247 => 1.0E+247, - 248 => 1.0E+248, - 249 => 1.0E+249, - 250 => 1.0E+250, - 251 => 1.0E+251, - 252 => 1.0E+252, - 253 => 1.0E+253, - 254 => 1.0E+254, - 255 => 1.0E+255, - 256 => 1.0E+256, - 257 => 1.0E+257, - 258 => 1.0E+258, - 259 => 1.0E+259, - 260 => 1.0E+260, - 261 => 1.0E+261, - 262 => 1.0E+262, - 263 => 1.0E+263, - 264 => 1.0E+264, - 265 => 1.0E+265, - 266 => 1.0E+266, - 267 => 1.0E+267, - 268 => 1.0E+268, - 269 => 1.0E+269, - 270 => 1.0E+270, - 271 => 1.0E+271, - 272 => 1.0E+272, - 273 => 1.0E+273, - 274 => 1.0E+274, - 275 => 1.0E+275, - 276 => 1.0E+276, - 277 => 1.0E+277, - 278 => 1.0E+278, - 279 => 1.0E+279, - 280 => 1.0E+280, - 281 => 1.0E+281, - 282 => 1.0E+282, - 283 => 1.0E+283, - 284 => 1.0E+284, - 285 => 1.0E+285, - 286 => 1.0E+286, - 287 => 1.0E+287, - 288 => 1.0E+288, - 289 => 1.0E+289, - 290 => 1.0E+290, - 291 => 1.0E+291, - 292 => 1.0E+292, - 293 => 1.0E+293, - 294 => 1.0E+294, - 295 => 1.0E+295, - 296 => 1.0E+296, - 297 => 1.0E+297, - 298 => 1.0E+298, - 299 => 1.0E+299, - 300 => 1.0E+300, - 301 => 1.0E+301, - 302 => 1.0E+302, - 303 => 1.0E+303, - 304 => 1.0E+304, - 305 => 1.0E+305, - 306 => 1.0E+306, - 307 => 1.0E+307, - 308 => 1.0E+308); + Maxpow : constant := Maxpow_Exact * 2; + -- 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))); end System.Powten_LFlt; diff --git a/gcc/ada/libgnat/s-powllf.ads b/gcc/ada/libgnat/s-powllf.ads index c5c42a1..b1f8ae9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -34,37 +34,70 @@ package System.Powten_LLF is pragma Pure; - Maxpow : constant := 22; - -- The number of entries in this table is chosen to include powers of ten - -- that are exactly representable with Long_Long_Float. Assuming that on - -- all targets we have 53 bits of mantissa for the type, the upper bound - -- is given by 53 * log 2 / log 5. If the scaling factor is greater than - -- Maxpow, it can be obtained by several multiplications, which is less - -- efficient than with a bigger table, but avoids anomalies at end points. + Maxpow_Exact : constant := + (if Long_Long_Float'Machine_Mantissa = 64 then 27 else 22); + -- Largest power of ten exactly representable with Long_Long_Float. It is + -- equal to floor (M * log 2 / log 5), when M is the size of the mantissa + -- assumed to be either 64 for IEEE Extended or 53 for IEEE Double. - Powten : constant array (0 .. Maxpow) of Long_Long_Float := - (00 => 1.0E+00, - 01 => 1.0E+01, - 02 => 1.0E+02, - 03 => 1.0E+03, - 04 => 1.0E+04, - 05 => 1.0E+05, - 06 => 1.0E+06, - 07 => 1.0E+07, - 08 => 1.0E+08, - 09 => 1.0E+09, - 10 => 1.0E+10, - 11 => 1.0E+11, - 12 => 1.0E+12, - 13 => 1.0E+13, - 14 => 1.0E+14, - 15 => 1.0E+15, - 16 => 1.0E+16, - 17 => 1.0E+17, - 18 => 1.0E+18, - 19 => 1.0E+19, - 20 => 1.0E+20, - 21 => 1.0E+21, - 22 => 1.0E+22); + Maxpow : constant := Maxpow_Exact * 2; + -- 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))); end System.Powten_LLF; diff --git a/gcc/ada/libgnat/s-purexc.ads b/gcc/ada/libgnat/s-purexc.ads index 4c727d7..6346f4f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-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- -- diff --git a/gcc/ada/libgnat/s-putima.adb b/gcc/ada/libgnat/s-putima.adb index 925c3b9..33960a4 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -29,10 +29,10 @@ -- -- ------------------------------------------------------------------------------ +with Ada.Strings.Text_Buffers.Utils; +use Ada.Strings.Text_Buffers; +use Ada.Strings.Text_Buffers.Utils; with Unchecked_Conversion; -with Ada.Strings.Text_Output.Utils; -use Ada.Strings.Text_Output; -use Ada.Strings.Text_Output.Utils; package body System.Put_Images is @@ -215,7 +215,7 @@ package body System.Put_Images is begin New_Line (S); Put_7bit (S, '['); - Indent (S, 1); + Increase_Indent (S, 1); end Array_Before; procedure Array_Between (S : in out Sink'Class) is @@ -226,7 +226,7 @@ package body System.Put_Images is procedure Array_After (S : in out Sink'Class) is begin - Outdent (S, 1); + Decrease_Indent (S, 1); Put_7bit (S, ']'); end Array_After; @@ -244,7 +244,7 @@ package body System.Put_Images is begin New_Line (S); Put_7bit (S, '('); - Indent (S, 1); + Increase_Indent (S, 1); end Record_Before; procedure Record_Between (S : in out Sink'Class) is @@ -255,7 +255,7 @@ package body System.Put_Images is procedure Record_After (S : in out Sink'Class) is begin - Outdent (S, 1); + Decrease_Indent (S, 1); Put_7bit (S, ')'); end Record_After; @@ -267,7 +267,7 @@ package body System.Put_Images is procedure Put_Image_Unknown (S : in out Sink'Class; Type_Name : String) is begin Put_UTF_8 (S, "{"); - Put_String (S, Type_Name); + Put (S, Type_Name); Put_UTF_8 (S, " object}"); end Put_Image_Unknown; diff --git a/gcc/ada/libgnat/s-putima.ads b/gcc/ada/libgnat/s-putima.ads index 1d2a11d..4a33e79 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -29,7 +29,7 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Strings.Text_Output; +with Ada.Strings.Text_Buffers; with System.Unsigned_Types; package System.Put_Images with Pure is @@ -50,7 +50,7 @@ package System.Put_Images with Pure is pragma Preelaborate; - subtype Sink is Ada.Strings.Text_Output.Sink; + subtype Sink is Ada.Strings.Text_Buffers.Root_Buffer_Type; procedure Put_Image_Integer (S : in out Sink'Class; X : Integer); procedure Put_Image_Long_Long_Integer diff --git a/gcc/ada/libgnat/s-rannum.adb b/gcc/ada/libgnat/s-rannum.adb index ab6428f..92a91a6 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-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- -- @@ -86,7 +86,6 @@ -- -- ------------------------------------------------------------------------------ -with Ada.Strings.Text_Output.Utils; with Ada.Unchecked_Conversion; with System.Random_Seed; @@ -178,7 +177,10 @@ is function Random (Gen : Generator) return Unsigned_32 is G : Generator renames Gen.Writable.Self.all; Y : State_Val; - I : Integer; -- should avoid use of identifier I ??? + I : Integer; + -- Naming exception: I is fine to use here as it is the name used in + -- the original paper describing the Mersenne Twister and in common + -- descriptions of the algorithm. begin I := G.I; @@ -686,9 +688,9 @@ is --------------- procedure Put_Image - (S : in out Strings.Text_Output.Sink'Class; V : State) is + (S : in out Strings.Text_Buffers.Root_Buffer_Type'Class; V : State) is begin - Strings.Text_Output.Utils.Put_String (S, Image (V)); + Strings.Text_Buffers.Put (S, Image (V)); end Put_Image; ----------- diff --git a/gcc/ada/libgnat/s-rannum.ads b/gcc/ada/libgnat/s-rannum.ads index 6cbba3e..99ed57d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-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- -- @@ -57,7 +57,7 @@ with Interfaces; -private with Ada.Strings.Text_Output; +private with Ada.Strings.Text_Buffers; package System.Random_Numbers with SPARK_Mode => Off @@ -148,7 +148,7 @@ private type State is array (0 .. N - 1) of State_Val with Put_Image => Put_Image; procedure Put_Image - (S : in out Ada.Strings.Text_Output.Sink'Class; V : State); + (S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : State); type Writable_Access (Self : access Generator) is limited null record; -- Auxiliary type to make Generator a self-referential type @@ -162,7 +162,9 @@ private I : Integer := N; -- Current starting position in shift register S (N means uninitialized) - -- We should avoid using the identifier I here ??? + -- Naming exception: I is fine to use here as it is the name used in the + -- original paper describing the Mersenne Twister and in common + -- descriptions of the algorithm. end record; end System.Random_Numbers; diff --git a/gcc/ada/libgnat/s-ransee.adb b/gcc/ada/libgnat/s-ransee.adb index 0c168df..b12ed0b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-ransee.ads b/gcc/ada/libgnat/s-ransee.ads index 559eaa0..9deef1a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-regexp.adb b/gcc/ada/libgnat/s-regexp.adb index f8adc4a..51ff39c 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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-regexp.ads b/gcc/ada/libgnat/s-regexp.ads index 243da67..3c57d99 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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 2e60ba8..7e33067 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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.ads b/gcc/ada/libgnat/s-regpat.ads index 0a591fd..b1a1366f 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-2020, AdaCore -- +-- Copyright (C) 1996-2021, 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-resfil.adb b/gcc/ada/libgnat/s-resfil.adb index 145aeb0..e37db4a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-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- -- diff --git a/gcc/ada/libgnat/s-resfil.ads b/gcc/ada/libgnat/s-resfil.ads index 369f2f4..63437ae 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-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- -- diff --git a/gcc/ada/libgnat/s-restri.adb b/gcc/ada/libgnat/s-restri.adb index 5c91d13..d1f261b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/s-restri.ads b/gcc/ada/libgnat/s-restri.ads index 221b83a..b46ae46 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-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- -- diff --git a/gcc/ada/libgnat/s-rident.ads b/gcc/ada/libgnat/s-rident.ads index c6c3d3d..10d374e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -103,6 +103,7 @@ package System.Rident is No_Direct_Boolean_Operators, -- GNAT No_Dispatch, -- (RM H.4(19)) No_Dispatching_Calls, -- GNAT + No_Dynamic_Accessibility_Checks, -- GNAT No_Dynamic_Attachment, -- Ada 2012 (RM E.7(10/3)) No_Dynamic_CPU_Assignment, -- Ada 202x (RM D.7(10/3)) No_Dynamic_Priorities, -- (RM D.9(9)) diff --git a/gcc/ada/libgnat/s-rpc.adb b/gcc/ada/libgnat/s-rpc.adb index f4c719f..1f501fe 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-rpc.ads b/gcc/ada/libgnat/s-rpc.ads index 7695b8f..e8927bd 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 5a88111..81394af 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- @@ -60,26 +60,17 @@ package body System.Scalar_Values is EFloat : constant Boolean := Long_Long_Float'Size > Long_Float'Size; -- Set True if we are on an x86 with 96-bit floats for extended - AFloat : constant Boolean := - Long_Float'Size = 48 and then Long_Long_Float'Size = 48; - -- Set True if we are on an AAMP with 48-bit extended floating point - - type ByteLF is array (0 .. 7 - 2 * Boolean'Pos (AFloat)) of Byte1; + type ByteLF is array (0 .. 7) of Byte1; for ByteLF'Component_Size use 8; - -- Type used to hold Long_Float values on all targets and to initialize - -- 48-bit Long_Float values used on AAMP. On AAMP, this type is 6 bytes. - -- On other targets the type is 8 bytes, and type Byte8 is used for - -- values that are then converted to ByteLF. + -- Type used to hold Long_Float values on all targets. On most targets + -- the type is 8 bytes, and type Byte8 is used for values that are then + -- converted to ByteLF. - pragma Warnings (Off); -- why ??? function To_ByteLF is new Ada.Unchecked_Conversion (Byte8, ByteLF); - pragma Warnings (On); - type ByteLLF is - array (0 .. 7 + 4 * Boolean'Pos (EFloat) - 2 * Boolean'Pos (AFloat)) - of Byte1; + type ByteLLF is array (0 .. 7 + 4 * Boolean'Pos (EFloat)) of Byte1; for ByteLLF'Component_Size use 8; @@ -186,16 +177,9 @@ package body System.Scalar_Values is IS_Iz4 := 16#0000_0000#; IS_Iz8 := 16#0000_0000_0000_0000#; - if AFloat then - IV_Isf := 16#FFFF_FF00#; - IV_Ifl := 16#FFFF_FF00#; - IV_Ilf := (0, 16#FF#, 16#FF#, 16#FF#, 16#FF#, 16#FF#); - - else - IV_Isf := IS_Iu4; - IV_Ifl := IS_Iu4; - IV_Ilf := To_ByteLF (IS_Iu8); - end if; + IV_Isf := IS_Iu4; + IV_Ifl := IS_Iu4; + 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); @@ -219,16 +203,9 @@ package body System.Scalar_Values is IS_Iz4 := 16#0000_0000#; IS_Iz8 := 16#0000_0000_0000_0000#; - if AFloat then - IV_Isf := 16#0000_0001#; - IV_Ifl := 16#0000_0001#; - IV_Ilf := (1, 0, 0, 0, 0, 0); - - else - IV_Isf := 16#FF80_0000#; - IV_Ifl := 16#FF80_0000#; - IV_Ilf := To_ByteLF (16#FFF0_0000_0000_0000#); - end if; + IV_Isf := 16#FF80_0000#; + IV_Ifl := 16#FF80_0000#; + 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); @@ -252,16 +229,9 @@ package body System.Scalar_Values is IS_Iz4 := 16#FFFF_FFFF#; IS_Iz8 := 16#FFFF_FFFF_FFFF_FFFF#; - if AFloat then - IV_Isf := 16#7FFF_FFFF#; - IV_Ifl := 16#7FFF_FFFF#; - IV_Ilf := (16#FF#, 16#FF#, 16#FF#, 16#FF#, 16#FF#, 16#7F#); - - else - IV_Isf := 16#7F80_0000#; - IV_Ifl := 16#7F80_0000#; - IV_Ilf := To_ByteLF (16#7FF0_0000_0000_0000#); - end if; + IV_Isf := 16#7F80_0000#; + IV_Ifl := 16#7F80_0000#; + 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); @@ -301,11 +271,7 @@ package body System.Scalar_Values is IV_Isf := IS_Is4; IV_Ifl := IS_Is4; - if AFloat then - IV_Ill := (B, B, B, B, B, B); - else - IV_Ilf := To_ByteLF (IS_Is8); - end if; + IV_Ilf := To_ByteLF (IS_Is8); if EFloat then IV_Ill := (B, B, B, B, B, B, B, B, B, B, B, B); @@ -317,7 +283,7 @@ package body System.Scalar_Values is if not EFloat then declare - pragma Warnings (Off); -- why??? + pragma Warnings (Off); -- because sizes don't match function To_ByteLLF is new Ada.Unchecked_Conversion (ByteLF, ByteLLF); pragma Warnings (On); diff --git a/gcc/ada/libgnat/s-scaval.ads b/gcc/ada/libgnat/s-scaval.ads index 6d13262..47de115 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-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- -- diff --git a/gcc/ada/libgnat/s-scaval__128.adb b/gcc/ada/libgnat/s-scaval__128.adb index 53110c2..7bb5696 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- @@ -60,26 +60,12 @@ package body System.Scalar_Values is EFloat : constant Boolean := Long_Long_Float'Size > Long_Float'Size; -- Set True if we are on an x86 with 96-bit floats for extended - AFloat : constant Boolean := - Long_Float'Size = 48 and then Long_Long_Float'Size = 48; - -- Set True if we are on an AAMP with 48-bit extended floating point - - type ByteLF is array (0 .. 7 - 2 * Boolean'Pos (AFloat)) of Byte1; + type ByteLF is array (0 .. 7) of Byte1; for ByteLF'Component_Size use 8; - - -- Type used to hold Long_Float values on all targets and to initialize - -- 48-bit Long_Float values used on AAMP. On AAMP, this type is 6 bytes. - -- On other targets the type is 8 bytes, and type Byte8 is used for - -- values that are then converted to ByteLF. - - pragma Warnings (Off); -- why ??? function To_ByteLF is new Ada.Unchecked_Conversion (Byte8, ByteLF); - pragma Warnings (On); - type ByteLLF is - array (0 .. 7 + 4 * Boolean'Pos (EFloat) - 2 * Boolean'Pos (AFloat)) - of Byte1; + type ByteLLF is array (0 .. 7 + 4 * Boolean'Pos (EFloat)) of Byte1; for ByteLLF'Component_Size use 8; @@ -189,16 +175,9 @@ package body System.Scalar_Values is IS_Iz8 := 16#0000_0000_0000_0000#; IS_Iz16 := 16#0000_0000_0000_0000_0000_0000_0000_0000#; - if AFloat then - IV_Isf := 16#FFFF_FF00#; - IV_Ifl := 16#FFFF_FF00#; - IV_Ilf := (0, 16#FF#, 16#FF#, 16#FF#, 16#FF#, 16#FF#); - - else - IV_Isf := IS_Iu4; - IV_Ifl := IS_Iu4; - IV_Ilf := To_ByteLF (IS_Iu8); - end if; + IV_Isf := IS_Iu4; + IV_Ifl := IS_Iu4; + 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); @@ -225,16 +204,9 @@ package body System.Scalar_Values is IS_Iz8 := 16#0000_0000_0000_0000#; IS_Iz16 := 16#0000_0000_0000_0000_0000_0000_0000_0000#; - if AFloat then - IV_Isf := 16#0000_0001#; - IV_Ifl := 16#0000_0001#; - IV_Ilf := (1, 0, 0, 0, 0, 0); - - else - IV_Isf := 16#FF80_0000#; - IV_Ifl := 16#FF80_0000#; - IV_Ilf := To_ByteLF (16#FFF0_0000_0000_0000#); - end if; + IV_Isf := 16#FF80_0000#; + IV_Ifl := 16#FF80_0000#; + 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); @@ -261,16 +233,9 @@ package body System.Scalar_Values is IS_Iz8 := 16#FFFF_FFFF_FFFF_FFFF#; IS_Iz16 := 16#FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF#; - if AFloat then - IV_Isf := 16#7FFF_FFFF#; - IV_Ifl := 16#7FFF_FFFF#; - IV_Ilf := (16#FF#, 16#FF#, 16#FF#, 16#FF#, 16#FF#, 16#7F#); - - else - IV_Isf := 16#7F80_0000#; - IV_Ifl := 16#7F80_0000#; - IV_Ilf := To_ByteLF (16#7FF0_0000_0000_0000#); - end if; + IV_Isf := 16#7F80_0000#; + IV_Ifl := 16#7F80_0000#; + 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); @@ -313,11 +278,7 @@ package body System.Scalar_Values is IV_Isf := IS_Is4; IV_Ifl := IS_Is4; - if AFloat then - IV_Ill := (B, B, B, B, B, B); - else - IV_Ilf := To_ByteLF (IS_Is8); - end if; + IV_Ilf := To_ByteLF (IS_Is8); if EFloat then IV_Ill := (B, B, B, B, B, B, B, B, B, B, B, B); @@ -329,7 +290,7 @@ package body System.Scalar_Values is if not EFloat then declare - pragma Warnings (Off); -- why??? + pragma Warnings (Off); -- because sizes don't match function To_ByteLLF is new Ada.Unchecked_Conversion (ByteLF, ByteLLF); pragma Warnings (On); diff --git a/gcc/ada/libgnat/s-scaval__128.ads b/gcc/ada/libgnat/s-scaval__128.ads index 8eb1b65..e96122b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-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- -- diff --git a/gcc/ada/libgnat/s-secsta.adb b/gcc/ada/libgnat/s-secsta.adb index f2d264d..db64c52 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-secsta.ads b/gcc/ada/libgnat/s-secsta.ads index 504c891..7d6b1b9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-sequio.adb b/gcc/ada/libgnat/s-sequio.adb index 03610e3..e314db4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-sequio.ads b/gcc/ada/libgnat/s-sequio.ads index 17ed929..e497760 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-shabig.ads b/gcc/ada/libgnat/s-shabig.ads index c4f6944..c1a7a3f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2012-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- -- diff --git a/gcc/ada/libgnat/s-shasto.adb b/gcc/ada/libgnat/s-shasto.adb index 0117344..a1f5a95 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-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- -- diff --git a/gcc/ada/libgnat/s-shasto.ads b/gcc/ada/libgnat/s-shasto.ads index 189b5e1..a76d3d9 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-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- -- diff --git a/gcc/ada/libgnat/s-soflin.adb b/gcc/ada/libgnat/s-soflin.adb index 48d1338..119bea1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-soflin.ads b/gcc/ada/libgnat/s-soflin.ads index d0caa79..4786262 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-soliin.adb b/gcc/ada/libgnat/s-soliin.adb index f5e4ba7..4fd335f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2017-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- -- diff --git a/gcc/ada/libgnat/s-soliin.ads b/gcc/ada/libgnat/s-soliin.ads index 2726702..4159a3a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2017-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- -- diff --git a/gcc/ada/libgnat/s-sopco3.adb b/gcc/ada/libgnat/s-sopco3.adb index 5953c06..94e2d38 100644 --- a/gcc/ada/libgnat/s-sopco3.adb +++ b/gcc/ada/libgnat/s-sopco3.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-sopco3.ads b/gcc/ada/libgnat/s-sopco3.ads index 9743938..92cdffb 100644 --- a/gcc/ada/libgnat/s-sopco3.ads +++ b/gcc/ada/libgnat/s-sopco3.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-sopco4.adb b/gcc/ada/libgnat/s-sopco4.adb index 5dae861..a8d0dd8 100644 --- a/gcc/ada/libgnat/s-sopco4.adb +++ b/gcc/ada/libgnat/s-sopco4.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-sopco4.ads b/gcc/ada/libgnat/s-sopco4.ads index 0e0f3a3..899c9f7 100644 --- a/gcc/ada/libgnat/s-sopco4.ads +++ b/gcc/ada/libgnat/s-sopco4.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-sopco5.adb b/gcc/ada/libgnat/s-sopco5.adb index 0acbf3b..e3ee0dc 100644 --- a/gcc/ada/libgnat/s-sopco5.adb +++ b/gcc/ada/libgnat/s-sopco5.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-sopco5.ads b/gcc/ada/libgnat/s-sopco5.ads index df233fc..5b032d1 100644 --- a/gcc/ada/libgnat/s-sopco5.ads +++ b/gcc/ada/libgnat/s-sopco5.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-spsufi.adb b/gcc/ada/libgnat/s-spsufi.adb index 6702ed1..ad34ff2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-spsufi.ads b/gcc/ada/libgnat/s-spsufi.ads index d8143ef..03d9639 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-stache.adb b/gcc/ada/libgnat/s-stache.adb index 7f55f17..e3ac368 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2021, 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-stache.ads b/gcc/ada/libgnat/s-stache.ads index 45d2da0..3e0662e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2021, 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-stalib.adb b/gcc/ada/libgnat/s-stalib.adb index 7c60013..ae62377 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-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- -- diff --git a/gcc/ada/libgnat/s-stalib.ads b/gcc/ada/libgnat/s-stalib.ads index b6258ed..fb6e992 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -86,44 +86,46 @@ package System.Standard_Library is -- The following record defines the underlying representation of exceptions - -- WARNING: Any changes to this may need to be reflected in the following + -- WARNING: Any change to the record needs to be reflected in the following -- locations in the compiler and runtime code: - -- 1. The Internal_Exception routine in s-exctab.adb - -- 2. The processing in gigi that tests Not_Handled_By_Others - -- 3. Expand_N_Exception_Declaration in Exp_Ch11 - -- 4. The construction of the exception type in Cstand + -- 1. The construction of the exception type in Cstand + -- 2. Expand_N_Exception_Declaration in Exp_Ch11 + -- 3. Expand_Pragma_Import_Or_Interface in Exp_Prag + -- 4. The processing in gigi that tests Not_Handled_By_Others + -- 5. The Internal_Exception routine in s-exctab.adb + -- 6. The declaration of the corresponding C type in raise.h type Exception_Data is record - Not_Handled_By_Others : Boolean; + Not_Handled_By_Others : aliased Boolean; -- Normally set False, indicating that the exception is handled in the -- usual way by others (i.e. an others handler handles the exception). -- Set True to indicate that this exception is not caught by others -- handlers, but must be explicitly named in a handler. This latter -- setting is currently used by the Abort_Signal. - Lang : Character; + Lang : aliased Character; -- A character indicating the language raising the exception. -- Set to "A" for exceptions defined by an Ada program. -- Set to "C" for imported C++ exceptions. - Name_Length : Natural; + Name_Length : aliased Natural; -- Length of fully expanded name of exception - Full_Name : System.Address; + Full_Name : aliased System.Address; -- Fully expanded name of exception, null terminated -- You can use To_Ptr to convert this to a string. - HTable_Ptr : Exception_Data_Ptr; + HTable_Ptr : aliased Exception_Data_Ptr; -- Hash table pointer used to link entries together in the hash table -- built (by Register_Exception in s-exctab.adb) for converting between -- identities and names. - Foreign_Data : Address; + Foreign_Data : aliased System.Address; -- Data for imported exceptions. Not used in the Ada case. This -- represents the address of the RTTI for the C++ case. - Raise_Hook : Raise_Action; + Raise_Hook : aliased Raise_Action; -- This field can be used to place a "hook" on an exception. If the -- value is non-null, then it points to a procedure which is called -- whenever the exception is raised. This call occurs immediately, diff --git a/gcc/ada/libgnat/s-statxd.adb b/gcc/ada/libgnat/s-statxd.adb index fcefae7..af88f7d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2021, 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- -- diff --git a/gcc/ada/libgnat/s-statxd.ads b/gcc/ada/libgnat/s-statxd.ads index cca5e54..e47eec1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-stausa.adb b/gcc/ada/libgnat/s-stausa.adb index e96dc7a..8bd6c5b 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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-stausa.ads b/gcc/ada/libgnat/s-stausa.ads index 8803237..2d7feee 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2021, 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.adb b/gcc/ada/libgnat/s-stchop.adb index 340d27b..16b8d26 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2021, 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 185301c..2b8acee 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2021, 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 7330676..28d6802 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2021, 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__rtems.adb b/gcc/ada/libgnat/s-stchop__rtems.adb index 56b1747..f273f29 100644 --- a/gcc/ada/libgnat/s-stchop__rtems.adb +++ b/gcc/ada/libgnat/s-stchop__rtems.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2021, 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 f277426..4146522 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2021, 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 69cb832..87c6d49 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-stoele.ads b/gcc/ada/libgnat/s-stoele.ads index 4abac8e..62e9ca8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2021, 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,7 @@ package System.Storage_Elements is +(2 ** (Integer'(Standard'Address_Size) - 1)) - Long_Long_Integer'(1); -- Note: the reason for the Long_Long_Integer qualification here is to -- avoid a bogus ambiguity when this unit is analyzed in an rtsfind - -- context. It may be possible to remove this in the future, but it is - -- certainly harmless in any case ??? + -- context. subtype Storage_Count is Storage_Offset range 0 .. Storage_Offset'Last; diff --git a/gcc/ada/libgnat/s-stopoo.adb b/gcc/ada/libgnat/s-stopoo.adb index a9590d4..0e38413 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/s-stopoo.ads b/gcc/ada/libgnat/s-stopoo.ads index b79a038f..5bfdca2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 ff61cfb..141d32b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-stposu.ads b/gcc/ada/libgnat/s-stposu.ads index 2653f3d..1441b24 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2021, 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 8fe2721..5f04153 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-stratt.ads b/gcc/ada/libgnat/s-stratt.ads index 965dff6..9e6d001 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-strcom.adb b/gcc/ada/libgnat/s-strcom.adb index e3167b4..5f0f9d2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-strcom.ads b/gcc/ada/libgnat/s-strcom.ads index b77d442..d4271ec 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-strhas.adb b/gcc/ada/libgnat/s-strhas.adb index 05c56ae..7974b02 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/s-strhas.ads b/gcc/ada/libgnat/s-strhas.ads index 07a5928..d81ce50 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/s-string.adb b/gcc/ada/libgnat/s-string.adb index f26f8d6..13a7d08 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-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- -- diff --git a/gcc/ada/libgnat/s-string.ads b/gcc/ada/libgnat/s-string.ads index c93e4e62..3f5ebf4 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-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- -- diff --git a/gcc/ada/libgnat/s-strops.adb b/gcc/ada/libgnat/s-strops.adb index 6458060..1644d85 100644 --- a/gcc/ada/libgnat/s-strops.adb +++ b/gcc/ada/libgnat/s-strops.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-strops.ads b/gcc/ada/libgnat/s-strops.ads index 9b6028a..f72baff 100644 --- a/gcc/ada/libgnat/s-strops.ads +++ b/gcc/ada/libgnat/s-strops.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-ststop.adb b/gcc/ada/libgnat/s-ststop.adb index cc2a352..c1f832a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-ststop.ads b/gcc/ada/libgnat/s-ststop.ads index 5f35fed..a19cdc8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/s-tasloc.adb b/gcc/ada/libgnat/s-tasloc.adb index 17fc3ce..b451d2c 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-2020, AdaCore -- +-- Copyright (C) 1997-2021, 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 1820107..d9a7de5 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-2020, AdaCore -- +-- Copyright (C) 1998-2021, 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-thread.ads b/gcc/ada/libgnat/s-thread.ads index a13e806..5d0a3c1 100644 --- a/gcc/ada/libgnat/s-thread.ads +++ b/gcc/ada/libgnat/s-thread.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-thread__ae653.adb b/gcc/ada/libgnat/s-thread__ae653.adb index fcf1304..ecbd415 100644 --- a/gcc/ada/libgnat/s-thread__ae653.adb +++ b/gcc/ada/libgnat/s-thread__ae653.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-traceb.adb b/gcc/ada/libgnat/s-traceb.adb index b2cb6d8..d43d757 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-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- -- diff --git a/gcc/ada/libgnat/s-traceb.ads b/gcc/ada/libgnat/s-traceb.ads index 094218c..21e8af2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-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- -- diff --git a/gcc/ada/libgnat/s-traceb__hpux.adb b/gcc/ada/libgnat/s-traceb__hpux.adb index 2d6b715..e5af76d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/s-traceb__mastop.adb b/gcc/ada/libgnat/s-traceb__mastop.adb index e24ec1b..e50bfdc 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 23d174f..a471ede 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-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- -- diff --git a/gcc/ada/libgnat/s-traent.ads b/gcc/ada/libgnat/s-traent.ads index 83ef569..a534dd8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2021, 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-trasym.adb b/gcc/ada/libgnat/s-trasym.adb index bfc3a98..5ed1816 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 fbeec8d..e24d109 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 78cbcc2..61e7a1c 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-2020, AdaCore -- +-- Copyright (C) 1999-2021, 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 64db59a..f8134ff 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-2020, AdaCore -- +-- Copyright (C) 2012-2021, 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 98c9992..400b7ad 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-2020, AdaCore -- +-- Copyright (C) 2012-2021, 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 b79a3fc..42ec175 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-2020, AdaCore -- +-- Copyright (C) 2012-2021, 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 86c5d7f..197fd24 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -48,9 +48,6 @@ package System.Unsigned_Types is type Long_Long_Unsigned is mod 2 ** Long_Long_Integer'Size; type Long_Long_Long_Unsigned is mod Max_Binary_Modulus; - type Float_Unsigned is mod 2 ** Float'Size; - -- Used in the implementation of Is_Negative intrinsic (see Exp_Intr) - type Packed_Byte is mod 2 ** 8; for Packed_Byte'Size use 8; pragma Universal_Aliasing (Packed_Byte); diff --git a/gcc/ada/libgnat/s-utf_32.adb b/gcc/ada/libgnat/s-utf_32.adb index a1346f3..4f5c749 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-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- -- diff --git a/gcc/ada/libgnat/s-utf_32.ads b/gcc/ada/libgnat/s-utf_32.ads index e3f0e00..def16be 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-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- -- diff --git a/gcc/ada/libgnat/s-vade128.ads b/gcc/ada/libgnat/s-vade128.ads index 8edc742..e96fa0d 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-vade32.ads b/gcc/ada/libgnat/s-vade32.ads index b86ae52..22888ad 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-vade64.ads b/gcc/ada/libgnat/s-vade64.ads index d3a5b4f..d52c139 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-vaen16.ads b/gcc/ada/libgnat/s-vaen16.ads new file mode 100644 index 0000000..6ea6071 --- /dev/null +++ b/gcc/ada/libgnat/s-vaen16.ads @@ -0,0 +1,61 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . V A L _ E N U M _ 1 6 -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 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. -- +-- -- +------------------------------------------------------------------------------ + +-- Instantiation of System.Value_N for enumeration types whose names table +-- has a length that fits in a 16-bit but not an 8-bit integer. + +with Interfaces; +with System.Value_N; + +package System.Val_Enum_16 is + pragma Preelaborate; + + package Impl is new Value_N (Interfaces.Integer_16); + + function Value_Enumeration_16 + (Names : String; + Indexes : System.Address; + Hash : Impl.Hash_Function_Ptr; + Num : Natural; + Str : String) + return Natural + renames Impl.Value_Enumeration; + + function Valid_Value_Enumeration_16 + (Names : String; + Indexes : System.Address; + Hash : Impl.Hash_Function_Ptr; + Num : Natural; + Str : String) + return Boolean + renames Impl.Valid_Value_Enumeration; + +end System.Val_Enum_16; diff --git a/gcc/ada/libgnat/s-vaen32.ads b/gcc/ada/libgnat/s-vaen32.ads new file mode 100644 index 0000000..e1a7644 --- /dev/null +++ b/gcc/ada/libgnat/s-vaen32.ads @@ -0,0 +1,61 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . V A L _ E N U M _ 3 2 -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 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. -- +-- -- +------------------------------------------------------------------------------ + +-- Instantiation of System.Value_N for enumeration types whose names table +-- has a length that fits in a 32-bit but not a 16-bit integer. + +with Interfaces; +with System.Value_N; + +package System.Val_Enum_32 is + pragma Preelaborate; + + package Impl is new Value_N (Interfaces.Integer_32); + + function Value_Enumeration_32 + (Names : String; + Indexes : System.Address; + Hash : Impl.Hash_Function_Ptr; + Num : Natural; + Str : String) + return Natural + renames Impl.Value_Enumeration; + + function Valid_Value_Enumeration_32 + (Names : String; + Indexes : System.Address; + Hash : Impl.Hash_Function_Ptr; + Num : Natural; + Str : String) + return Boolean + renames Impl.Valid_Value_Enumeration; + +end System.Val_Enum_32; diff --git a/gcc/ada/libgnat/s-vaenu8.ads b/gcc/ada/libgnat/s-vaenu8.ads new file mode 100644 index 0000000..395a969 --- /dev/null +++ b/gcc/ada/libgnat/s-vaenu8.ads @@ -0,0 +1,61 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- S Y S T E M . V A L _ E N U M _ 8 -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 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. -- +-- -- +------------------------------------------------------------------------------ + +-- Instantiation of System.Value_N for enumeration types whose names table +-- has a length that fits in an 8-bit integer. + +with Interfaces; +with System.Value_N; + +package System.Val_Enum_8 is + pragma Preelaborate; + + package Impl is new Value_N (Interfaces.Integer_8); + + function Value_Enumeration_8 + (Names : String; + Indexes : System.Address; + Hash : Impl.Hash_Function_Ptr; + Num : Natural; + Str : String) + return Natural + renames Impl.Value_Enumeration; + + function Valid_Value_Enumeration_8 + (Names : String; + Indexes : System.Address; + Hash : Impl.Hash_Function_Ptr; + Num : Natural; + Str : String) + return Boolean + renames Impl.Valid_Value_Enumeration; + +end System.Val_Enum_8; diff --git a/gcc/ada/libgnat/s-vafi128.ads b/gcc/ada/libgnat/s-vafi128.ads index 03fbe80..4961b96 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-vafi32.ads b/gcc/ada/libgnat/s-vafi32.ads index 6235a82..3a9c4ff 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-vafi64.ads b/gcc/ada/libgnat/s-vafi64.ads index 9f98df4..c5250db 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-valboo.adb b/gcc/ada/libgnat/s-valboo.adb index e31d2bf..4ec1e19 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valboo.ads b/gcc/ada/libgnat/s-valboo.ads index 94b81f9..2129c5ac 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valcha.adb b/gcc/ada/libgnat/s-valcha.adb index 70deb33..587cdbb 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valcha.ads b/gcc/ada/libgnat/s-valcha.ads index a33c032..ee3b037 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valflt.ads b/gcc/ada/libgnat/s-valflt.ads index 5806d58..04ffb71 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -32,8 +32,8 @@ -- This package contains routines for scanning real values for floating point -- type Float, for use in Text_IO.Float_IO and the Value attribute. -with Interfaces; with System.Powten_Flt; +with System.Unsigned_Types; with System.Val_Real; package System.Val_Flt is @@ -41,9 +41,9 @@ package System.Val_Flt is package Impl is new Val_Real (Float, - Interfaces.Unsigned_32, System.Powten_Flt.Maxpow, - System.Powten_Flt.Powten'Address); + System.Powten_Flt.Powten'Address, + Unsigned_Types.Unsigned); function Scan_Float (Str : String; diff --git a/gcc/ada/libgnat/s-valint.adb b/gcc/ada/libgnat/s-valint.adb index 983d2d1..b3f0e29 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valint.ads b/gcc/ada/libgnat/s-valint.ads index 8a3c55e..702f7442 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-vallfl.ads b/gcc/ada/libgnat/s-vallfl.ads index c612f75..71da12a 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -32,8 +32,8 @@ -- This package contains routines for scanning real values for floating point -- type Long_Float, for use in Text_IO.Float_IO and the Value attribute. -with Interfaces; with System.Powten_LFlt; +with System.Unsigned_Types; with System.Val_Real; package System.Val_LFlt is @@ -41,9 +41,9 @@ package System.Val_LFlt is package Impl is new Val_Real (Long_Float, - Interfaces.Unsigned_64, System.Powten_LFlt.Maxpow, - System.Powten_LFlt.Powten'Address); + System.Powten_LFlt.Powten'Address, + Unsigned_Types.Long_Long_Unsigned); function Scan_Long_Float (Str : String; diff --git a/gcc/ada/libgnat/s-valllf.ads b/gcc/ada/libgnat/s-valllf.ads index 46a311b..477ed4e 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -32,8 +32,8 @@ -- This package contains routines for scanning real values for floating point -- type Long_Long_Float, for use in Text_IO.Float_IO and the Value attribute. -with Interfaces; with System.Powten_LLF; +with System.Unsigned_Types; with System.Val_Real; package System.Val_LLF is @@ -41,9 +41,9 @@ package System.Val_LLF is package Impl is new Val_Real (Long_Long_Float, - Interfaces.Unsigned_64, System.Powten_LLF.Maxpow, - System.Powten_LLF.Powten'Address); + System.Powten_LLF.Powten'Address, + System.Unsigned_Types.Long_Long_Unsigned); function Scan_Long_Long_Float (Str : String; diff --git a/gcc/ada/libgnat/s-vallli.adb b/gcc/ada/libgnat/s-vallli.adb index eadab12..4963c11 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-vallli.ads b/gcc/ada/libgnat/s-vallli.ads index e53873e..f6527c2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valllli.ads b/gcc/ada/libgnat/s-valllli.ads index 9ab7161..88aedaf 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-vallllu.ads b/gcc/ada/libgnat/s-vallllu.ads index 34ce282..2a1957a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valllu.adb b/gcc/ada/libgnat/s-valllu.adb index 1afb632..67b6258 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valllu.ads b/gcc/ada/libgnat/s-valllu.ads index 5c0300c..c282bc3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valrea.adb b/gcc/ada/libgnat/s-valrea.adb index 0ac3846..bc5465c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -29,6 +29,7 @@ -- -- ------------------------------------------------------------------------------ +with System.Double_Real; with System.Float_Control; with System.Unsigned_Types; use System.Unsigned_Types; with System.Val_Util; use System.Val_Util; @@ -46,7 +47,7 @@ package body System.Val_Real is -- If the mantissa of the floating-point type is almost as large as the -- unsigned type, we do not have enough space for an extra digit in the -- unsigned type so we handle the extra digit separately, at the cost of - -- a potential roundoff error. + -- a bit more work in Integer_to_Real. Precision_Limit : constant Uns := (if Need_Extra then 2**Num'Machine_Mantissa - 1 else 2**Uns'Size - 1); @@ -76,6 +77,12 @@ package body System.Val_Real is 7 => 5836, 8 => 5461, 9 => 5168, 10 => 4932, 11 => 4736, 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; + + subtype Double_T is Double_Real.Double_T; + -- The double floating-point type + function Integer_to_Real (Str : String; Val : Uns; @@ -85,6 +92,9 @@ package body System.Val_Real is Minus : Boolean) return Num; -- Convert the real value from integer to real representation + function Large_Powten (Exp : Natural) return Double_T; + -- Return 10.0**Exp as a double number, where Exp > Maxpow + --------------------- -- Integer_to_Real -- --------------------- @@ -110,9 +120,8 @@ package body System.Val_Real is else raise Program_Error); -- Maximum exponent of the base that can fit in Num - B : constant Num := Num (Base); - R_Val : Num; + D_Val : Double_T; S : Integer := Scale; begin @@ -125,75 +134,151 @@ package body System.Val_Real is System.Float_Control.Reset; end if; - -- Do the conversion + -- Take into account the extra digit, i.e. do the two computations - R_Val := Num (Val); + -- (1) R_Val := R_Val * Num (B) + Num (Extra) + -- (2) S := S - 1 - -- Take into account the extra digit, if need be. In this case, the - -- three operands are exact, so using an FMA would be ideal. + -- In the first, the three operands are exact, so using an FMA would + -- be ideal, but we are most likely running on the x87 FPU, hence we + -- may not have one. That is why we turn the multiplication into an + -- iterated addition with exact error handling, so that we can do a + -- single rounding at the end. if Need_Extra and then Extra > 0 then - R_Val := R_Val * B + Num (Extra); - S := S - 1; + declare + B : Unsigned := Base; + Acc : Num := 0.0; + Err : Num := 0.0; + Fac : Num := Num (Val); + DS : Double_T; + + begin + loop + -- If B is odd, add one factor. Note that the accumulator is + -- never larger than the factor at this point (it is in fact + -- never larger than the factor minus the initial value). + + if B rem 2 /= 0 then + if Acc = 0.0 then + Acc := Fac; + else + DS := Double_Real.Quick_Two_Sum (Fac, Acc); + Acc := DS.Hi; + Err := Err + DS.Lo; + end if; + exit when B = 1; + end if; + + -- Now B is (morally) even, halve it and double the factor, + -- which is always an exact operation. + + B := B / 2; + Fac := Fac * 2.0; + end loop; + + -- Add Extra to the error, which are both small integers + + D_Val := Double_Real.Quick_Two_Sum (Acc, Err + Num (Extra)); + + S := S - 1; + end; + + -- Or else, if the Extra digit is zero, do the exact conversion + + elsif Need_Extra then + D_Val := Double_Real.To_Double (Num (Val)); + + -- Otherwise, the value contains more bits than the mantissa so do the + -- conversion in two steps. + + else + declare + Mask : constant Uns := 2**(Uns'Size - Num'Machine_Mantissa) - 1; + Hi : constant Uns := Val and not Mask; + Lo : constant Uns := Val and Mask; + + begin + if Hi = 0 then + D_Val := Double_Real.To_Double (Num (Lo)); + else + D_Val := Double_Real.Quick_Two_Sum (Num (Hi), Num (Lo)); + end if; + end; end if; - -- Compute the final value + -- Compute the final value by applying the scaling, if any + + if Val = 0 or else S = 0 then + R_Val := Double_Real.To_Single (D_Val); - if R_Val /= 0.0 and then S /= 0 then + else case Base is -- If the base is a power of two, we use the efficient Scaling -- attribute with an overflow check, if it is not 2, to catch -- ludicrous exponents that would result in an infinity or zero. when 2 => - R_Val := Num'Scaling (R_Val, S); + R_Val := Num'Scaling (Double_Real.To_Single (D_Val), S); when 4 => if Integer'First / 2 <= S and then S <= Integer'Last / 2 then S := S * 2; end if; - R_Val := Num'Scaling (R_Val, S); + R_Val := Num'Scaling (Double_Real.To_Single (D_Val), S); when 8 => if Integer'First / 3 <= S and then S <= Integer'Last / 3 then S := S * 3; end if; - R_Val := Num'Scaling (R_Val, S); + R_Val := Num'Scaling (Double_Real.To_Single (D_Val), S); when 16 => if Integer'First / 4 <= S and then S <= Integer'Last / 4 then S := S * 4; end if; - R_Val := Num'Scaling (R_Val, S); + R_Val := Num'Scaling (Double_Real.To_Single (D_Val), S); - -- If the base is 10, we use a table of powers for accuracy's sake + -- If the base is 10, use a double implementation for the sake + -- of accuracy, to be removed when exponentiation is improved. + + -- When the exponent is positive, we can do the computation + -- directly because, if the exponentiation overflows, then + -- the final value overflows as well. But when the exponent + -- is negative, we may need to do it in two steps to avoid + -- an artificial underflow. when 10 => declare - Powten : constant array (0 .. Maxpow) of Num; + Powten : constant array (0 .. Maxpow) of Double_T; pragma Import (Ada, Powten); for Powten'Address use Powten_Address; begin if S > 0 then - while S > Maxpow loop - R_Val := R_Val * Powten (Maxpow); - S := S - Maxpow; - end loop; - - R_Val := R_Val * Powten (S); + if S <= Maxpow then + D_Val := D_Val * Powten (S); + else + D_Val := D_Val * Large_Powten (S); + end if; else - while S < -Maxpow loop - R_Val := R_Val / Powten (Maxpow); - S := S + Maxpow; - end loop; - - R_Val := R_Val / Powten (-S); + if S < -Maxexp then + D_Val := D_Val / Large_Powten (Maxexp); + S := S + Maxexp; + end if; + + if S >= -Maxpow then + D_Val := D_Val / Powten (-S); + else + D_Val := D_Val / Large_Powten (-S); + end if; end if; + + R_Val := Double_Real.To_Single (D_Val); end; -- Implementation for other bases with exponentiation @@ -205,17 +290,24 @@ package body System.Val_Real is -- an artificial underflow. when others => - if S > 0 then - R_Val := R_Val * B ** S; + declare + B : constant Num := Num (Base); - else - if S < -Maxexp then - R_Val := R_Val / B ** Maxexp; - S := S + Maxexp; - end if; + begin + R_Val := Double_Real.To_Single (D_Val); - R_Val := R_Val / B ** (-S); - end if; + if S > 0 then + R_Val := R_Val * B ** S; + + else + if S < -Maxexp then + R_Val := R_Val / B ** Maxexp; + S := S + Maxexp; + end if; + + R_Val := R_Val / B ** (-S); + end if; + end; end case; end if; @@ -228,6 +320,34 @@ package body System.Val_Real is when Constraint_Error => Bad_Value (Str); end Integer_to_Real; + ------------------ + -- Large_Powten -- + ------------------ + + function Large_Powten (Exp : Natural) return Double_T is + Powten : constant array (0 .. Maxpow) of Double_T; + pragma Import (Ada, Powten); + for Powten'Address use Powten_Address; + + R : Double_T; + E : Natural; + + begin + pragma Assert (Exp > Maxpow); + + R := Powten (Maxpow); + E := Exp - Maxpow; + + while E > Maxpow loop + R := R * Powten (Maxpow); + E := E - Maxpow; + end loop; + + R := R * Powten (E); + + return R; + end Large_Powten; + --------------- -- Scan_Real -- --------------- diff --git a/gcc/ada/libgnat/s-valrea.ads b/gcc/ada/libgnat/s-valrea.ads index d6ade80..e2613e0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -36,12 +36,12 @@ generic type Num is digits <>; - type Uns is mod <>; - Maxpow : Positive; Powten_Address : System.Address; + type Uns is mod <>; + package System.Val_Real is pragma Preelaborate; diff --git a/gcc/ada/libgnat/s-valued.adb b/gcc/ada/libgnat/s-valued.adb index 8930752..100d870 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-valued.ads b/gcc/ada/libgnat/s-valued.ads index e27e171..54c34d1 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-valuef.adb b/gcc/ada/libgnat/s-valuef.adb index d13111a..5ac5ff6 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-valuef.ads b/gcc/ada/libgnat/s-valuef.ads index abd4817..968d0cd 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-valuei.adb b/gcc/ada/libgnat/s-valuei.adb index ac5a776..0ad66de 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valuei.ads b/gcc/ada/libgnat/s-valuei.ads index 13f4f8c..23dc8a8 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valenu.adb b/gcc/ada/libgnat/s-valuen.adb index daa9b43..ef613a2 100644 --- a/gcc/ada/libgnat/s-valenu.adb +++ b/gcc/ada/libgnat/s-valuen.adb @@ -2,11 +2,11 @@ -- -- -- GNAT COMPILER COMPONENTS -- -- -- --- S Y S T E M . V A L _ E N U M -- +-- S Y S T E M . V A L U E _ N -- -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 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- -- @@ -33,25 +33,39 @@ with Ada.Unchecked_Conversion; with System.Val_Util; use System.Val_Util; -package body System.Val_Enum is +package body System.Value_N is - ------------------------- - -- Value_Enumeration_8 -- - ------------------------- + function Value_Enumeration_Pos + (Names : String; + Indexes : System.Address; + Hash : Hash_Function_Ptr; + Num : Natural; + Str : String) + return Integer with Pure_Function; + -- Same as Value_Enumeration, except returns negative if Value_Enumeration + -- would raise Constraint_Error. - function Value_Enumeration_8 + --------------------------- + -- Value_Enumeration_Pos -- + --------------------------- + + function Value_Enumeration_Pos (Names : String; Indexes : System.Address; + Hash : Hash_Function_Ptr; Num : Natural; Str : String) - return Natural + return Integer is - F : Natural; - L : Natural; - S : String (Str'Range) := Str; - - type Natural_8 is range 0 .. 2 ** 7 - 1; - type Index_Table is array (Natural) of Natural_8; + F, L : Integer; + H : Natural; + S : String (Str'Range) := Str; + + subtype Names_Index is + Index_Type range Index_Type (Names'First) + .. Index_Type (Names'Last) + 1; + subtype Index is Natural range Natural'First .. Names'Length; + type Index_Table is array (Index) of Names_Index; type Index_Table_Ptr is access Index_Table; function To_Index_Table_Ptr is @@ -59,97 +73,83 @@ package body System.Val_Enum is IndexesT : constant Index_Table_Ptr := To_Index_Table_Ptr (Indexes); + pragma Assert (Num + 1 in IndexesT'Range); + begin Normalize_String (S, F, L); - for J in 0 .. Num loop - if Names - (Natural (IndexesT (J)) .. - Natural (IndexesT (J + 1)) - 1) = S (F .. L) - then - return J; + declare + Normal : String renames S (F .. L); + + begin + -- If we have a valid hash value, do a single lookup + + H := (if Hash /= null then Hash.all (Normal) else Natural'Last); + + if H /= Natural'Last then + if Names + (Natural (IndexesT (H)) .. + Natural (IndexesT (H + 1)) - 1) = Normal + then + return H; + end if; + + -- Otherwise do a linear search + + else + for J in 0 .. Num loop + if Names + (Natural (IndexesT (J)) .. + Natural (IndexesT (J + 1)) - 1) = Normal + then + return J; + end if; + end loop; end if; - end loop; + end; - Bad_Value (Str); - end Value_Enumeration_8; + return -1; + end Value_Enumeration_Pos; - -------------------------- - -- Value_Enumeration_16 -- - -------------------------- + ----------------------------- + -- Valid_Value_Enumeration -- + ----------------------------- - function Value_Enumeration_16 + function Valid_Value_Enumeration (Names : String; Indexes : System.Address; + Hash : Hash_Function_Ptr; Num : Natural; Str : String) - return Natural + return Boolean is - F : Natural; - L : Natural; - S : String (Str'Range) := Str; - - type Natural_16 is range 0 .. 2 ** 15 - 1; - type Index_Table is array (Natural) of Natural_16; - type Index_Table_Ptr is access Index_Table; - - function To_Index_Table_Ptr is - new Ada.Unchecked_Conversion (System.Address, Index_Table_Ptr); - - IndexesT : constant Index_Table_Ptr := To_Index_Table_Ptr (Indexes); - begin - Normalize_String (S, F, L); - - for J in 0 .. Num loop - if Names - (Natural (IndexesT (J)) .. - Natural (IndexesT (J + 1)) - 1) = S (F .. L) - then - return J; - end if; - end loop; + return Value_Enumeration_Pos (Names, Indexes, Hash, Num, Str) >= 0; + end Valid_Value_Enumeration; - Bad_Value (Str); - end Value_Enumeration_16; + ----------------------- + -- Value_Enumeration -- + ----------------------- - -------------------------- - -- Value_Enumeration_32 -- - -------------------------- - - function Value_Enumeration_32 + function Value_Enumeration (Names : String; Indexes : System.Address; + Hash : Hash_Function_Ptr; Num : Natural; Str : String) return Natural is - F : Natural; - L : Natural; - S : String (Str'Range) := Str; - - type Natural_32 is range 0 .. 2 ** 31 - 1; - type Index_Table is array (Natural) of Natural_32; - type Index_Table_Ptr is access Index_Table; - - function To_Index_Table_Ptr is - new Ada.Unchecked_Conversion (System.Address, Index_Table_Ptr); - - IndexesT : constant Index_Table_Ptr := To_Index_Table_Ptr (Indexes); + Result : constant Integer := + Value_Enumeration_Pos (Names, Indexes, Hash, Num, Str); begin - Normalize_String (S, F, L); - - for J in 0 .. Num loop - if Names - (Natural (IndexesT (J)) .. - Natural (IndexesT (J + 1)) - 1) = S (F .. L) - then - return J; - end if; - end loop; + -- The comparison eliminates the need for a range check on return - Bad_Value (Str); - end Value_Enumeration_32; + if Result < 0 then + Bad_Value (Str); + else + return Result; + end if; + end Value_Enumeration; -end System.Val_Enum; +end System.Value_N; diff --git a/gcc/ada/libgnat/s-valenu.ads b/gcc/ada/libgnat/s-valuen.ads index 97c197f..db8ad1d 100644 --- a/gcc/ada/libgnat/s-valenu.ads +++ b/gcc/ada/libgnat/s-valuen.ads @@ -2,11 +2,11 @@ -- -- -- GNAT COMPILER COMPONENTS -- -- -- --- S Y S T E M . V A L _ E N U M -- +-- S Y S T E M . V A L U E _ N -- -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 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- -- @@ -33,23 +33,31 @@ -- other than those in packages Standard and System. See unit Exp_Imgv for -- details of the format of constructed image tables. -package System.Val_Enum is +generic + + type Index_Type is range <>; + +package System.Value_N is pragma Preelaborate; - function Value_Enumeration_8 + type Hash_Function_Ptr is access function (S : String) return Natural; + + function Value_Enumeration (Names : String; Indexes : System.Address; + Hash : Hash_Function_Ptr; Num : Natural; Str : String) - return Natural; + return Natural with Inline; -- Used to compute Enum'Value (Str) where Enum is some enumeration type -- other than those defined in package Standard. Names is a string with -- a lower bound of 1 containing the characters of all the enumeration -- literals concatenated together in sequence. Indexes is the address - -- of an array of type array (0 .. N) of Natural_8, where N is the + -- of an array of type array (0 .. N) of Index_Type, where N is the -- number of enumeration literals in the type. The Indexes values are -- the starting subscript of each enumeration literal, indexed by Pos -- values, with an extra entry at the end containing Names'Length + 1. + -- The parameter Hash is a (perfect) hash function for Names and Indexes. -- The parameter Num is the value N - 1 (i.e. Enum'Pos (Enum'Last)). -- The reason that Indexes is passed by address is that the actual type -- is created on the fly by the expander. @@ -59,22 +67,16 @@ package System.Val_Enum is -- If the image is found in Names, then the corresponding Pos value is -- returned. If not, Constraint_Error is raised. - function Value_Enumeration_16 - (Names : String; - Indexes : System.Address; - Num : Natural; - Str : String) - return Natural; - -- Identical to Value_Enumeration_8 except that it handles types - -- using array (0 .. Num) of Natural_16 for the Indexes table. - - function Value_Enumeration_32 + function Valid_Value_Enumeration (Names : String; Indexes : System.Address; + Hash : Hash_Function_Ptr; Num : Natural; Str : String) - return Natural; - -- Identical to Value_Enumeration_8 except that it handles types - -- using array (0 .. Num) of Natural_32 for the Indexes table. + return Boolean with Inline; + -- Returns True if Str is a valid Image of some enumeration literal, False + -- otherwise. That is, returns False if and only if Value_Enumeration would + -- raise Constraint_Error. The parameters have the same meaning as for + -- Value_Enumeration. -end System.Val_Enum; +end System.Value_N; diff --git a/gcc/ada/libgnat/s-valuer.adb b/gcc/ada/libgnat/s-valuer.adb index 9e4de3e..ff78c4b 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- @@ -128,6 +128,8 @@ package body System.Value_R is Extra : in out Char_As_Digit; Base : Unsigned) is + pragma Assert (Base in 2 .. 16); + B : constant Uns := Uns (Base); begin @@ -259,7 +261,11 @@ package body System.Value_R is Scale := Scale - 1; else + Extra := 0; Precision_Limit_Reached := True; + if Round and then J = Trailing_Zeros then + Round_Extra (Digit, Value, Scale, Extra, Base); + end if; exit; end if; end loop; @@ -272,11 +278,16 @@ package body System.Value_R is Temp := Value * Uns (Base) + Uns (Digit); + -- Precision_Limit_Reached may have been set above + + if Precision_Limit_Reached then + null; + -- Check if Temp is larger than Precision_Limit, taking into -- account that Temp may wrap around when Precision_Limit is -- equal to the largest integer. - if Value <= Umax + elsif Value <= Umax or else (Value <= UmaxB and then ((Precision_Limit < Uns'Last and then Temp <= Precision_Limit) diff --git a/gcc/ada/libgnat/s-valuer.ads b/gcc/ada/libgnat/s-valuer.ads index a933859..a0103b8 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, Free Software Foundation, Inc. -- +-- Copyright (C) 2020-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- -- diff --git a/gcc/ada/libgnat/s-valueu.adb b/gcc/ada/libgnat/s-valueu.adb index 75bef07..b385a9b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valueu.ads b/gcc/ada/libgnat/s-valueu.ads index ad8256c..5dd8cd4 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valuns.adb b/gcc/ada/libgnat/s-valuns.adb index b710a9b..0d96d7b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valuns.ads b/gcc/ada/libgnat/s-valuns.ads index 84b7a7d..fb20913 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valuti.adb b/gcc/ada/libgnat/s-valuti.adb index 29042f7..31edc40 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -68,10 +68,10 @@ package body System.Val_Util is F := F + 1; end loop; - -- Check for case when the string contained no characters + -- Case of no nonspace characters found if F > L then - Bad_Value (S); + return; end if; -- Scan for trailing spaces diff --git a/gcc/ada/libgnat/s-valuti.ads b/gcc/ada/libgnat/s-valuti.ads index a453272..3d426d9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- @@ -45,9 +45,7 @@ package System.Val_Util is -- 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 -- their upper case equivalent except for character literals. If S consists - -- of entirely blanks then Constraint_Error is raised. - -- - -- Note: if S is the null string, F is set to S'First, L to S'Last + -- of entirely blanks (including when S = "") then we return with F > L. procedure Scan_Sign (Str : String; diff --git a/gcc/ada/libgnat/s-valwch.adb b/gcc/ada/libgnat/s-valwch.adb index 791171a..dd8e8ed 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-valwch.ads b/gcc/ada/libgnat/s-valwch.ads index a98d048..7a625e0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-veboop.adb b/gcc/ada/libgnat/s-veboop.adb index ed43ef2..da71bd2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-veboop.ads b/gcc/ada/libgnat/s-veboop.ads index 3570b65..6b41307 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-vector.ads b/gcc/ada/libgnat/s-vector.ads index 2fb1004..0e19651 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- diff --git a/gcc/ada/libgnat/s-vercon.adb b/gcc/ada/libgnat/s-vercon.adb index ab22726..1de56a7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-vercon.ads b/gcc/ada/libgnat/s-vercon.ads index b3ea028..e454d55 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wchcnv.adb b/gcc/ada/libgnat/s-wchcnv.adb index 4cc1ff9..8d95c6f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wchcnv.ads b/gcc/ada/libgnat/s-wchcnv.ads index a99eef8..1521692 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wchcon.adb b/gcc/ada/libgnat/s-wchcon.adb index 228aa45..e16b8b5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2005-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- -- diff --git a/gcc/ada/libgnat/s-wchcon.ads b/gcc/ada/libgnat/s-wchcon.ads index 897ab4e..3e82260 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wchjis.adb b/gcc/ada/libgnat/s-wchjis.adb index 977e3042..3eede0a 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wchjis.ads b/gcc/ada/libgnat/s-wchjis.ads index ba904d8..7470181 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wchstw.adb b/gcc/ada/libgnat/s-wchstw.adb index 9803b35..bef1040 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wchstw.ads b/gcc/ada/libgnat/s-wchstw.ads index 4ec34ce..55e3c37 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wchwts.adb b/gcc/ada/libgnat/s-wchwts.adb index 9bb9979..6afcb3f 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wchwts.ads b/gcc/ada/libgnat/s-wchwts.ads index 2b6b8c1..4ac4657 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widboo.adb b/gcc/ada/libgnat/s-widboo.adb index 0c549f9..dd3bafb 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widboo.ads b/gcc/ada/libgnat/s-widboo.ads index 4bef902..bc509e1 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widcha.adb b/gcc/ada/libgnat/s-widcha.adb index 710e60b..d2298b9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widcha.ads b/gcc/ada/libgnat/s-widcha.ads index eda2451..d4913a9 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widenu.adb b/gcc/ada/libgnat/s-widenu.adb index 20b7596..14096f3 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widenu.ads b/gcc/ada/libgnat/s-widenu.ads index 487485c..d969309 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widint.ads b/gcc/ada/libgnat/s-widint.ads index 6306277..f9b5eda 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widlli.adb b/gcc/ada/libgnat/s-widlli.adb index 65b1ab4..ea24ca5 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widlli.ads b/gcc/ada/libgnat/s-widlli.ads index a67050e..708dbdc 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widllli.ads b/gcc/ada/libgnat/s-widllli.ads index 80ab9d1..82a7e3d 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widlllu.ads b/gcc/ada/libgnat/s-widlllu.ads index 6f84837..018e740 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widllu.adb b/gcc/ada/libgnat/s-widllu.adb index 840f0a0..101eff2 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widllu.ads b/gcc/ada/libgnat/s-widllu.ads index e77eb55..ab7ec58 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widthi.adb b/gcc/ada/libgnat/s-widthi.adb index dee6068..2f2d5e0 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widthi.ads b/gcc/ada/libgnat/s-widthi.ads index 570ac20..37865b89 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widthu.adb b/gcc/ada/libgnat/s-widthu.adb index 2469e30..a91baec 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widthu.ads b/gcc/ada/libgnat/s-widthu.ads index 2861738..7b71119 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widuns.ads b/gcc/ada/libgnat/s-widuns.ads index d93d3e2..0528456 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widwch.adb b/gcc/ada/libgnat/s-widwch.adb index ed633d9..372650c 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-widwch.ads b/gcc/ada/libgnat/s-widwch.ads index 2ea340f..9db3fbf 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-win32.ads b/gcc/ada/libgnat/s-win32.ads index 0fcc6d6..9d1a7ef 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-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- -- diff --git a/gcc/ada/libgnat/s-winext.ads b/gcc/ada/libgnat/s-winext.ads index 3eff109..bfd5f38 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-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- -- diff --git a/gcc/ada/libgnat/s-wwdcha.adb b/gcc/ada/libgnat/s-wwdcha.adb index fde2280..e9eaaf7 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wwdcha.ads b/gcc/ada/libgnat/s-wwdcha.ads index 4d8668d..c01402b 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wwdenu.adb b/gcc/ada/libgnat/s-wwdenu.adb index 49c3101..6e3a458 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wwdenu.ads b/gcc/ada/libgnat/s-wwdenu.ads index ecc6389..e59366e 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wwdwch.adb b/gcc/ada/libgnat/s-wwdwch.adb index 34f9133..2339566 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/s-wwdwch.ads b/gcc/ada/libgnat/s-wwdwch.ads index e2af399..32a2a35 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-2020, Free Software Foundation, Inc. -- +-- 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- -- diff --git a/gcc/ada/libgnat/system-aix.ads b/gcc/ada/libgnat/system-aix.ads index db4579f..e9475c6 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 b306920..f5b1360 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 bc0b147..3a8bd13 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 c175224..527794f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 52e4a88..beecf72 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 0cc0dab..14f3525 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 ce1835c..e7ec01d 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 202bcac..160eb7e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 34f2752..e809334 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 2c638e5..f5deb2a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 9020c79..26e61d8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 dccf444..9a1429f 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 14b6bb3..4ccb45c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 db7f9e7..ade6c7c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2021, 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 d44bf1b..5170964 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 917b949..2ffab24 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 9e93e5e..fc25470 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 0ceeb96..be8fb5c 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 fd0e0c7..6ee142a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 29a650a..9e7fae1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 73c99c3..893536e 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 e2d9765..1002342 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2021, 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 3131895..b4e7f12 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2021, 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 3729e44..71d54ec 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 a6336a9..57e30bf 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 dca09dd..c083cb5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-sparc.ads b/gcc/ada/libgnat/system-solaris-sparc.ads index 1efc78f..5810a28 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 8dc46ed..e0ac9c5 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 592e25b..fe963d7 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 ac025ce..f95efd7 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 483881f..a51cfa8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 ac674bd..3cd5902 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 45a99f3..4f3b544 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 27f7707..b0ac2f8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-vthread.ads b/gcc/ada/libgnat/system-vxworks-e500-vthread.ads index f60fbcd..0857c67 100644 --- a/gcc/ada/libgnat/system-vxworks-e500-vthread.ads +++ b/gcc/ada/libgnat/system-vxworks-e500-vthread.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks e500 AE653 vThreads) -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 ec3de26..3e15ddc 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-ravenscar.ads b/gcc/ada/libgnat/system-vxworks-ppc-ravenscar.ads index e38ff3b..b918c18 100644 --- a/gcc/ada/libgnat/system-vxworks-ppc-ravenscar.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc-ravenscar.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks/HIE Ravenscar Version PPC) -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 b4277e2..0fc52d0 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 eeeca9b..dd31dad 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-vthread.ads b/gcc/ada/libgnat/system-vxworks-ppc-vthread.ads index 05d27d6..64f1303 100644 --- a/gcc/ada/libgnat/system-vxworks-ppc-vthread.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc-vthread.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks PPC AE653 vThreads) -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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.ads b/gcc/ada/libgnat/system-vxworks-ppc.ads index 9862f42..8f384e9 100644 --- a/gcc/ada/libgnat/system-vxworks-ppc.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 5 Version PPC) -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 b6eebb5..959a3b9 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 e6d31de..8c35743 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 960a7ed..0274581 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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-vthread.ads b/gcc/ada/libgnat/system-vxworks-x86-vthread.ads index f3f4037..3b78e7e 100644 --- a/gcc/ada/libgnat/system-vxworks-x86-vthread.ads +++ b/gcc/ada/libgnat/system-vxworks-x86-vthread.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 653 x86 vThreads) -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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.ads b/gcc/ada/libgnat/system-vxworks-x86.ads index 55bc3f6..6f952a2 100644 --- a/gcc/ada/libgnat/system-vxworks-x86.ads +++ b/gcc/ada/libgnat/system-vxworks-x86.ads @@ -7,7 +7,7 @@ -- S p e c -- -- (VxWorks 5 Version x86) -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 0624ffa..cf1b138 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 1491332..82ebc60 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 d7da53d..3642075 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 483881f..a51cfa8 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 e697629..37fa0ef 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 6388628..2402795 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 69a0a66..4378e28 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 82c5d3a..2a9a2d7 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 d34d632..d8fbbee 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 404da85..6a2c35a 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 05a51d9..b71a3a9 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 e55de8c..429bbd2 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 b3659a3..883a749 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 8c2d527..c010ae9 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 f6528ba..8a36aa1 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 fc4655f..0225112 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 2bc8e6a..3be0ffb 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-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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 -- |