public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITTED 01/31] ada: Add new Mingw task priority mapping
@ 2024-05-21  7:30 Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 02/31] ada: Follow-up fix to previous change for Text_Ptr Marc Poulhiès
                   ` (29 more replies)
  0 siblings, 30 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Justin Squirek

From: Justin Squirek <squirek@adacore.com>

This patch adds a new mapping (Non_FIFO_Underlying_Priorities) for dynamically
setting task priorities in Windows when pragma Task_Dispatching_Policy
(FIFO_Within_Priorities) is not present. Additionally, it documents the
requirement to specify the pragma in order to use Set_Priority in the general
case.

gcc/ada/

	* doc/gnat_ugn/platform_specific_information.rst: Add note about
	different priority level granularities under different policies in
	Windows and move POSIX related info into new section.
	* libgnarl/s-taprop.ads: Add note about Task_Dispatching_Policy.
	* libgnarl/s-taprop__mingw.adb:
	(Set_Priority): Add use of Non_FIFO_Underlying_Priorities.
	* libgnat/system-mingw.ads: Add documentation for modifying
	priority mappings and add alternative mapping
	Non_FIFO_Underlying_Priorities.
	* gnat_ugn.texi: Regenerate.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 .../platform_specific_information.rst         | 117 +++---
 gcc/ada/gnat_ugn.texi                         | 359 +++++++++---------
 gcc/ada/libgnarl/s-taprop.ads                 |   9 +
 gcc/ada/libgnarl/s-taprop__mingw.adb          |   5 +-
 gcc/ada/libgnat/system-mingw.ads              |  27 +-
 5 files changed, 289 insertions(+), 228 deletions(-)

diff --git a/gcc/ada/doc/gnat_ugn/platform_specific_information.rst b/gcc/ada/doc/gnat_ugn/platform_specific_information.rst
index 3744b742f8e..7eeb6c2c396 100644
--- a/gcc/ada/doc/gnat_ugn/platform_specific_information.rst
+++ b/gcc/ada/doc/gnat_ugn/platform_specific_information.rst
@@ -171,57 +171,6 @@ Selecting another run-time library temporarily can be
 achieved by using the :switch:`--RTS` switch, e.g., :switch:`--RTS=sjlj`
 
 
-.. _Choosing_the_Scheduling_Policy:
-
-.. index:: SCHED_FIFO scheduling policy
-.. index:: SCHED_RR scheduling policy
-.. index:: SCHED_OTHER scheduling policy
-
-Choosing the Scheduling Policy
-------------------------------
-
-When using a POSIX threads implementation, you have a choice of several
-scheduling policies: ``SCHED_FIFO``, ``SCHED_RR`` and ``SCHED_OTHER``.
-
-Typically, the default is ``SCHED_OTHER``, while using ``SCHED_FIFO``
-or ``SCHED_RR`` requires special (e.g., root) privileges.
-
-.. index:: pragma Time_Slice
-.. index:: -T0 option
-.. index:: pragma Task_Dispatching_Policy
-
-
-By default, GNAT uses the ``SCHED_OTHER`` policy. To specify
-``SCHED_FIFO``,
-you can use one of the following:
-
-* ``pragma Time_Slice (0.0)``
-* the corresponding binder option :switch:`-T0`
-* ``pragma Task_Dispatching_Policy (FIFO_Within_Priorities)``
-
-
-To specify ``SCHED_RR``,
-you should use ``pragma Time_Slice`` with a
-value greater than 0.0, or else use the corresponding :switch:`-T`
-binder option.
-
-
-To make sure a program is running as root, you can put something like
-this in a library package body in your application:
-
-  .. code-block:: ada
-
-     function geteuid return Integer;
-     pragma Import (C, geteuid, "geteuid");
-     Ignore : constant Boolean :=
-       (if geteuid = 0 then True else raise Program_Error with "must be root");
-
-It gets the effective user id, and if it's not 0 (i.e. root), it raises
-Program_Error. Note that if you re running the code in a container, this may
-not be sufficient, as you may have sufficient priviledge on the container,
-but not on the host machine running the container, so check that you also
-have sufficient priviledge for running the container image.
-
 .. index:: Linux
 .. index:: GNU/Linux
 
@@ -296,6 +245,55 @@ drop the :samp:`-no-pie` workaround, you'll need to get the identified
 dependencies rebuilt with PIE enabled (compiled with :samp:`-fPIE`
 and linked with :samp:`-pie`).
 
+.. _Choosing_the_Scheduling_Policy_With_GNU_Linux:
+
+.. index:: SCHED_FIFO scheduling policy
+.. index:: SCHED_RR scheduling policy
+.. index:: SCHED_OTHER scheduling policy
+
+Choosing the Scheduling Policy with GNU/Linux
+---------------------------------------------
+
+When using a POSIX threads implementation, you have a choice of several
+scheduling policies: ``SCHED_FIFO``, ``SCHED_RR`` and ``SCHED_OTHER``.
+
+Typically, the default is ``SCHED_OTHER``, while using ``SCHED_FIFO``
+or ``SCHED_RR`` requires special (e.g., root) privileges.
+
+.. index:: pragma Time_Slice
+.. index:: -T0 option
+.. index:: pragma Task_Dispatching_Policy
+
+
+By default, GNAT uses the ``SCHED_OTHER`` policy. To specify
+``SCHED_FIFO``,
+you can use one of the following:
+
+* ``pragma Time_Slice (0.0)``
+* the corresponding binder option :switch:`-T0`
+* ``pragma Task_Dispatching_Policy (FIFO_Within_Priorities)``
+
+To specify ``SCHED_RR``,
+you should use ``pragma Time_Slice`` with a
+value greater than 0.0, or else use the corresponding :switch:`-T`
+binder option.
+
+To make sure a program is running as root, you can put something like
+this in a library package body in your application:
+
+  .. code-block:: ada
+
+     function geteuid return Integer;
+     pragma Import (C, geteuid, "geteuid");
+     Ignore : constant Boolean :=
+       (if geteuid = 0 then True else raise Program_Error with "must be root");
+
+It gets the effective user id, and if it's not 0 (i.e. root), it raises
+Program_Error. Note that if you re running the code in a container, this may
+not be sufficient, as you may have sufficient priviledge on the container,
+but not on the host machine running the container, so check that you also
+have sufficient priviledge for running the container image.
+
 .. _A_GNU_Linux_debug_quirk:
 
 A GNU/Linux Debug Quirk
@@ -534,6 +532,23 @@ and::
 
    Ada.Command_Line.Argument (1) -> "'*.txt'"
 
+.. _Choosing_the_Scheduling_Policy_With_Windows:
+
+Choosing the Scheduling Policy with Windows
+-------------------------------------------
+
+Under Windows, the standard 31 priorities of the Ada model are mapped onto 
+Window's seven standard priority levels by default: Idle, Lowest, Below Normal,
+Normal, Above Normal,
+
+When using the ``FIFO_Within_Priorities`` task dispatching policy, GNAT
+will assign the ``REALTIME_PRIORITY_CLASS`` priority class to the application 
+and map the Ada priority range to the sixteen priorities made available under 
+``REALTIME_PRIORITY_CLASS``. 
+
+For details on the values of the different priority mappings, see declarations
+in :file:`system.ads`. For more information about Windows priorities, please 
+refer to Microsoft's documentation.
 
 Windows Socket Timeouts
 -----------------------
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index ebc10288c20..43251ba3f1c 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -425,14 +425,11 @@ Run-Time Libraries
 
 * Summary of Run-Time Configurations:: 
 
-Specifying a Run-Time Library
-
-* Choosing the Scheduling Policy:: 
-
 GNU/Linux Topics
 
 * Required Packages on GNU/Linux:: 
 * Position Independent Executable (PIE) Enabled by Default on Linux: Position Independent Executable PIE Enabled by Default on Linux. 
+* Choosing the Scheduling Policy with GNU/Linux:: 
 * A GNU/Linux Debug Quirk:: 
 
 Microsoft Windows Topics
@@ -442,6 +439,7 @@ Microsoft Windows Topics
 * CONSOLE and WINDOWS subsystems:: 
 * Temporary Files:: 
 * Disabling Command Line Argument Expansion:: 
+* Choosing the Scheduling Policy with Windows:: 
 * Windows Socket Timeouts:: 
 * Mixed-Language Programming on Windows:: 
 * Windows Specific Add-Ons:: 
@@ -22913,82 +22911,13 @@ Alternatively, you can specify @code{rts-sjlj/adainclude} in the file
 
 Selecting another run-time library temporarily can be
 achieved by using the @code{--RTS} switch, e.g., @code{--RTS=sjlj}
-@anchor{gnat_ugn/platform_specific_information choosing-the-scheduling-policy}@anchor{1bb}
-@geindex SCHED_FIFO scheduling policy
-
-@geindex SCHED_RR scheduling policy
-
-@geindex SCHED_OTHER scheduling policy
-
-@menu
-* Choosing the Scheduling Policy:: 
-
-@end menu
-
-@node Choosing the Scheduling Policy,,,Specifying a Run-Time Library
-@anchor{gnat_ugn/platform_specific_information id5}@anchor{1bc}
-@subsection Choosing the Scheduling Policy
-
-
-When using a POSIX threads implementation, you have a choice of several
-scheduling policies: @code{SCHED_FIFO}, @code{SCHED_RR} and @code{SCHED_OTHER}.
-
-Typically, the default is @code{SCHED_OTHER}, while using @code{SCHED_FIFO}
-or @code{SCHED_RR} requires special (e.g., root) privileges.
-
-@geindex pragma Time_Slice
-
-@geindex -T0 option
-
-@geindex pragma Task_Dispatching_Policy
-
-By default, GNAT uses the @code{SCHED_OTHER} policy. To specify
-@code{SCHED_FIFO},
-you can use one of the following:
-
-
-@itemize *
-
-@item 
-@code{pragma Time_Slice (0.0)}
-
-@item 
-the corresponding binder option @code{-T0}
-
-@item 
-@code{pragma Task_Dispatching_Policy (FIFO_Within_Priorities)}
-@end itemize
-
-To specify @code{SCHED_RR},
-you should use @code{pragma Time_Slice} with a
-value greater than 0.0, or else use the corresponding @code{-T}
-binder option.
-
-To make sure a program is running as root, you can put something like
-this in a library package body in your application:
-
-@quotation
-
-@example
-function geteuid return Integer;
-pragma Import (C, geteuid, "geteuid");
-Ignore : constant Boolean :=
-  (if geteuid = 0 then True else raise Program_Error with "must be root");
-@end example
-@end quotation
-
-It gets the effective user id, and if it’s not 0 (i.e. root), it raises
-Program_Error. Note that if you re running the code in a container, this may
-not be sufficient, as you may have sufficient priviledge on the container,
-but not on the host machine running the container, so check that you also
-have sufficient priviledge for running the container image.
 
 @geindex Linux
 
 @geindex GNU/Linux
 
 @node GNU/Linux Topics,Microsoft Windows Topics,Specifying a Run-Time Library,Platform-Specific Information
-@anchor{gnat_ugn/platform_specific_information gnu-linux-topics}@anchor{1bd}@anchor{gnat_ugn/platform_specific_information id6}@anchor{1be}
+@anchor{gnat_ugn/platform_specific_information gnu-linux-topics}@anchor{1bb}@anchor{gnat_ugn/platform_specific_information id5}@anchor{1bc}
 @section GNU/Linux Topics
 
 
@@ -22997,12 +22926,13 @@ This section describes topics that are specific to GNU/Linux platforms.
 @menu
 * Required Packages on GNU/Linux:: 
 * Position Independent Executable (PIE) Enabled by Default on Linux: Position Independent Executable PIE Enabled by Default on Linux. 
+* Choosing the Scheduling Policy with GNU/Linux:: 
 * A GNU/Linux Debug Quirk:: 
 
 @end menu
 
 @node Required Packages on GNU/Linux,Position Independent Executable PIE Enabled by Default on Linux,,GNU/Linux Topics
-@anchor{gnat_ugn/platform_specific_information id7}@anchor{1bf}@anchor{gnat_ugn/platform_specific_information required-packages-on-gnu-linux}@anchor{1c0}
+@anchor{gnat_ugn/platform_specific_information id6}@anchor{1bd}@anchor{gnat_ugn/platform_specific_information required-packages-on-gnu-linux}@anchor{1be}
 @subsection Required Packages on GNU/Linux
 
 
@@ -23038,8 +22968,8 @@ Debian, Ubuntu: @code{libc6:i386}, @code{libc6-dev:i386}, @code{lib32ncursesw5}
 Other GNU/Linux distributions might be choosing a different name
 for those packages.
 
-@node Position Independent Executable PIE Enabled by Default on Linux,A GNU/Linux Debug Quirk,Required Packages on GNU/Linux,GNU/Linux Topics
-@anchor{gnat_ugn/platform_specific_information pie-enabled-by-default-on-linux}@anchor{1c1}@anchor{gnat_ugn/platform_specific_information position-independent-executable-pie-enabled-by-default-on-linux}@anchor{1c2}
+@node Position Independent Executable PIE Enabled by Default on Linux,Choosing the Scheduling Policy with GNU/Linux,Required Packages on GNU/Linux,GNU/Linux Topics
+@anchor{gnat_ugn/platform_specific_information pie-enabled-by-default-on-linux}@anchor{1bf}@anchor{gnat_ugn/platform_specific_information position-independent-executable-pie-enabled-by-default-on-linux}@anchor{1c0}
 @subsection Position Independent Executable (PIE) Enabled by Default on Linux
 
 
@@ -23081,8 +23011,72 @@ From there, to be able to link your binaries with PIE and therefore
 drop the @code{-no-pie} workaround, you’ll need to get the identified
 dependencies rebuilt with PIE enabled (compiled with @code{-fPIE}
 and linked with @code{-pie}).
+@anchor{gnat_ugn/platform_specific_information choosing-the-scheduling-policy-with-gnu-linux}@anchor{1c1}
+@geindex SCHED_FIFO scheduling policy
+
+@geindex SCHED_RR scheduling policy
+
+@geindex SCHED_OTHER scheduling policy
+
+@node Choosing the Scheduling Policy with GNU/Linux,A GNU/Linux Debug Quirk,Position Independent Executable PIE Enabled by Default on Linux,GNU/Linux Topics
+@anchor{gnat_ugn/platform_specific_information id7}@anchor{1c2}
+@subsection Choosing the Scheduling Policy with GNU/Linux
+
+
+When using a POSIX threads implementation, you have a choice of several
+scheduling policies: @code{SCHED_FIFO}, @code{SCHED_RR} and @code{SCHED_OTHER}.
+
+Typically, the default is @code{SCHED_OTHER}, while using @code{SCHED_FIFO}
+or @code{SCHED_RR} requires special (e.g., root) privileges.
+
+@geindex pragma Time_Slice
+
+@geindex -T0 option
 
-@node A GNU/Linux Debug Quirk,,Position Independent Executable PIE Enabled by Default on Linux,GNU/Linux Topics
+@geindex pragma Task_Dispatching_Policy
+
+By default, GNAT uses the @code{SCHED_OTHER} policy. To specify
+@code{SCHED_FIFO},
+you can use one of the following:
+
+
+@itemize *
+
+@item 
+@code{pragma Time_Slice (0.0)}
+
+@item 
+the corresponding binder option @code{-T0}
+
+@item 
+@code{pragma Task_Dispatching_Policy (FIFO_Within_Priorities)}
+@end itemize
+
+To specify @code{SCHED_RR},
+you should use @code{pragma Time_Slice} with a
+value greater than 0.0, or else use the corresponding @code{-T}
+binder option.
+
+To make sure a program is running as root, you can put something like
+this in a library package body in your application:
+
+@quotation
+
+@example
+function geteuid return Integer;
+pragma Import (C, geteuid, "geteuid");
+Ignore : constant Boolean :=
+  (if geteuid = 0 then True else raise Program_Error with "must be root");
+@end example
+@end quotation
+
+It gets the effective user id, and if it’s not 0 (i.e. root), it raises
+Program_Error. Note that if you re running the code in a container, this may
+not be sufficient, as you may have sufficient priviledge on the container,
+but not on the host machine running the container, so check that you also
+have sufficient priviledge for running the container image.
+
+@node A GNU/Linux Debug Quirk,,Choosing the Scheduling Policy with GNU/Linux,GNU/Linux Topics
 @anchor{gnat_ugn/platform_specific_information a-gnu-linux-debug-quirk}@anchor{1c3}@anchor{gnat_ugn/platform_specific_information id8}@anchor{1c4}
 @subsection A GNU/Linux Debug Quirk
 
@@ -23117,6 +23111,7 @@ platforms.
 * CONSOLE and WINDOWS subsystems:: 
 * Temporary Files:: 
 * Disabling Command Line Argument Expansion:: 
+* Choosing the Scheduling Policy with Windows:: 
 * Windows Socket Timeouts:: 
 * Mixed-Language Programming on Windows:: 
 * Windows Specific Add-Ons:: 
@@ -23291,7 +23286,7 @@ file will be created. This is particularly useful in networked
 environments where you may not have write access to some
 directories.
 
-@node Disabling Command Line Argument Expansion,Windows Socket Timeouts,Temporary Files,Microsoft Windows Topics
+@node Disabling Command Line Argument Expansion,Choosing the Scheduling Policy with Windows,Temporary Files,Microsoft Windows Topics
 @anchor{gnat_ugn/platform_specific_information disabling-command-line-argument-expansion}@anchor{1cf}
 @subsection Disabling Command Line Argument Expansion
 
@@ -23362,8 +23357,26 @@ and:
 Ada.Command_Line.Argument (1) -> "'*.txt'"
 @end example
 
-@node Windows Socket Timeouts,Mixed-Language Programming on Windows,Disabling Command Line Argument Expansion,Microsoft Windows Topics
-@anchor{gnat_ugn/platform_specific_information windows-socket-timeouts}@anchor{1d0}
+@node Choosing the Scheduling Policy with Windows,Windows Socket Timeouts,Disabling Command Line Argument Expansion,Microsoft Windows Topics
+@anchor{gnat_ugn/platform_specific_information choosing-the-scheduling-policy-with-windows}@anchor{1d0}@anchor{gnat_ugn/platform_specific_information id14}@anchor{1d1}
+@subsection Choosing the Scheduling Policy with Windows
+
+
+Under Windows, the standard 31 priorities of the Ada model are mapped onto
+Window’s seven standard priority levels by default: Idle, Lowest, Below Normal,
+Normal, Above Normal,
+
+When using the @code{FIFO_Within_Priorities} task dispatching policy, GNAT
+will assign the @code{REALTIME_PRIORITY_CLASS} priority class to the application
+and map the Ada priority range to the sixteen priorities made available under
+@code{REALTIME_PRIORITY_CLASS}.
+
+For details on the values of the different priority mappings, see declarations
+in @code{system.ads}. For more information about Windows priorities, please
+refer to Microsoft’s documentation.
+
+@node Windows Socket Timeouts,Mixed-Language Programming on Windows,Choosing the Scheduling Policy with Windows,Microsoft Windows Topics
+@anchor{gnat_ugn/platform_specific_information windows-socket-timeouts}@anchor{1d2}
 @subsection Windows Socket Timeouts
 
 
@@ -23409,7 +23422,7 @@ shorter than 500 ms is needed on these Windows versions, a call to
 Check_Selector should be added before any socket read or write operations.
 
 @node Mixed-Language Programming on Windows,Windows Specific Add-Ons,Windows Socket Timeouts,Microsoft Windows Topics
-@anchor{gnat_ugn/platform_specific_information id14}@anchor{1d1}@anchor{gnat_ugn/platform_specific_information mixed-language-programming-on-windows}@anchor{1d2}
+@anchor{gnat_ugn/platform_specific_information id15}@anchor{1d3}@anchor{gnat_ugn/platform_specific_information mixed-language-programming-on-windows}@anchor{1d4}
 @subsection Mixed-Language Programming on Windows
 
 
@@ -23431,12 +23444,12 @@ to use the Microsoft tools for your C++ code, you have two choices:
 Encapsulate your C++ code in a DLL to be linked with your Ada
 application. In this case, use the Microsoft or whatever environment to
 build the DLL and use GNAT to build your executable
-(@ref{1d3,,Using DLLs with GNAT}).
+(@ref{1d5,,Using DLLs with GNAT}).
 
 @item 
 Or you can encapsulate your Ada code in a DLL to be linked with the
 other part of your application. In this case, use GNAT to build the DLL
-(@ref{1d4,,Building DLLs with GNAT Project files}) and use the Microsoft
+(@ref{1d6,,Building DLLs with GNAT Project files}) and use the Microsoft
 or whatever environment to build your executable.
 @end itemize
 
@@ -23493,7 +23506,7 @@ native SEH support is used.
 @end menu
 
 @node Windows Calling Conventions,Introduction to Dynamic Link Libraries DLLs,,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information id15}@anchor{1d5}@anchor{gnat_ugn/platform_specific_information windows-calling-conventions}@anchor{1d6}
+@anchor{gnat_ugn/platform_specific_information id16}@anchor{1d7}@anchor{gnat_ugn/platform_specific_information windows-calling-conventions}@anchor{1d8}
 @subsubsection Windows Calling Conventions
 
 
@@ -23538,7 +23551,7 @@ are available for Windows:
 @end menu
 
 @node C Calling Convention,Stdcall Calling Convention,,Windows Calling Conventions
-@anchor{gnat_ugn/platform_specific_information c-calling-convention}@anchor{1d7}@anchor{gnat_ugn/platform_specific_information id16}@anchor{1d8}
+@anchor{gnat_ugn/platform_specific_information c-calling-convention}@anchor{1d9}@anchor{gnat_ugn/platform_specific_information id17}@anchor{1da}
 @subsubsection @code{C} Calling Convention
 
 
@@ -23580,10 +23593,10 @@ is missing, as in the above example, this parameter is set to be the
 When importing a variable defined in C, you should always use the @code{C}
 calling convention unless the object containing the variable is part of a
 DLL (in which case you should use the @code{Stdcall} calling
-convention, @ref{1d9,,Stdcall Calling Convention}).
+convention, @ref{1db,,Stdcall Calling Convention}).
 
 @node Stdcall Calling Convention,Win32 Calling Convention,C Calling Convention,Windows Calling Conventions
-@anchor{gnat_ugn/platform_specific_information id17}@anchor{1da}@anchor{gnat_ugn/platform_specific_information stdcall-calling-convention}@anchor{1d9}
+@anchor{gnat_ugn/platform_specific_information id18}@anchor{1dc}@anchor{gnat_ugn/platform_specific_information stdcall-calling-convention}@anchor{1db}
 @subsubsection @code{Stdcall} Calling Convention
 
 
@@ -23680,7 +23693,7 @@ Note that to ease building cross-platform bindings this convention
 will be handled as a @code{C} calling convention on non-Windows platforms.
 
 @node Win32 Calling Convention,DLL Calling Convention,Stdcall Calling Convention,Windows Calling Conventions
-@anchor{gnat_ugn/platform_specific_information id18}@anchor{1db}@anchor{gnat_ugn/platform_specific_information win32-calling-convention}@anchor{1dc}
+@anchor{gnat_ugn/platform_specific_information id19}@anchor{1dd}@anchor{gnat_ugn/platform_specific_information win32-calling-convention}@anchor{1de}
 @subsubsection @code{Win32} Calling Convention
 
 
@@ -23688,7 +23701,7 @@ This convention, which is GNAT-specific is fully equivalent to the
 @code{Stdcall} calling convention described above.
 
 @node DLL Calling Convention,,Win32 Calling Convention,Windows Calling Conventions
-@anchor{gnat_ugn/platform_specific_information dll-calling-convention}@anchor{1dd}@anchor{gnat_ugn/platform_specific_information id19}@anchor{1de}
+@anchor{gnat_ugn/platform_specific_information dll-calling-convention}@anchor{1df}@anchor{gnat_ugn/platform_specific_information id20}@anchor{1e0}
 @subsubsection @code{DLL} Calling Convention
 
 
@@ -23696,7 +23709,7 @@ This convention, which is GNAT-specific is fully equivalent to the
 @code{Stdcall} calling convention described above.
 
 @node Introduction to Dynamic Link Libraries DLLs,Using DLLs with GNAT,Windows Calling Conventions,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information id20}@anchor{1df}@anchor{gnat_ugn/platform_specific_information introduction-to-dynamic-link-libraries-dlls}@anchor{1e0}
+@anchor{gnat_ugn/platform_specific_information id21}@anchor{1e1}@anchor{gnat_ugn/platform_specific_information introduction-to-dynamic-link-libraries-dlls}@anchor{1e2}
 @subsubsection Introduction to Dynamic Link Libraries (DLLs)
 
 
@@ -23780,10 +23793,10 @@ As a side note, an interesting difference between Microsoft DLLs and
 Unix shared libraries, is the fact that on most Unix systems all public
 routines are exported by default in a Unix shared library, while under
 Windows it is possible (but not required) to list exported routines in
-a definition file (see @ref{1e1,,The Definition File}).
+a definition file (see @ref{1e3,,The Definition File}).
 
 @node Using DLLs with GNAT,Building DLLs with GNAT Project files,Introduction to Dynamic Link Libraries DLLs,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information id21}@anchor{1e2}@anchor{gnat_ugn/platform_specific_information using-dlls-with-gnat}@anchor{1d3}
+@anchor{gnat_ugn/platform_specific_information id22}@anchor{1e4}@anchor{gnat_ugn/platform_specific_information using-dlls-with-gnat}@anchor{1d5}
 @subsubsection Using DLLs with GNAT
 
 
@@ -23874,7 +23887,7 @@ example a fictitious DLL called @code{API.dll}.
 @end menu
 
 @node Creating an Ada Spec for the DLL Services,Creating an Import Library,,Using DLLs with GNAT
-@anchor{gnat_ugn/platform_specific_information creating-an-ada-spec-for-the-dll-services}@anchor{1e3}@anchor{gnat_ugn/platform_specific_information id22}@anchor{1e4}
+@anchor{gnat_ugn/platform_specific_information creating-an-ada-spec-for-the-dll-services}@anchor{1e5}@anchor{gnat_ugn/platform_specific_information id23}@anchor{1e6}
 @subsubsection Creating an Ada Spec for the DLL Services
 
 
@@ -23914,7 +23927,7 @@ end API;
 @end quotation
 
 @node Creating an Import Library,,Creating an Ada Spec for the DLL Services,Using DLLs with GNAT
-@anchor{gnat_ugn/platform_specific_information creating-an-import-library}@anchor{1e5}@anchor{gnat_ugn/platform_specific_information id23}@anchor{1e6}
+@anchor{gnat_ugn/platform_specific_information creating-an-import-library}@anchor{1e7}@anchor{gnat_ugn/platform_specific_information id24}@anchor{1e8}
 @subsubsection Creating an Import Library
 
 
@@ -23928,7 +23941,7 @@ as in this case it is possible to link directly against the
 DLL. Otherwise read on.
 
 @geindex Definition file
-@anchor{gnat_ugn/platform_specific_information the-definition-file}@anchor{1e1}
+@anchor{gnat_ugn/platform_specific_information the-definition-file}@anchor{1e3}
 @subsubheading The Definition File
 
 
@@ -23976,17 +23989,17 @@ EXPORTS
 @end table
 
 Note that you must specify the correct suffix (@code{@@@var{nn}})
-(see @ref{1d6,,Windows Calling Conventions}) for a Stdcall
+(see @ref{1d8,,Windows Calling Conventions}) for a Stdcall
 calling convention function in the exported symbols list.
 
 There can actually be other sections in a definition file, but these
 sections are not relevant to the discussion at hand.
-@anchor{gnat_ugn/platform_specific_information create-def-file-automatically}@anchor{1e7}
+@anchor{gnat_ugn/platform_specific_information create-def-file-automatically}@anchor{1e9}
 @subsubheading Creating a Definition File Automatically
 
 
 You can automatically create the definition file @code{API.def}
-(see @ref{1e1,,The Definition File}) from a DLL.
+(see @ref{1e3,,The Definition File}) from a DLL.
 For that use the @code{dlltool} program as follows:
 
 @quotation
@@ -23996,7 +24009,7 @@ $ dlltool API.dll -z API.def --export-all-symbols
 @end example
 
 Note that if some routines in the DLL have the @code{Stdcall} convention
-(@ref{1d6,,Windows Calling Conventions}) with stripped @code{@@@var{nn}}
+(@ref{1d8,,Windows Calling Conventions}) with stripped @code{@@@var{nn}}
 suffix then you’ll have to edit @code{api.def} to add it, and specify
 @code{-k} to @code{gnatdll} when creating the import library.
 
@@ -24020,13 +24033,13 @@ tells you what symbol is expected. You just have to go back to the
 definition file and add the right suffix.
 @end itemize
 @end quotation
-@anchor{gnat_ugn/platform_specific_information gnat-style-import-library}@anchor{1e8}
+@anchor{gnat_ugn/platform_specific_information gnat-style-import-library}@anchor{1ea}
 @subsubheading GNAT-Style Import Library
 
 
 To create a static import library from @code{API.dll} with the GNAT tools
 you should create the .def file, then use @code{gnatdll} tool
-(see @ref{1e9,,Using gnatdll}) as follows:
+(see @ref{1eb,,Using gnatdll}) as follows:
 
 @quotation
 
@@ -24042,15 +24055,15 @@ definition file name is @code{xyz.def}, the import library name will
 be @code{libxyz.a}. Note that in the previous example option
 @code{-e} could have been removed because the name of the definition
 file (before the @code{.def} suffix) is the same as the name of the
-DLL (@ref{1e9,,Using gnatdll} for more information about @code{gnatdll}).
+DLL (@ref{1eb,,Using gnatdll} for more information about @code{gnatdll}).
 @end quotation
-@anchor{gnat_ugn/platform_specific_information msvs-style-import-library}@anchor{1ea}
+@anchor{gnat_ugn/platform_specific_information msvs-style-import-library}@anchor{1ec}
 @subsubheading Microsoft-Style Import Library
 
 
 A Microsoft import library is needed only if you plan to make an
 Ada DLL available to applications developed with Microsoft
-tools (@ref{1d2,,Mixed-Language Programming on Windows}).
+tools (@ref{1d4,,Mixed-Language Programming on Windows}).
 
 To create a Microsoft-style import library for @code{API.dll} you
 should create the .def file, then build the actual import library using
@@ -24074,7 +24087,7 @@ See the Microsoft documentation for further details about the usage of
 @end quotation
 
 @node Building DLLs with GNAT Project files,Building DLLs with GNAT,Using DLLs with GNAT,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnat-project-files}@anchor{1d4}@anchor{gnat_ugn/platform_specific_information id24}@anchor{1eb}
+@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnat-project-files}@anchor{1d6}@anchor{gnat_ugn/platform_specific_information id25}@anchor{1ed}
 @subsubsection Building DLLs with GNAT Project files
 
 
@@ -24090,7 +24103,7 @@ when inside the @code{DllMain} routine which is used for auto-initialization
 of shared libraries, so it is not possible to have library level tasks in SALs.
 
 @node Building DLLs with GNAT,Building DLLs with gnatdll,Building DLLs with GNAT Project files,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnat}@anchor{1ec}@anchor{gnat_ugn/platform_specific_information id25}@anchor{1ed}
+@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnat}@anchor{1ee}@anchor{gnat_ugn/platform_specific_information id26}@anchor{1ef}
 @subsubsection Building DLLs with GNAT
 
 
@@ -24121,7 +24134,7 @@ $ gcc -shared -shared-libgcc -o api.dll obj1.o obj2.o ...
 It is important to note that in this case all symbols found in the
 object files are automatically exported. It is possible to restrict
 the set of symbols to export by passing to @code{gcc} a definition
-file (see @ref{1e1,,The Definition File}).
+file (see @ref{1e3,,The Definition File}).
 For example:
 
 @example
@@ -24159,7 +24172,7 @@ $ gnatmake main -Iapilib -bargs -shared -largs -Lapilib -lAPI
 @end quotation
 
 @node Building DLLs with gnatdll,Ada DLLs and Finalization,Building DLLs with GNAT,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnatdll}@anchor{1ee}@anchor{gnat_ugn/platform_specific_information id26}@anchor{1ef}
+@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnatdll}@anchor{1f0}@anchor{gnat_ugn/platform_specific_information id27}@anchor{1f1}
 @subsubsection Building DLLs with gnatdll
 
 
@@ -24167,8 +24180,8 @@ $ gnatmake main -Iapilib -bargs -shared -largs -Lapilib -lAPI
 @geindex building
 
 Note that it is preferred to use GNAT Project files
-(@ref{1d4,,Building DLLs with GNAT Project files}) or the built-in GNAT
-DLL support (@ref{1ec,,Building DLLs with GNAT}) or to build DLLs.
+(@ref{1d6,,Building DLLs with GNAT Project files}) or the built-in GNAT
+DLL support (@ref{1ee,,Building DLLs with GNAT}) or to build DLLs.
 
 This section explains how to build DLLs containing Ada code using
 @code{gnatdll}. These DLLs will be referred to as Ada DLLs in the
@@ -24184,20 +24197,20 @@ non-Ada applications are as follows:
 You need to mark each Ada entity exported by the DLL with a @code{C} or
 @code{Stdcall} calling convention to avoid any Ada name mangling for the
 entities exported by the DLL
-(see @ref{1f0,,Exporting Ada Entities}). You can
+(see @ref{1f2,,Exporting Ada Entities}). You can
 skip this step if you plan to use the Ada DLL only from Ada applications.
 
 @item 
 Your Ada code must export an initialization routine which calls the routine
 @code{adainit} generated by @code{gnatbind} to perform the elaboration of
-the Ada code in the DLL (@ref{1f1,,Ada DLLs and Elaboration}). The initialization
+the Ada code in the DLL (@ref{1f3,,Ada DLLs and Elaboration}). The initialization
 routine exported by the Ada DLL must be invoked by the clients of the DLL
 to initialize the DLL.
 
 @item 
 When useful, the DLL should also export a finalization routine which calls
 routine @code{adafinal} generated by @code{gnatbind} to perform the
-finalization of the Ada code in the DLL (@ref{1f2,,Ada DLLs and Finalization}).
+finalization of the Ada code in the DLL (@ref{1f4,,Ada DLLs and Finalization}).
 The finalization routine exported by the Ada DLL must be invoked by the
 clients of the DLL when the DLL services are no further needed.
 
@@ -24207,11 +24220,11 @@ of the programming languages to which you plan to make the DLL available.
 
 @item 
 You must provide a definition file listing the exported entities
-(@ref{1e1,,The Definition File}).
+(@ref{1e3,,The Definition File}).
 
 @item 
 Finally you must use @code{gnatdll} to produce the DLL and the import
-library (@ref{1e9,,Using gnatdll}).
+library (@ref{1eb,,Using gnatdll}).
 @end itemize
 
 Note that a relocatable DLL stripped using the @code{strip}
@@ -24231,7 +24244,7 @@ chapter of the `GPRbuild User’s Guide'.
 @end menu
 
 @node Limitations When Using Ada DLLs from Ada,Exporting Ada Entities,,Building DLLs with gnatdll
-@anchor{gnat_ugn/platform_specific_information limitations-when-using-ada-dlls-from-ada}@anchor{1f3}
+@anchor{gnat_ugn/platform_specific_information limitations-when-using-ada-dlls-from-ada}@anchor{1f5}
 @subsubsection Limitations When Using Ada DLLs from Ada
 
 
@@ -24252,7 +24265,7 @@ It is completely safe to exchange plain elementary, array or record types,
 Windows object handles, etc.
 
 @node Exporting Ada Entities,Ada DLLs and Elaboration,Limitations When Using Ada DLLs from Ada,Building DLLs with gnatdll
-@anchor{gnat_ugn/platform_specific_information exporting-ada-entities}@anchor{1f0}@anchor{gnat_ugn/platform_specific_information id27}@anchor{1f4}
+@anchor{gnat_ugn/platform_specific_information exporting-ada-entities}@anchor{1f2}@anchor{gnat_ugn/platform_specific_information id28}@anchor{1f6}
 @subsubsection Exporting Ada Entities
 
 
@@ -24352,10 +24365,10 @@ end API;
 Note that if you do not export the Ada entities with a @code{C} or
 @code{Stdcall} convention you will have to provide the mangled Ada names
 in the definition file of the Ada DLL
-(@ref{1f5,,Creating the Definition File}).
+(@ref{1f7,,Creating the Definition File}).
 
 @node Ada DLLs and Elaboration,,Exporting Ada Entities,Building DLLs with gnatdll
-@anchor{gnat_ugn/platform_specific_information ada-dlls-and-elaboration}@anchor{1f1}@anchor{gnat_ugn/platform_specific_information id28}@anchor{1f6}
+@anchor{gnat_ugn/platform_specific_information ada-dlls-and-elaboration}@anchor{1f3}@anchor{gnat_ugn/platform_specific_information id29}@anchor{1f8}
 @subsubsection Ada DLLs and Elaboration
 
 
@@ -24373,7 +24386,7 @@ the Ada elaboration routine @code{adainit} generated by the GNAT binder
 (@ref{7e,,Binding with Non-Ada Main Programs}). See the body of
 @code{Initialize_Api} for an example. Note that the GNAT binder is
 automatically invoked during the DLL build process by the @code{gnatdll}
-tool (@ref{1e9,,Using gnatdll}).
+tool (@ref{1eb,,Using gnatdll}).
 
 When a DLL is loaded, Windows systematically invokes a routine called
 @code{DllMain}. It would therefore be possible to call @code{adainit}
@@ -24386,7 +24399,7 @@ time), which means that the GNAT run-time will deadlock waiting for the
 newly created task to complete its initialization.
 
 @node Ada DLLs and Finalization,Creating a Spec for Ada DLLs,Building DLLs with gnatdll,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information ada-dlls-and-finalization}@anchor{1f2}@anchor{gnat_ugn/platform_specific_information id29}@anchor{1f7}
+@anchor{gnat_ugn/platform_specific_information ada-dlls-and-finalization}@anchor{1f4}@anchor{gnat_ugn/platform_specific_information id30}@anchor{1f9}
 @subsubsection Ada DLLs and Finalization
 
 
@@ -24401,10 +24414,10 @@ routine @code{adafinal} generated by the GNAT binder
 See the body of @code{Finalize_Api} for an
 example. As already pointed out the GNAT binder is automatically invoked
 during the DLL build process by the @code{gnatdll} tool
-(@ref{1e9,,Using gnatdll}).
+(@ref{1eb,,Using gnatdll}).
 
 @node Creating a Spec for Ada DLLs,GNAT and Windows Resources,Ada DLLs and Finalization,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information creating-a-spec-for-ada-dlls}@anchor{1f8}@anchor{gnat_ugn/platform_specific_information id30}@anchor{1f9}
+@anchor{gnat_ugn/platform_specific_information creating-a-spec-for-ada-dlls}@anchor{1fa}@anchor{gnat_ugn/platform_specific_information id31}@anchor{1fb}
 @subsubsection Creating a Spec for Ada DLLs
 
 
@@ -24462,7 +24475,7 @@ end API;
 @end menu
 
 @node Creating the Definition File,Using gnatdll,,Creating a Spec for Ada DLLs
-@anchor{gnat_ugn/platform_specific_information creating-the-definition-file}@anchor{1f5}@anchor{gnat_ugn/platform_specific_information id31}@anchor{1fa}
+@anchor{gnat_ugn/platform_specific_information creating-the-definition-file}@anchor{1f7}@anchor{gnat_ugn/platform_specific_information id32}@anchor{1fc}
 @subsubsection Creating the Definition File
 
 
@@ -24498,7 +24511,7 @@ EXPORTS
 @end quotation
 
 @node Using gnatdll,,Creating the Definition File,Creating a Spec for Ada DLLs
-@anchor{gnat_ugn/platform_specific_information id32}@anchor{1fb}@anchor{gnat_ugn/platform_specific_information using-gnatdll}@anchor{1e9}
+@anchor{gnat_ugn/platform_specific_information id33}@anchor{1fd}@anchor{gnat_ugn/platform_specific_information using-gnatdll}@anchor{1eb}
 @subsubsection Using @code{gnatdll}
 
 
@@ -24709,7 +24722,7 @@ asks @code{gnatlink} to generate the routines @code{DllMain} and
 is loaded into memory.
 
 @item 
-@code{gnatdll} uses @code{dlltool} (see @ref{1fc,,Using dlltool}) to build the
+@code{gnatdll} uses @code{dlltool} (see @ref{1fe,,Using dlltool}) to build the
 export table (@code{api.exp}). The export table contains the relocation
 information in a form which can be used during the final link to ensure
 that the Windows loader is able to place the DLL anywhere in memory.
@@ -24748,7 +24761,7 @@ $ gnatbind -n api
 $ gnatlink api api.exp -o api.dll -mdll
 @end example
 @end itemize
-@anchor{gnat_ugn/platform_specific_information using-dlltool}@anchor{1fc}
+@anchor{gnat_ugn/platform_specific_information using-dlltool}@anchor{1fe}
 @subsubheading Using @code{dlltool}
 
 
@@ -24807,7 +24820,7 @@ DLL in the static import library generated by @code{dlltool} with switch
 @item @code{-k}
 
 Kill @code{@@@var{nn}} from exported names
-(@ref{1d6,,Windows Calling Conventions}
+(@ref{1d8,,Windows Calling Conventions}
 for a discussion about @code{Stdcall}-style symbols).
 @end table
 
@@ -24863,7 +24876,7 @@ Use @code{assembler-name} as the assembler. The default is @code{as}.
 @end table
 
 @node GNAT and Windows Resources,Using GNAT DLLs from Microsoft Visual Studio Applications,Creating a Spec for Ada DLLs,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information gnat-and-windows-resources}@anchor{1fd}@anchor{gnat_ugn/platform_specific_information id33}@anchor{1fe}
+@anchor{gnat_ugn/platform_specific_information gnat-and-windows-resources}@anchor{1ff}@anchor{gnat_ugn/platform_specific_information id34}@anchor{200}
 @subsubsection GNAT and Windows Resources
 
 
@@ -24958,7 +24971,7 @@ the corresponding Microsoft documentation.
 @end menu
 
 @node Building Resources,Compiling Resources,,GNAT and Windows Resources
-@anchor{gnat_ugn/platform_specific_information building-resources}@anchor{1ff}@anchor{gnat_ugn/platform_specific_information id34}@anchor{200}
+@anchor{gnat_ugn/platform_specific_information building-resources}@anchor{201}@anchor{gnat_ugn/platform_specific_information id35}@anchor{202}
 @subsubsection Building Resources
 
 
@@ -24978,7 +24991,7 @@ complete description of the resource script language can be found in the
 Microsoft documentation.
 
 @node Compiling Resources,Using Resources,Building Resources,GNAT and Windows Resources
-@anchor{gnat_ugn/platform_specific_information compiling-resources}@anchor{201}@anchor{gnat_ugn/platform_specific_information id35}@anchor{202}
+@anchor{gnat_ugn/platform_specific_information compiling-resources}@anchor{203}@anchor{gnat_ugn/platform_specific_information id36}@anchor{204}
 @subsubsection Compiling Resources
 
 
@@ -25020,7 +25033,7 @@ $ windres -i myres.res -o myres.o
 @end quotation
 
 @node Using Resources,,Compiling Resources,GNAT and Windows Resources
-@anchor{gnat_ugn/platform_specific_information id36}@anchor{203}@anchor{gnat_ugn/platform_specific_information using-resources}@anchor{204}
+@anchor{gnat_ugn/platform_specific_information id37}@anchor{205}@anchor{gnat_ugn/platform_specific_information using-resources}@anchor{206}
 @subsubsection Using Resources
 
 
@@ -25040,7 +25053,7 @@ $ gnatmake myprog -largs myres.o
 @end quotation
 
 @node Using GNAT DLLs from Microsoft Visual Studio Applications,Debugging a DLL,GNAT and Windows Resources,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information using-gnat-dll-from-msvs}@anchor{205}@anchor{gnat_ugn/platform_specific_information using-gnat-dlls-from-microsoft-visual-studio-applications}@anchor{206}
+@anchor{gnat_ugn/platform_specific_information using-gnat-dll-from-msvs}@anchor{207}@anchor{gnat_ugn/platform_specific_information using-gnat-dlls-from-microsoft-visual-studio-applications}@anchor{208}
 @subsubsection Using GNAT DLLs from Microsoft Visual Studio Applications
 
 
@@ -25074,7 +25087,7 @@ $ gprbuild -p mylib.gpr
 @item 
 Produce a .def file for the symbols you need to interface with, either by
 hand or automatically with possibly some manual adjustments
-(see @ref{1e7,,Creating Definition File Automatically}):
+(see @ref{1e9,,Creating Definition File Automatically}):
 @end enumerate
 
 @quotation
@@ -25091,7 +25104,7 @@ $ dlltool libmylib.dll -z libmylib.def --export-all-symbols
 Make sure that MSVS command-line tools are accessible on the path.
 
 @item 
-Create the Microsoft-style import library (see @ref{1ea,,MSVS-Style Import Library}):
+Create the Microsoft-style import library (see @ref{1ec,,MSVS-Style Import Library}):
 @end enumerate
 
 @quotation
@@ -25133,7 +25146,7 @@ or copy the DLL into into the directory containing the .exe.
 @end enumerate
 
 @node Debugging a DLL,Setting Stack Size from gnatlink,Using GNAT DLLs from Microsoft Visual Studio Applications,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information debugging-a-dll}@anchor{207}@anchor{gnat_ugn/platform_specific_information id37}@anchor{208}
+@anchor{gnat_ugn/platform_specific_information debugging-a-dll}@anchor{209}@anchor{gnat_ugn/platform_specific_information id38}@anchor{20a}
 @subsubsection Debugging a DLL
 
 
@@ -25171,7 +25184,7 @@ tools suite used to build the DLL.
 @end menu
 
 @node Program and DLL Both Built with GCC/GNAT,Program Built with Foreign Tools and DLL Built with GCC/GNAT,,Debugging a DLL
-@anchor{gnat_ugn/platform_specific_information id38}@anchor{209}@anchor{gnat_ugn/platform_specific_information program-and-dll-both-built-with-gcc-gnat}@anchor{20a}
+@anchor{gnat_ugn/platform_specific_information id39}@anchor{20b}@anchor{gnat_ugn/platform_specific_information program-and-dll-both-built-with-gcc-gnat}@anchor{20c}
 @subsubsection Program and DLL Both Built with GCC/GNAT
 
 
@@ -25181,7 +25194,7 @@ the process. Let’s suppose here that the main procedure is named
 @code{ada_main} and that in the DLL there is an entry point named
 @code{ada_dll}.
 
-The DLL (@ref{1e0,,Introduction to Dynamic Link Libraries (DLLs)}) and
+The DLL (@ref{1e2,,Introduction to Dynamic Link Libraries (DLLs)}) and
 program must have been built with the debugging information (see GNAT -g
 switch). Here are the step-by-step instructions for debugging it:
 
@@ -25221,7 +25234,7 @@ you can use the standard approach to debug the whole program
 (@ref{14f,,Running and Debugging Ada Programs}).
 
 @node Program Built with Foreign Tools and DLL Built with GCC/GNAT,,Program and DLL Both Built with GCC/GNAT,Debugging a DLL
-@anchor{gnat_ugn/platform_specific_information id39}@anchor{20b}@anchor{gnat_ugn/platform_specific_information program-built-with-foreign-tools-and-dll-built-with-gcc-gnat}@anchor{20c}
+@anchor{gnat_ugn/platform_specific_information id40}@anchor{20d}@anchor{gnat_ugn/platform_specific_information program-built-with-foreign-tools-and-dll-built-with-gcc-gnat}@anchor{20e}
 @subsubsection Program Built with Foreign Tools and DLL Built with GCC/GNAT
 
 
@@ -25238,7 +25251,7 @@ example some C code built with Microsoft Visual C) and that there is a
 DLL named @code{test.dll} containing an Ada entry point named
 @code{ada_dll}.
 
-The DLL (see @ref{1e0,,Introduction to Dynamic Link Libraries (DLLs)}) must have
+The DLL (see @ref{1e2,,Introduction to Dynamic Link Libraries (DLLs)}) must have
 been built with debugging information (see the GNAT @code{-g} option).
 
 @subsubheading Debugging the DLL Directly
@@ -25377,7 +25390,7 @@ approach to debug a program as described in
 @ref{14f,,Running and Debugging Ada Programs}.
 
 @node Setting Stack Size from gnatlink,Setting Heap Size from gnatlink,Debugging a DLL,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information id40}@anchor{20d}@anchor{gnat_ugn/platform_specific_information setting-stack-size-from-gnatlink}@anchor{129}
+@anchor{gnat_ugn/platform_specific_information id41}@anchor{20f}@anchor{gnat_ugn/platform_specific_information setting-stack-size-from-gnatlink}@anchor{129}
 @subsubsection Setting Stack Size from @code{gnatlink}
 
 
@@ -25420,7 +25433,7 @@ because the comma is a separator for this option.
 @end itemize
 
 @node Setting Heap Size from gnatlink,,Setting Stack Size from gnatlink,Mixed-Language Programming on Windows
-@anchor{gnat_ugn/platform_specific_information id41}@anchor{20e}@anchor{gnat_ugn/platform_specific_information setting-heap-size-from-gnatlink}@anchor{12a}
+@anchor{gnat_ugn/platform_specific_information id42}@anchor{210}@anchor{gnat_ugn/platform_specific_information setting-heap-size-from-gnatlink}@anchor{12a}
 @subsubsection Setting Heap Size from @code{gnatlink}
 
 
@@ -25453,7 +25466,7 @@ because the comma is a separator for this option.
 @end itemize
 
 @node Windows Specific Add-Ons,,Mixed-Language Programming on Windows,Microsoft Windows Topics
-@anchor{gnat_ugn/platform_specific_information win32-specific-addons}@anchor{20f}@anchor{gnat_ugn/platform_specific_information windows-specific-add-ons}@anchor{210}
+@anchor{gnat_ugn/platform_specific_information win32-specific-addons}@anchor{211}@anchor{gnat_ugn/platform_specific_information windows-specific-add-ons}@anchor{212}
 @subsection Windows Specific Add-Ons
 
 
@@ -25466,7 +25479,7 @@ This section describes the Windows specific add-ons.
 @end menu
 
 @node Win32Ada,wPOSIX,,Windows Specific Add-Ons
-@anchor{gnat_ugn/platform_specific_information id42}@anchor{211}@anchor{gnat_ugn/platform_specific_information win32ada}@anchor{212}
+@anchor{gnat_ugn/platform_specific_information id43}@anchor{213}@anchor{gnat_ugn/platform_specific_information win32ada}@anchor{214}
 @subsubsection Win32Ada
 
 
@@ -25497,7 +25510,7 @@ gprbuild p.gpr
 @end quotation
 
 @node wPOSIX,,Win32Ada,Windows Specific Add-Ons
-@anchor{gnat_ugn/platform_specific_information id43}@anchor{213}@anchor{gnat_ugn/platform_specific_information wposix}@anchor{214}
+@anchor{gnat_ugn/platform_specific_information id44}@anchor{215}@anchor{gnat_ugn/platform_specific_information wposix}@anchor{216}
 @subsubsection wPOSIX
 
 
@@ -25530,7 +25543,7 @@ gprbuild p.gpr
 @end quotation
 
 @node Mac OS Topics,,Microsoft Windows Topics,Platform-Specific Information
-@anchor{gnat_ugn/platform_specific_information id44}@anchor{215}@anchor{gnat_ugn/platform_specific_information mac-os-topics}@anchor{216}
+@anchor{gnat_ugn/platform_specific_information id45}@anchor{217}@anchor{gnat_ugn/platform_specific_information mac-os-topics}@anchor{218}
 @section Mac OS Topics
 
 
@@ -25545,7 +25558,7 @@ platform.
 @end menu
 
 @node Codesigning the Debugger,,,Mac OS Topics
-@anchor{gnat_ugn/platform_specific_information codesigning-the-debugger}@anchor{217}
+@anchor{gnat_ugn/platform_specific_information codesigning-the-debugger}@anchor{219}
 @subsection Codesigning the Debugger
 
 
@@ -25626,7 +25639,7 @@ the location where you installed GNAT.  Also, be sure that users are
 in the Unix group @code{_developer}.
 
 @node Example of Binder Output File,Elaboration Order Handling in GNAT,Platform-Specific Information,Top
-@anchor{gnat_ugn/example_of_binder_output doc}@anchor{218}@anchor{gnat_ugn/example_of_binder_output example-of-binder-output-file}@anchor{e}@anchor{gnat_ugn/example_of_binder_output id1}@anchor{219}
+@anchor{gnat_ugn/example_of_binder_output doc}@anchor{21a}@anchor{gnat_ugn/example_of_binder_output example-of-binder-output-file}@anchor{e}@anchor{gnat_ugn/example_of_binder_output id1}@anchor{21b}
 @chapter Example of Binder Output File
 
 
@@ -26378,7 +26391,7 @@ elaboration code in your own application).
 @c -- Example: A |withing| unit has a |with| clause, it |withs| a |withed| unit
 
 @node Elaboration Order Handling in GNAT,Inline Assembler,Example of Binder Output File,Top
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat doc}@anchor{21a}@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-order-handling-in-gnat}@anchor{f}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id1}@anchor{21b}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat doc}@anchor{21c}@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-order-handling-in-gnat}@anchor{f}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id1}@anchor{21d}
 @chapter Elaboration Order Handling in GNAT
 
 
@@ -26408,7 +26421,7 @@ GNAT, either automatically or with explicit programming features.
 @end menu
 
 @node Elaboration Code,Elaboration Order,,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-code}@anchor{21c}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id2}@anchor{21d}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-code}@anchor{21e}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id2}@anchor{21f}
 @section Elaboration Code
 
 
@@ -26556,7 +26569,7 @@ elaborated.
 @end itemize
 
 @node Elaboration Order,Checking the Elaboration Order,Elaboration Code,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-order}@anchor{21e}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id3}@anchor{21f}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-order}@anchor{220}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id3}@anchor{221}
 @section Elaboration Order
 
 
@@ -26725,7 +26738,7 @@ however a compiler may not always find such an order due to complications with
 respect to control and data flow.
 
 @node Checking the Elaboration Order,Controlling the Elaboration Order in Ada,Elaboration Order,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat checking-the-elaboration-order}@anchor{220}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id4}@anchor{221}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat checking-the-elaboration-order}@anchor{222}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id4}@anchor{223}
 @section Checking the Elaboration Order
 
 
@@ -26786,7 +26799,7 @@ order.
 @end itemize
 
 @node Controlling the Elaboration Order in Ada,Controlling the Elaboration Order in GNAT,Checking the Elaboration Order,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-the-elaboration-order-in-ada}@anchor{222}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id5}@anchor{223}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-the-elaboration-order-in-ada}@anchor{224}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id5}@anchor{225}
 @section Controlling the Elaboration Order in Ada
 
 
@@ -27114,7 +27127,7 @@ is that the program continues to stay in the last state (one or more correct
 orders exist) even if maintenance changes the bodies of targets.
 
 @node Controlling the Elaboration Order in GNAT,Mixing Elaboration Models,Controlling the Elaboration Order in Ada,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-the-elaboration-order-in-gnat}@anchor{224}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id6}@anchor{225}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-the-elaboration-order-in-gnat}@anchor{226}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id6}@anchor{227}
 @section Controlling the Elaboration Order in GNAT
 
 
@@ -27244,7 +27257,7 @@ The dynamic, legacy, and static models can be relaxed using compiler switch
 may not diagnose certain elaboration issues or install run-time checks.
 
 @node Mixing Elaboration Models,ABE Diagnostics,Controlling the Elaboration Order in GNAT,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id7}@anchor{226}@anchor{gnat_ugn/elaboration_order_handling_in_gnat mixing-elaboration-models}@anchor{227}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id7}@anchor{228}@anchor{gnat_ugn/elaboration_order_handling_in_gnat mixing-elaboration-models}@anchor{229}
 @section Mixing Elaboration Models
 
 
@@ -27291,7 +27304,7 @@ warning:   "y.ads" which has static elaboration checks
 The warnings can be suppressed by binder switch @code{-ws}.
 
 @node ABE Diagnostics,SPARK Diagnostics,Mixing Elaboration Models,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat abe-diagnostics}@anchor{228}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id8}@anchor{229}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat abe-diagnostics}@anchor{22a}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id8}@anchor{22b}
 @section ABE Diagnostics
 
 
@@ -27398,7 +27411,7 @@ declaration @code{Safe} because the body of function @code{ABE} has already been
 elaborated at that point.
 
 @node SPARK Diagnostics,Elaboration Circularities,ABE Diagnostics,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id9}@anchor{22a}@anchor{gnat_ugn/elaboration_order_handling_in_gnat spark-diagnostics}@anchor{22b}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id9}@anchor{22c}@anchor{gnat_ugn/elaboration_order_handling_in_gnat spark-diagnostics}@anchor{22d}
 @section SPARK Diagnostics
 
 
@@ -27424,7 +27437,7 @@ rules.
 @end quotation
 
 @node Elaboration Circularities,Resolving Elaboration Circularities,SPARK Diagnostics,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-circularities}@anchor{22c}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id10}@anchor{22d}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-circularities}@anchor{22e}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id10}@anchor{22f}
 @section Elaboration Circularities
 
 
@@ -27524,7 +27537,7 @@ This section enumerates various tactics for eliminating the circularity.
 @end itemize
 
 @node Resolving Elaboration Circularities,Elaboration-related Compiler Switches,Elaboration Circularities,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id11}@anchor{22e}@anchor{gnat_ugn/elaboration_order_handling_in_gnat resolving-elaboration-circularities}@anchor{22f}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id11}@anchor{230}@anchor{gnat_ugn/elaboration_order_handling_in_gnat resolving-elaboration-circularities}@anchor{231}
 @section Resolving Elaboration Circularities
 
 
@@ -27796,7 +27809,7 @@ Use the relaxed dynamic-elaboration model, with compiler switches
 @end itemize
 
 @node Elaboration-related Compiler Switches,Summary of Procedures for Elaboration Control,Resolving Elaboration Circularities,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-related-compiler-switches}@anchor{230}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id12}@anchor{231}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-related-compiler-switches}@anchor{232}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id12}@anchor{233}
 @section Elaboration-related Compiler Switches
 
 
@@ -27977,7 +27990,7 @@ checks. The example above will still fail at run time with an ABE.
 @end table
 
 @node Summary of Procedures for Elaboration Control,Inspecting the Chosen Elaboration Order,Elaboration-related Compiler Switches,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id13}@anchor{232}@anchor{gnat_ugn/elaboration_order_handling_in_gnat summary-of-procedures-for-elaboration-control}@anchor{233}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id13}@anchor{234}@anchor{gnat_ugn/elaboration_order_handling_in_gnat summary-of-procedures-for-elaboration-control}@anchor{235}
 @section Summary of Procedures for Elaboration Control
 
 
@@ -28035,7 +28048,7 @@ Use the relaxed dynamic elaboration model, with compiler switches
 @end itemize
 
 @node Inspecting the Chosen Elaboration Order,,Summary of Procedures for Elaboration Control,Elaboration Order Handling in GNAT
-@anchor{gnat_ugn/elaboration_order_handling_in_gnat id14}@anchor{234}@anchor{gnat_ugn/elaboration_order_handling_in_gnat inspecting-the-chosen-elaboration-order}@anchor{235}
+@anchor{gnat_ugn/elaboration_order_handling_in_gnat id14}@anchor{236}@anchor{gnat_ugn/elaboration_order_handling_in_gnat inspecting-the-chosen-elaboration-order}@anchor{237}
 @section Inspecting the Chosen Elaboration Order
 
 
@@ -28178,7 +28191,7 @@ gdbstr (body)
 @end quotation
 
 @node Inline Assembler,GNU Free Documentation License,Elaboration Order Handling in GNAT,Top
-@anchor{gnat_ugn/inline_assembler doc}@anchor{236}@anchor{gnat_ugn/inline_assembler id1}@anchor{237}@anchor{gnat_ugn/inline_assembler inline-assembler}@anchor{10}
+@anchor{gnat_ugn/inline_assembler doc}@anchor{238}@anchor{gnat_ugn/inline_assembler id1}@anchor{239}@anchor{gnat_ugn/inline_assembler inline-assembler}@anchor{10}
 @chapter Inline Assembler
 
 
@@ -28237,7 +28250,7 @@ and with assembly language programming.
 @end menu
 
 @node Basic Assembler Syntax,A Simple Example of Inline Assembler,,Inline Assembler
-@anchor{gnat_ugn/inline_assembler basic-assembler-syntax}@anchor{238}@anchor{gnat_ugn/inline_assembler id2}@anchor{239}
+@anchor{gnat_ugn/inline_assembler basic-assembler-syntax}@anchor{23a}@anchor{gnat_ugn/inline_assembler id2}@anchor{23b}
 @section Basic Assembler Syntax
 
 
@@ -28353,7 +28366,7 @@ Intel: Destination first; for example @code{mov eax, 4}@w{ }
 
 
 @node A Simple Example of Inline Assembler,Output Variables in Inline Assembler,Basic Assembler Syntax,Inline Assembler
-@anchor{gnat_ugn/inline_assembler a-simple-example-of-inline-assembler}@anchor{23a}@anchor{gnat_ugn/inline_assembler id3}@anchor{23b}
+@anchor{gnat_ugn/inline_assembler a-simple-example-of-inline-assembler}@anchor{23c}@anchor{gnat_ugn/inline_assembler id3}@anchor{23d}
 @section A Simple Example of Inline Assembler
 
 
@@ -28502,7 +28515,7 @@ If there are no errors, @code{as} will generate an object file
 @code{nothing.out}.
 
 @node Output Variables in Inline Assembler,Input Variables in Inline Assembler,A Simple Example of Inline Assembler,Inline Assembler
-@anchor{gnat_ugn/inline_assembler id4}@anchor{23c}@anchor{gnat_ugn/inline_assembler output-variables-in-inline-assembler}@anchor{23d}
+@anchor{gnat_ugn/inline_assembler id4}@anchor{23e}@anchor{gnat_ugn/inline_assembler output-variables-in-inline-assembler}@anchor{23f}
 @section Output Variables in Inline Assembler
 
 
@@ -28869,7 +28882,7 @@ end Get_Flags_3;
 @end quotation
 
 @node Input Variables in Inline Assembler,Inlining Inline Assembler Code,Output Variables in Inline Assembler,Inline Assembler
-@anchor{gnat_ugn/inline_assembler id5}@anchor{23e}@anchor{gnat_ugn/inline_assembler input-variables-in-inline-assembler}@anchor{23f}
+@anchor{gnat_ugn/inline_assembler id5}@anchor{240}@anchor{gnat_ugn/inline_assembler input-variables-in-inline-assembler}@anchor{241}
 @section Input Variables in Inline Assembler
 
 
@@ -28958,7 +28971,7 @@ _increment__incr.1:
 @end quotation
 
 @node Inlining Inline Assembler Code,Other Asm Functionality,Input Variables in Inline Assembler,Inline Assembler
-@anchor{gnat_ugn/inline_assembler id6}@anchor{240}@anchor{gnat_ugn/inline_assembler inlining-inline-assembler-code}@anchor{241}
+@anchor{gnat_ugn/inline_assembler id6}@anchor{242}@anchor{gnat_ugn/inline_assembler inlining-inline-assembler-code}@anchor{243}
 @section Inlining Inline Assembler Code
 
 
@@ -29029,7 +29042,7 @@ movl %esi,%eax
 thus saving the overhead of stack frame setup and an out-of-line call.
 
 @node Other Asm Functionality,,Inlining Inline Assembler Code,Inline Assembler
-@anchor{gnat_ugn/inline_assembler id7}@anchor{242}@anchor{gnat_ugn/inline_assembler other-asm-functionality}@anchor{243}
+@anchor{gnat_ugn/inline_assembler id7}@anchor{244}@anchor{gnat_ugn/inline_assembler other-asm-functionality}@anchor{245}
 @section Other @code{Asm} Functionality
 
 
@@ -29044,7 +29057,7 @@ and @code{Volatile}, which inhibits unwanted optimizations.
 @end menu
 
 @node The Clobber Parameter,The Volatile Parameter,,Other Asm Functionality
-@anchor{gnat_ugn/inline_assembler id8}@anchor{244}@anchor{gnat_ugn/inline_assembler the-clobber-parameter}@anchor{245}
+@anchor{gnat_ugn/inline_assembler id8}@anchor{246}@anchor{gnat_ugn/inline_assembler the-clobber-parameter}@anchor{247}
 @subsection The @code{Clobber} Parameter
 
 
@@ -29108,7 +29121,7 @@ Use ‘register’ name @code{memory} if you changed a memory location
 @end itemize
 
 @node The Volatile Parameter,,The Clobber Parameter,Other Asm Functionality
-@anchor{gnat_ugn/inline_assembler id9}@anchor{246}@anchor{gnat_ugn/inline_assembler the-volatile-parameter}@anchor{247}
+@anchor{gnat_ugn/inline_assembler id9}@anchor{248}@anchor{gnat_ugn/inline_assembler the-volatile-parameter}@anchor{249}
 @subsection The @code{Volatile} Parameter
 
 
@@ -29144,7 +29157,7 @@ to @code{True} only if the compiler’s optimizations have created
 problems.
 
 @node GNU Free Documentation License,Index,Inline Assembler,Top
-@anchor{share/gnu_free_documentation_license doc}@anchor{248}@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{249}
+@anchor{share/gnu_free_documentation_license doc}@anchor{24a}@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{24b}
 @chapter GNU Free Documentation License
 
 
diff --git a/gcc/ada/libgnarl/s-taprop.ads b/gcc/ada/libgnarl/s-taprop.ads
index 35f0ea417f8..b3d224047c5 100644
--- a/gcc/ada/libgnarl/s-taprop.ads
+++ b/gcc/ada/libgnarl/s-taprop.ads
@@ -322,6 +322,15 @@ package System.Task_Primitives.Operations is
    --  priority (RM D.2.2 par 9). Loss_Of_Inheritance helps the underlying
    --  implementation to do it right when the OS doesn't.
 
+   --  Note: The behavior of Set_Priority is OS specific when a dispatching
+   --  policy is not specified, and, as a result, calls to Set_Priority may
+   --  have no affect without setting such a policy via pragma
+   --  Task_Dispatching_Policy.
+
+   --  For example:
+
+   --    pragma Task_Dispatching_Policy (FIFO_Within_Priorities);
+
    function Get_Priority (T : ST.Task_Id) return System.Any_Priority;
    pragma Inline (Get_Priority);
    --  Returns the priority last set by Set_Priority for this task
diff --git a/gcc/ada/libgnarl/s-taprop__mingw.adb b/gcc/ada/libgnarl/s-taprop__mingw.adb
index df1cb67b707..3a124ba78d0 100644
--- a/gcc/ada/libgnarl/s-taprop__mingw.adb
+++ b/gcc/ada/libgnarl/s-taprop__mingw.adb
@@ -675,7 +675,10 @@ package body System.Task_Primitives.Operations is
       Res :=
         SetThreadPriority
           (T.Common.LL.Thread,
-           Interfaces.C.int (Underlying_Priorities (Prio)));
+           Interfaces.C.int ((if Dispatching_Policy = 'F' then
+                                 FIFO_Underlying_Priorities (Prio)
+                              else
+                                 Underlying_Priorities (Prio))));
       pragma Assert (Res = Win32.TRUE);
 
       --  Note: Annex D (RM D.2.3(5/2)) requires the task to be placed at the
diff --git a/gcc/ada/libgnat/system-mingw.ads b/gcc/ada/libgnat/system-mingw.ads
index e30e9b04223..0a130e7f810 100644
--- a/gcc/ada/libgnat/system-mingw.ads
+++ b/gcc/ada/libgnat/system-mingw.ads
@@ -153,15 +153,20 @@ private
    --  that the value of these parameters is available for analysis
    --  of the declarations here (using Rtsfind at compile time).
 
-   --  The underlying priorities table provides a generalized mechanism
+   --  The underlying priorities tables provide a generalized mechanism
    --  for mapping from Ada priorities to system priorities. In some
    --  cases a 1-1 mapping is not the convenient or optimal choice.
 
+   --  We include two different tables here - one for when
+   --  FIFO_Within_Priorites is specified and one for default behavior -
+   --  since Windows will allow a greater granularity of levels when it
+   --  is in affect.
+
    type Priorities_Mapping is array (Any_Priority) of Integer;
    pragma Suppress_Initialization (Priorities_Mapping);
    --  Suppress initialization in case gnat.adc specifies Normalize_Scalars
 
-   Underlying_Priorities : constant Priorities_Mapping :=
+   FIFO_Underlying_Priorities : constant Priorities_Mapping :=
      (Priority'First ..
       Default_Priority - 8    => -15,
       Default_Priority - 7    => -7,
@@ -181,8 +186,24 @@ private
       Priority'Last           => 6,
       Interrupt_Priority      => 15);
    --  The default mapping preserves the standard 31 priorities of the Ada
+   --  model, but maps them using compression onto the 16 priority levels
+   --  available in NT when REALTIME_PRIORITY_CLASS base class is set via
+   --  pragma Task_Dispatching_Policy (FIFO_Within_Priorities).
+
+   Underlying_Priorities : constant Priorities_Mapping :=
+     (Priority'First     => -15,  --  Thread_Priority_Idle
+      1  ..  6           =>  -2,  --  Thread_Priority_Lowest
+      7  .. 12           =>  -1,  --  Thread_Priority_Below_Normal
+      13 .. 14           =>   0,  --  Thread_Priority_Normal
+      Default_Priority   =>   0,  --  Thread_Priority_Normal
+      16 .. 18           =>   0,  --  Thread_Priority_Normal
+      19 .. 24           =>   1,  --  Thread_Priority_Above_Normal
+      25 .. 29           =>   2,  --  Thread_Priority_Highest
+      Priority'Last      =>   2,  --  Thread_Priority_Highest
+      Interrupt_Priority =>  15); --  Thread_Priority_Time_Critical
+   --  The non FIFO mapping preserves the standard 31 priorities of the Ada
    --  model, but maps them using compression onto the 7 priority levels
-   --  available in NT and on the 16 priority levels available in 2000/XP.
+   --  available in NT when pragma Task_Dispatching_Policy is unspecified.
 
    pragma Linker_Options ("-Wl,--stack=0x2000000");
    --  This is used to change the default stack (32 MB) size for non tasking
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 02/31] ada: Follow-up fix to previous change for Text_Ptr
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 03/31] ada: Remove trailing NUL in minimal expansion of Put_Image attribute Marc Poulhiès
                   ` (28 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

The variable would be saved and restored while still uninitialized.

gcc/ada/

	* err_vars.ads (Error_Msg_Sloc): Initialize to No_Location.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/err_vars.ads | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/ada/err_vars.ads b/gcc/ada/err_vars.ads
index 113dd936db6..838217b95f4 100644
--- a/gcc/ada/err_vars.ads
+++ b/gcc/ada/err_vars.ads
@@ -107,7 +107,7 @@ package Err_Vars is
 
    --  WARNING: There is a matching C declaration of these variables in fe.h
 
-   Error_Msg_Sloc : Source_Ptr;
+   Error_Msg_Sloc : Source_Ptr := No_Location;
    --  Source location for # insertion character in message
 
    Error_Msg_Name_1 : Name_Id;
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 03/31] ada: Remove trailing NUL in minimal expansion of Put_Image attribute
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 02/31] ada: Follow-up fix to previous change for Text_Ptr Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 04/31] ada: Remove conversion from String_Id to String and back to String_Id Marc Poulhiès
                   ` (27 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

From: Piotr Trojanek <trojanek@adacore.com>

When procedure that implements Put_Image attribute emits the type name,
this name was wrongly followed by a NUL character.

gcc/ada/

	* exp_put_image.adb (Build_Record_Put_Image_Procedure): Remove
	trailing NUL from the fully qualified type name.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/exp_put_image.adb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/exp_put_image.adb b/gcc/ada/exp_put_image.adb
index c23b4e24354..f5141a56626 100644
--- a/gcc/ada/exp_put_image.adb
+++ b/gcc/ada/exp_put_image.adb
@@ -832,7 +832,9 @@ package body Exp_Put_Image is
                 Parameter_Associations => New_List
                   (Make_Identifier (Loc, Name_S),
                    Make_String_Literal (Loc,
-                     To_String (Fully_Qualified_Name_String (Btyp))))));
+                     To_String
+                       (Fully_Qualified_Name_String
+                          (Btyp, Append_NUL => False))))));
          end if;
       elsif Is_Null_Record_Type (Btyp, Ignore_Privacy => True) then
 
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 04/31] ada: Remove conversion from String_Id to String and back to String_Id
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 02/31] ada: Follow-up fix to previous change for Text_Ptr Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 03/31] ada: Remove trailing NUL in minimal expansion of Put_Image attribute Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 05/31] ada: Do not leak tagged type names when Discard_Names is enabled Marc Poulhiès
                   ` (26 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

From: Piotr Trojanek <trojanek@adacore.com>

Code cleanup; semantics is unaffected.

gcc/ada/

	* exp_put_image.adb (Build_Record_Put_Image_Procedure): Remove
	useless conversions.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/exp_put_image.adb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gcc/ada/exp_put_image.adb b/gcc/ada/exp_put_image.adb
index f5141a56626..09fbfa75eeb 100644
--- a/gcc/ada/exp_put_image.adb
+++ b/gcc/ada/exp_put_image.adb
@@ -44,7 +44,6 @@ with Sinfo.Nodes;    use Sinfo.Nodes;
 with Sinfo.Utils;    use Sinfo.Utils;
 with Snames;         use Snames;
 with Stand;
-with Stringt;        use Stringt;
 with Tbuild;         use Tbuild;
 with Ttypes;         use Ttypes;
 with Uintp;          use Uintp;
@@ -832,9 +831,8 @@ package body Exp_Put_Image is
                 Parameter_Associations => New_List
                   (Make_Identifier (Loc, Name_S),
                    Make_String_Literal (Loc,
-                     To_String
-                       (Fully_Qualified_Name_String
-                          (Btyp, Append_NUL => False))))));
+                     Fully_Qualified_Name_String
+                       (Btyp, Append_NUL => False)))));
          end if;
       elsif Is_Null_Record_Type (Btyp, Ignore_Privacy => True) then
 
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 05/31] ada: Do not leak tagged type names when Discard_Names is enabled
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (2 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 04/31] ada: Remove conversion from String_Id to String and back to String_Id Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 06/31] ada: Update documentation of warning messages Marc Poulhiès
                   ` (25 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

From: Piotr Trojanek <trojanek@adacore.com>

When both pragmas Discard_Names and No_Tagged_Streams apply to a tagged
type, the intended behavior is to prevent type names from leaking into
object code, as documented in GNAT RM.

However, while Discard_Names can be used as a configuration pragma,
No_Tagged_Streams must be applied to each type separately. This patch
enables the use of restriction No_Streams, which can be activated
globally, instead of No_Tagged_Streams on individual types.

When no tagged stream object can be created and allocated, then routines
that make use of the External_Tag won't be used.

gcc/ada/

	* doc/gnat_rm/implementation_defined_pragmas.rst
	(No_Tagged_Streams): Document how to avoid exposing entity names
	for the entire partition.
	* exp_disp.adb (Make_DT): Make use of restriction No_Streams.
	* exp_put_image.adb (Build_Record_Put_Image_Procedure): Respect
	Discard_Names in the generated Put_Image procedure.
	* gnat_rm.texi: Regenerate.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 .../implementation_defined_pragmas.rst        |  6 ++++
 gcc/ada/exp_disp.adb                          |  5 +--
 gcc/ada/exp_put_image.adb                     | 34 ++++++++++++++-----
 gcc/ada/gnat_rm.texi                          |  6 ++++
 4 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
index 0661670e047..7e4dd935342 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
@@ -4000,6 +4000,12 @@ applied to a tagged type its Expanded_Name and External_Tag are initialized
 with empty strings. This is useful to avoid exposing entity names at binary
 level but has a negative impact on the debuggability of tagged types.
 
+Alternatively, when pragmas ``Discard_Names`` and ``Restrictions (No_Streams)``
+simultanously apply to a tagged type, its Expanded_Name and External_Tag are
+also initialized with empty strings. In particular, both these pragmas can be
+applied as configuration pragmas to avoid exposing entity names at binary
+level for the entire parition.
+
 Pragma Normalize_Scalars
 ========================
 
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb
index 601d463a8b0..66be77c9ffc 100644
--- a/gcc/ada/exp_disp.adb
+++ b/gcc/ada/exp_disp.adb
@@ -4600,8 +4600,9 @@ package body Exp_Disp is
       --        streams.
 
       Discard_Names : constant Boolean :=
-                        Present (No_Tagged_Streams_Pragma (Typ))
-                          and then
+        (Present (No_Tagged_Streams_Pragma (Typ))
+           or else Restriction_Active (No_Streams))
+          and then
         (Global_Discard_Names or else Einfo.Entities.Discard_Names (Typ));
 
       --  The following name entries are used by Make_DT to generate a number
diff --git a/gcc/ada/exp_put_image.adb b/gcc/ada/exp_put_image.adb
index 09fbfa75eeb..94299e39661 100644
--- a/gcc/ada/exp_put_image.adb
+++ b/gcc/ada/exp_put_image.adb
@@ -44,6 +44,7 @@ with Sinfo.Nodes;    use Sinfo.Nodes;
 with Sinfo.Utils;    use Sinfo.Utils;
 with Snames;         use Snames;
 with Stand;
+with Stringt;        use Stringt;
 with Tbuild;         use Tbuild;
 with Ttypes;         use Ttypes;
 with Uintp;          use Uintp;
@@ -825,14 +826,31 @@ package body Exp_Put_Image is
               Make_Raise_Program_Error (Loc,
               Reason => PE_Explicit_Raise));
          else
-            Append_To (Stms,
-              Make_Procedure_Call_Statement (Loc,
-                Name => New_Occurrence_Of (RTE (RE_Put_Image_Unknown), Loc),
-                Parameter_Associations => New_List
-                  (Make_Identifier (Loc, Name_S),
-                   Make_String_Literal (Loc,
-                     Fully_Qualified_Name_String
-                       (Btyp, Append_NUL => False)))));
+            declare
+               Type_Name : String_Id;
+            begin
+               --  If aspect Discard_Names is enabled the intention is to
+               --  prevent type names from leaking into object file. Instead,
+               --  we emit string that is different from the ones from the
+               --  default implementations of the Put_Image attribute.
+
+               if Global_Discard_Names or else Discard_Names (Typ) then
+                  Start_String;
+                  Store_String_Chars ("(DISCARDED TYPE NAME)");
+                  Type_Name := End_String;
+               else
+                  Type_Name :=
+                    Fully_Qualified_Name_String (Btyp, Append_NUL => False);
+               end if;
+
+               Append_To (Stms,
+                 Make_Procedure_Call_Statement (Loc,
+                   Name => New_Occurrence_Of (RTE (RE_Put_Image_Unknown), Loc),
+                   Parameter_Associations => New_List
+                     (Make_Identifier (Loc, Name_S),
+                        Make_String_Literal (Loc,
+                          Type_Name))));
+            end;
          end if;
       elsif Is_Null_Record_Type (Btyp, Ignore_Privacy => True) then
 
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 4dbbb036a25..4ff1de42db2 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -5535,6 +5535,12 @@ applied to a tagged type its Expanded_Name and External_Tag are initialized
 with empty strings. This is useful to avoid exposing entity names at binary
 level but has a negative impact on the debuggability of tagged types.
 
+Alternatively, when pragmas @code{Discard_Names} and @code{Restrictions (No_Streams)}
+simultanously apply to a tagged type, its Expanded_Name and External_Tag are
+also initialized with empty strings. In particular, both these pragmas can be
+applied as configuration pragmas to avoid exposing entity names at binary
+level for the entire parition.
+
 @node Pragma Normalize_Scalars,Pragma Obsolescent,Pragma No_Tagged_Streams,Implementation Defined Pragmas
 @anchor{gnat_rm/implementation_defined_pragmas pragma-normalize-scalars}@anchor{b0}
 @section Pragma Normalize_Scalars
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 06/31] ada: Update documentation of warning messages
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (3 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 05/31] ada: Do not leak tagged type names when Discard_Names is enabled Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 07/31] ada: Fix index entry for an implemented AI feature Marc Poulhiès
                   ` (24 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Viljar Indus

From: Viljar Indus <indus@adacore.com>

Update the documentation of warning messages that only
emit info messages to clearly reflect that they only emit
info messages and not warning messages.

gcc/ada/

	* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
	Update the documentation of -gnatw.n and -gnatw.l
	* gnat_ugn.texi: Regenerate.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 .../building_executable_programs_with_gnat.rst   | 14 +++++++-------
 gcc/ada/gnat_ugn.texi                            | 16 ++++++++--------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
index 21e277d5916..2f63d02daf7 100644
--- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
+++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
@@ -3415,7 +3415,7 @@ of the pragma in the :title:`GNAT_Reference_manual`).
 .. index:: -gnatw.l  (gcc)
 
 :switch:`-gnatw.l`
-  *List inherited aspects.*
+  *List inherited aspects as info messages.*
 
   This switch causes the compiler to list inherited invariants,
   preconditions, and postconditions from Type_Invariant'Class, Invariant'Class,
@@ -3425,7 +3425,7 @@ of the pragma in the :title:`GNAT_Reference_manual`).
 .. index:: -gnatw.L  (gcc)
 
 :switch:`-gnatw.L`
-  *Suppress listing of inherited aspects.*
+  *Suppress listing of inherited aspects as info messages.*
 
   This switch suppresses listing of inherited aspects.
 
@@ -3495,20 +3495,20 @@ of the pragma in the :title:`GNAT_Reference_manual`).
 .. index:: Atomic Synchronization, warnings
 
 :switch:`-gnatw.n`
-  *Activate warnings on atomic synchronization.*
+  *Activate info messages on atomic synchronization.*
 
-  This switch actives warnings when an access to an atomic variable
+  This switch activates info messages when an access to an atomic variable
   requires the generation of atomic synchronization code. These
-  warnings are off by default.
+  info messages are off by default.
 
 .. index:: -gnatw.N  (gcc)
 
 :switch:`-gnatw.N`
-  *Suppress warnings on atomic synchronization.*
+  *Suppress info messages on atomic synchronization.*
 
   .. index:: Atomic Synchronization, warnings
 
-  This switch suppresses warnings when an access to an atomic variable
+  This switch suppresses info messages when an access to an atomic variable
   requires the generation of atomic synchronization code.
 
 
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 43251ba3f1c..2df2a780ec7 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -11646,7 +11646,7 @@ This switch suppresses warnings for possible elaboration problems.
 
 @item @code{-gnatw.l}
 
-`List inherited aspects.'
+`List inherited aspects as info messages.'
 
 This switch causes the compiler to list inherited invariants,
 preconditions, and postconditions from Type_Invariant’Class, Invariant’Class,
@@ -11660,7 +11660,7 @@ Pre’Class, and Post’Class aspects. Also list inherited subtype predicates.
 
 @item @code{-gnatw.L}
 
-`Suppress listing of inherited aspects.'
+`Suppress listing of inherited aspects as info messages.'
 
 This switch suppresses listing of inherited aspects.
 @end table
@@ -11755,11 +11755,11 @@ use of @code{-gnatg}.
 
 @item @code{-gnatw.n}
 
-`Activate warnings on atomic synchronization.'
+`Activate info messages on atomic synchronization.'
 
-This switch actives warnings when an access to an atomic variable
+This switch activates info messages when an access to an atomic variable
 requires the generation of atomic synchronization code. These
-warnings are off by default.
+info messages are off by default.
 @end table
 
 @geindex -gnatw.N (gcc)
@@ -11769,12 +11769,12 @@ warnings are off by default.
 
 @item @code{-gnatw.N}
 
-`Suppress warnings on atomic synchronization.'
+`Suppress info messages on atomic synchronization.'
 
 @geindex Atomic Synchronization
 @geindex warnings
 
-This switch suppresses warnings when an access to an atomic variable
+This switch suppresses info messages when an access to an atomic variable
 requires the generation of atomic synchronization code.
 @end table
 
@@ -29645,8 +29645,8 @@ to permit their use in free software.
 
 @printindex ge
 
-@anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{                              }
 @anchor{d1}@w{                              }
+@anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{                              }
 
 @c %**end of body
 @bye
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 07/31] ada: Fix index entry for an implemented AI feature
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (4 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 06/31] ada: Update documentation of warning messages Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 08/31] ada: Sort list of implemented Ada 2012 features Marc Poulhiès
                   ` (23 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

From: Piotr Trojanek <trojanek@adacore.com>

Fix inconsistent reference with "05" in the name of AI.

gcc/ada/

	* doc/gnat_rm/implementation_of_ada_2012_features.rst
	(AI-0216): Fix index reference.
	* gnat_rm.texi: Regenerate.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst | 2 +-
 gcc/ada/gnat_rm.texi                                        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst b/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst
index 2825362c616..d7f1fea01f3 100644
--- a/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst
@@ -1243,7 +1243,7 @@ Supported Aspect                     Source
 
   RM References:  B.01 (17)   B.03 (62)   B.03 (71.1/2)
 
-.. index:: AI05-0216 (Ada 2012 feature)
+.. index:: AI-0216 (Ada 2012 feature)
 
 * *AI-0216 No_Task_Hierarchy forbids local tasks (0000-00-00)*
 
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 4ff1de42db2..0d38b1a4bc6 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -28603,7 +28603,7 @@ non-portable.
 RM References:  B.01 (17)   B.03 (62)   B.03 (71.1/2)
 @end itemize
 
-@geindex AI05-0216 (Ada 2012 feature)
+@geindex AI-0216 (Ada 2012 feature)
 
 
 @itemize *
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 08/31] ada: Sort list of implemented Ada 2012 features
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (5 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 07/31] ada: Fix index entry for an implemented AI feature Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 09/31] ada: Fix formatting in " Marc Poulhiès
                   ` (22 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

From: Piotr Trojanek <trojanek@adacore.com>

The list of implemented Ada 2012 features is now ordered by the AI
numbers. It has been sorted mechanically using the csplit command with
a bit of shell scripting.

gcc/ada/

	* doc/gnat_rm/implementation_of_ada_2012_features.rst:
	Order list by AI number.
	* gnat_rm.texi: Regenerate.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 .../implementation_of_ada_2012_features.rst   | 1658 ++++++-------
 gcc/ada/gnat_rm.texi                          | 2054 ++++++++---------
 2 files changed, 1856 insertions(+), 1856 deletions(-)

diff --git a/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst b/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst
index d7f1fea01f3..706de492301 100644
--- a/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst
@@ -43,330 +43,343 @@ in the RM, the earliest is used.
 A complete description of the AIs may be found in
 http://www.ada-auth.org/ai05-summary.html.
 
-.. index:: AI-0176 (Ada 2012 feature)
+.. index:: AI-0002 (Ada 2012 feature)
 
-* *AI-0176 Quantified expressions (2010-09-29)*
+* *AI-0002 Export C with unconstrained arrays (0000-00-00)*
 
-  Both universally and existentially quantified expressions are implemented.
-  They use the new syntax for iterators proposed in AI05-139-2, as well as
-  the standard Ada loop syntax.
+  The compiler is not required to support exporting an Ada subprogram with
+  convention C if there are parameters or a return type of an unconstrained
+  array type (such as ``String``). GNAT allows such declarations but
+  generates warnings. It is possible, but complicated, to write the
+  corresponding C code and certainly such code would be specific to GNAT and
+  non-portable.
 
-  RM References:  1.01.04 (12)   2.09 (2/2)   4.04 (7)   4.05.09 (0)
+  RM References:  B.01 (17)   B.03 (62)   B.03 (71.1/2)
 
-.. index:: AI-0079 (Ada 2012 feature)
+.. index:: AI-0003 (Ada 2012 feature)
 
-* *AI-0079 Allow other_format characters in source (2010-07-10)*
+* *AI-0003 Qualified expressions as names (2010-07-11)*
 
-  Wide characters in the unicode category *other_format* are now allowed in
-  source programs between tokens, but not within a token such as an identifier.
+  In Ada 2012, a qualified expression is considered to be syntactically a name,
+  meaning that constructs such as ``A'(F(X)).B`` are now legal. This is
+  useful in disambiguating some cases of overloading.
 
-  RM References:  2.01 (4/2)   2.02 (7)
+  RM References:  3.03 (11)   3.03 (21)   4.01 (2)   4.04 (7)   4.07 (3)
+  5.04 (7)
 
-.. index:: AI-0091 (Ada 2012 feature)
+.. index:: AI-0007 (Ada 2012 feature)
 
-* *AI-0091 Do not allow other_format in identifiers (0000-00-00)*
+* *AI-0007 Stream read and private scalar types (0000-00-00)*
 
-  Wide characters in the unicode category *other_format* are not permitted
-  within  an identifier, since this can be a security problem. The error
-  message for this case has been improved to be more specific, but GNAT has
-  never allowed such characters to appear in identifiers.
+  The RM as written appeared to limit the possibilities of declaring read
+  attribute procedures for private scalar types. This limitation was not
+  intended, and has never been enforced by GNAT.
 
-  RM References:  2.03 (3.1/2)   2.03 (4/2)   2.03 (5/2)   2.03 (5.1/2)   2.03 (5.2/2)   2.03 (5.3/2)   2.09 (2/2)
+  RM References:  13.13.02 (50/2)   13.13.02 (51/2)
 
-.. index:: AI-0100 (Ada 2012 feature)
+.. index:: AI-0008 (Ada 2012 feature)
 
-* *AI-0100 Placement of pragmas  (2010-07-01)*
+* *AI-0008 General access to constrained objects (0000-00-00)*
 
-  This AI is an earlier version of AI-163. It simplifies the rules
-  for legal placement of pragmas. In the case of lists that allow pragmas, if
-  the list may have no elements, then the list may consist solely of pragmas.
+  The wording in the RM implied that if you have a general access to a
+  constrained object, it could be used to modify the discriminants. This was
+  obviously not intended. ``Constraint_Error`` should be raised, and GNAT
+  has always done so in this situation.
 
-  RM References:  2.08 (7)
+  RM References:  3.03 (23)   3.10.02 (26/2)   4.01 (9)   6.04.01 (17)   8.05.01 (5/2)
 
-.. index:: AI-0163 (Ada 2012 feature)
+.. index:: AI-0009 (Ada 2012 feature)
 
-* *AI-0163 Pragmas in place of null (2010-07-01)*
+* *AI-0009 Pragma Independent[_Components] (2010-07-23)*
 
-  A statement sequence may be composed entirely of pragmas. It is no longer
-  necessary to add a dummy ``null`` statement to make the sequence legal.
+  This AI introduces the new pragmas ``Independent`` and
+  ``Independent_Components``,
+  which control guaranteeing independence of access to objects and components.
+  The AI also requires independence not unaffected by confirming rep clauses.
 
-  RM References:  2.08 (7)   2.08 (16)
+  RM References:  9.10 (1)   13.01 (15/1)   13.02 (9)   13.03 (13)   C.06 (2)
+  C.06 (4)   C.06 (6)   C.06 (9)   C.06 (13)   C.06 (14)
 
-.. index:: AI-0080 (Ada 2012 feature)
+.. index:: AI-0012 (Ada 2012 feature)
 
-* *AI-0080 'View of' not needed if clear from context (0000-00-00)*
+* *AI-0012 Pack/Component_Size for aliased/atomic (2010-07-15)*
 
-  This is an editorial change only, described as non-testable in the AI.
+  It is now illegal to give an inappropriate component size or a pragma
+  ``Pack`` that attempts to change the component size in the case of atomic
+  or aliased components. Previously GNAT ignored such an attempt with a
+  warning.
 
-  RM References:  3.01 (7)
+  RM References:  13.02 (6.1/2)   13.02 (7)   C.06 (10)   C.06 (11)   C.06 (21)
 
-.. index:: AI-0183 (Ada 2012 feature)
+.. index:: AI-0015 (Ada 2012 feature)
 
-* *AI-0183 Aspect specifications (2010-08-16)*
+* *AI-0015 Constant return objects (0000-00-00)*
 
-  Aspect specifications have been fully implemented except for pre and post-
-  conditions, and type invariants, which have their own separate AI's. All
-  forms of declarations listed in the AI are supported. The following is a
-  list of the aspects supported (with GNAT implementation aspects marked)
+  The return object declared in an *extended_return_statement* may be
+  declared constant. This was always intended, and GNAT has always allowed it.
 
-==================================== ===========
-Supported Aspect                     Source
-==================================== ===========
-  ``Ada_2005``                           -- GNAT
-  ``Ada_2012``                           -- GNAT
-  ``Address``
-  ``Alignment``
-  ``Atomic``
-  ``Atomic_Components``
-  ``Bit_Order``
-  ``Component_Size``
-  ``Contract_Cases``                     -- GNAT
-  ``Discard_Names``
-  ``External_Tag``
-  ``Favor_Top_Level``                    -- GNAT
-  ``Inline``
-  ``Inline_Always``                      -- GNAT
-  ``Invariant``                          -- GNAT
-  ``Machine_Radix``
-  ``No_Return``
-  ``Object_Size``                        -- GNAT
-  ``Pack``
-  ``Persistent_BSS``                     -- GNAT
-  ``Post``
-  ``Pre``
-  ``Predicate``
-  ``Preelaborable_Initialization``
-  ``Pure_Function``                      -- GNAT
-  ``Remote_Access_Type``                 -- GNAT
-  ``Shared``                             -- GNAT
-  ``Size``
-  ``Storage_Pool``
-  ``Storage_Size``
-  ``Stream_Size``
-  ``Suppress``
-  ``Suppress_Debug_Info``                -- GNAT
-  ``Test_Case``                          -- GNAT
-  ``Thread_Local_Storage``               -- GNAT
-  ``Type_Invariant``
-  ``Unchecked_Union``
-  ``Universal_Aliasing``                 -- GNAT
-  ``Unmodified``                         -- GNAT
-  ``Unreferenced``                       -- GNAT
-  ``Unreferenced_Objects``               -- GNAT
-  ``Unsuppress``
-  ``Value_Size``                         -- GNAT
-  ``Volatile``
-  ``Volatile_Components``
-  ``Warnings``                           -- GNAT
-==================================== ===========
+  RM References:  6.05 (2.1/2)   3.03 (10/2)   3.03 (21)   6.05 (5/2)
+  6.05 (5.7/2)
 
-  Note that for aspects with an expression, e.g. ``Size``, the expression is
-  treated like a default expression (visibility is analyzed at the point of
-  occurrence of the aspect, but evaluation of the expression occurs at the
-  freeze point of the entity involved).
+.. index:: AI-0017 (Ada 2012 feature)
 
-  RM References:  3.02.01 (3)   3.02.02 (2)   3.03.01 (2/2)   3.08 (6)
-  3.09.03 (1.1/2)   6.01 (2/2)   6.07 (2/2)   9.05.02 (2/2)   7.01 (3)   7.03
-  (2)   7.03 (3)   9.01 (2/2)   9.01 (3/2)   9.04 (2/2)   9.04 (3/2)
-  9.05.02 (2/2)   11.01 (2)   12.01 (3)   12.03 (2/2)   12.04 (2/2)   12.05 (2)
-  12.06 (2.1/2)   12.06 (2.2/2)   12.07 (2)   13.01 (0.1/2)   13.03 (5/1)
-  13.03.01 (0)
+* *AI-0017 Freezing and incomplete types (0000-00-00)*
 
-.. index:: AI-0128 (Ada 2012 feature)
+  So-called 'Taft-amendment types' (i.e., types that are completed in package
+  bodies) are not frozen by the occurrence of bodies in the
+  enclosing declarative part. GNAT always implemented this properly.
 
-* *AI-0128 Inequality is a primitive operation (0000-00-00)*
+  RM References:  13.14 (3/1)
 
-  If an equality operator ("=") is declared for a type, then the implicitly
-  declared inequality operator ("/=") is a primitive operation of the type.
-  This is the only reasonable interpretation, and is the one always implemented
-  by GNAT, but the RM was not entirely clear in making this point.
+.. index:: AI-0019 (Ada 2012 feature)
 
-  RM References:  3.02.03 (6)   6.06 (6)
+* *AI-0019 Freezing of primitives for tagged types (0000-00-00)*
 
-.. index:: AI-0003 (Ada 2012 feature)
+  The RM suggests that primitive subprograms of a specific tagged type are
+  frozen when the tagged type is frozen. This would be an incompatible change
+  and is not intended. GNAT has never attempted this kind of freezing and its
+  behavior is consistent with the recommendation of this AI.
 
-* *AI-0003 Qualified expressions as names (2010-07-11)*
+  RM References:  13.14 (2)   13.14 (3/1)   13.14 (8.1/1)   13.14 (10)   13.14 (14)   13.14 (15.1/2)
 
-  In Ada 2012, a qualified expression is considered to be syntactically a name,
-  meaning that constructs such as ``A'(F(X)).B`` are now legal. This is
-  useful in disambiguating some cases of overloading.
+.. index:: AI-0026 (Ada 2012 feature)
 
-  RM References:  3.03 (11)   3.03 (21)   4.01 (2)   4.04 (7)   4.07 (3)
-  5.04 (7)
+* *AI-0026 Missing rules for Unchecked_Union (2010-07-07)*
 
-.. index:: AI-0120 (Ada 2012 feature)
+  Record representation clauses concerning Unchecked_Union types cannot mention
+  the discriminant of the type. The type of a component declared in the variant
+  part of an Unchecked_Union cannot be controlled, have controlled components,
+  nor have protected or task parts. If an Unchecked_Union type is declared
+  within the body of a generic unit or its descendants, then the type of a
+  component declared in the variant part cannot be a formal private type or a
+  formal private extension declared within the same generic unit.
 
-* *AI-0120 Constant instance of protected object (0000-00-00)*
+  RM References:  7.06 (9.4/2)   B.03.03 (9/2)   B.03.03 (10/2)
 
-  This is an RM editorial change only. The section that lists objects that are
-  constant failed to include the current instance of a protected object
-  within a protected function. This has always been treated as a constant
-  in GNAT.
+.. index:: AI-0030 (Ada 2012 feature)
 
-  RM References:  3.03 (21)
+* *AI-0030 Requeue on synchronized interfaces (2010-07-19)*
 
-.. index:: AI-0008 (Ada 2012 feature)
+  Requeue is permitted to a protected, synchronized or task interface primitive
+  providing it is known that the overriding operation is an entry. Otherwise
+  the requeue statement has the same effect as a procedure call. Use of pragma
+  ``Implemented`` provides a way to impose a static requirement on the
+  overriding operation by adhering to one of the implementation kinds: entry,
+  protected procedure or any of the above.
 
-* *AI-0008 General access to constrained objects (0000-00-00)*
+  RM References:  9.05 (9)   9.05.04 (2)   9.05.04 (3)   9.05.04 (5)
+  9.05.04 (6)   9.05.04 (7)   9.05.04 (12)
 
-  The wording in the RM implied that if you have a general access to a
-  constrained object, it could be used to modify the discriminants. This was
-  obviously not intended. ``Constraint_Error`` should be raised, and GNAT
-  has always done so in this situation.
+.. index:: AI-0031 (Ada 2012 feature)
 
-  RM References:  3.03 (23)   3.10.02 (26/2)   4.01 (9)   6.04.01 (17)   8.05.01 (5/2)
+* *AI-0031 Add From parameter to Find_Token (2010-07-25)*
 
-.. index:: AI-0093 (Ada 2012 feature)
+  A new version of ``Find_Token`` is added to all relevant string packages,
+  with an extra parameter ``From``. Instead of starting at the first
+  character of the string, the search for a matching Token starts at the
+  character indexed by the value of ``From``.
+  These procedures are available in all versions of Ada
+  but if used in versions earlier than Ada 2012 they will generate a warning
+  that an Ada 2012 subprogram is being used.
 
-* *AI-0093 Additional rules use immutably limited (0000-00-00)*
+  RM References:  A.04.03 (16)   A.04.03 (67)   A.04.03 (68/1)   A.04.04 (51)
+  A.04.05 (46)
 
-  This is an editorial change only, to make more widespread use of the Ada 2012
-  'immutably limited'.
+.. index:: AI-0032 (Ada 2012 feature)
 
-  RM References:  3.03 (23.4/3)
+* *AI-0032 Extended return for class-wide functions (0000-00-00)*
 
-.. index:: AI-0096 (Ada 2012 feature)
+  If a function returns a class-wide type, the object of an extended return
+  statement can be declared with a specific type that is covered by the class-
+  wide type. This has been implemented in GNAT since the introduction of
+  extended returns. Note AI-0103 complements this AI by imposing matching
+  rules for constrained return types.
 
-* *AI-0096 Deriving from formal private types (2010-07-20)*
+  RM References:  6.05 (5.2/2)   6.05 (5.3/2)   6.05 (5.6/2)   6.05 (5.8/2)
+  6.05 (8/2)
 
-  In general it is illegal for a type derived from a formal limited type to be
-  nonlimited.  This AI makes an exception to this rule: derivation is legal
-  if it appears in the private part of the generic, and the formal type is not
-  tagged. If the type is tagged, the legality check must be applied to the
-  private part of the package.
+.. index:: AI-0033 (Ada 2012 feature)
 
-  RM References:  3.04 (5.1/2)   6.02 (7)
+* *AI-0033 Attach/Interrupt_Handler in generic (2010-07-24)*
 
-.. index:: AI-0181 (Ada 2012 feature)
+  Neither of these two pragmas may appear within a generic template, because
+  the generic might be instantiated at other than the library level.
 
-* *AI-0181 Soft hyphen is a non-graphic character (2010-07-23)*
+  RM References:  13.11.02 (16)   C.03.01 (7/2)   C.03.01 (8/2)
 
-  From Ada 2005 on, soft hyphen is considered a non-graphic character, which
-  means that it has a special name (``SOFT_HYPHEN``) in conjunction with the
-  ``Image`` and ``Value`` attributes for the character types. Strictly
-  speaking this is an inconsistency with Ada 95, but in practice the use of
-  these attributes is so obscure that it will not cause problems.
+.. index:: AI-0034 (Ada 2012 feature)
 
-  RM References:  3.05.02 (2/2)   A.01 (35/2)   A.03.03 (21)
+* *AI-0034 Categorization of limited views (0000-00-00)*
 
-.. index:: AI-0182 (Ada 2012 feature)
+  The RM makes certain limited with clauses illegal because of categorization
+  considerations, when the corresponding normal with would be legal. This is
+  not intended, and GNAT has always implemented the recommended behavior.
 
-* *AI-0182 Additional forms for* ``Character'Value`` *(0000-00-00)*
+  RM References:  10.02.01 (11/1)   10.02.01 (17/2)
 
-  This AI allows ``Character'Value`` to accept the string ``'?'`` where
-  ``?`` is any character including non-graphic control characters. GNAT has
-  always accepted such strings. It also allows strings such as
-  ``HEX_00000041`` to be accepted, but GNAT does not take advantage of this
-  permission and raises ``Constraint_Error``, as is certainly still
-  permitted.
+.. index:: AI-0035 (Ada 2012 feature)
 
-  RM References:  3.05 (56/2)
+* *AI-0035 Inconsistencies with Pure units (0000-00-00)*
 
-.. index:: AI-0214 (Ada 2012 feature)
+  This AI remedies some inconsistencies in the legality rules for Pure units.
+  Derived access types are legal in a pure unit (on the assumption that the
+  rule for a zero storage pool size has been enforced on the ancestor type).
+  The rules are enforced in generic instances and in subunits. GNAT has always
+  implemented the recommended behavior.
 
-* *AI-0214 Defaulted discriminants for limited tagged (2010-10-01)*
+  RM References:  10.02.01 (15.1/2)   10.02.01 (15.4/2)   10.02.01 (15.5/2)   10.02.01 (17/2)
 
-  Ada 2012 relaxes the restriction that forbids discriminants of tagged types
-  to have default expressions by allowing them when the type is limited. It
-  is often useful to define a default value for a discriminant even though
-  it can't be changed by assignment.
+.. index:: AI-0037 (Ada 2012 feature)
 
-  RM References:  3.07 (9.1/2)   3.07.02 (3)
+* *AI-0037 Out-of-range box associations in aggregate (0000-00-00)*
 
-.. index:: AI-0102 (Ada 2012 feature)
+  This AI confirms that an association of the form ``Indx => <>`` in an
+  array aggregate must raise ``Constraint_Error`` if ``Indx``
+  is out of range. The RM specified a range check on other associations, but
+  not when the value of the association was defaulted. GNAT has always inserted
+  a constraint check on the index value.
 
-* *AI-0102 Some implicit conversions are illegal (0000-00-00)*
+  RM References:  4.03.03 (29)
 
-  It is illegal to assign an anonymous access constant to an anonymous access
-  variable. The RM did not have a clear rule to prevent this, but GNAT has
-  always generated an error for this usage.
+.. index:: AI-0038 (Ada 2012 feature)
 
-  RM References:  3.07 (16)   3.07.01 (9)   6.04.01 (6)   8.06 (27/2)
+* *AI-0038 Minor errors in Text_IO (0000-00-00)*
 
-.. index:: AI-0158 (Ada 2012 feature)
+  These are minor errors in the description on three points. The intent on
+  all these points has always been clear, and GNAT has always implemented the
+  correct intended semantics.
 
-* *AI-0158 Generalizing membership tests (2010-09-16)*
+  RM References:  A.10.05 (37)   A.10.07 (8/1)   A.10.07 (10)   A.10.07 (12)   A.10.08 (10)   A.10.08 (24)
 
-  This AI extends the syntax of membership tests to simplify complex conditions
-  that can be expressed as membership in a subset of values of any type. It
-  introduces syntax for a list of expressions that may be used in loop contexts
-  as well.
+.. index:: AI-0039 (Ada 2012 feature)
 
-  RM References:  3.08.01 (5)   4.04 (3)   4.05.02 (3)   4.05.02 (5)   4.05.02 (27)
+* *AI-0039 Stream attributes cannot be dynamic (0000-00-00)*
 
-.. index:: AI-0173 (Ada 2012 feature)
+  The RM permitted the use of dynamic expressions (such as ``ptr.all``)`
+  for stream attributes, but these were never useful and are now illegal. GNAT
+  has always regarded such expressions as illegal.
 
-* *AI-0173 Testing if tags represent abstract types (2010-07-03)*
+  RM References:  13.03 (4)   13.03 (6)   13.13.02 (38/2)
 
-  The function ``Ada.Tags.Type_Is_Abstract`` returns ``True`` if invoked
-  with the tag of an abstract type, and ``False`` otherwise.
+.. index:: AI-0040 (Ada 2012 feature)
+
+* *AI-0040 Limited with clauses on descendant (0000-00-00)*
+
+  This AI confirms that a limited with clause in a child unit cannot name
+  an ancestor of the unit. This has always been checked in GNAT.
+
+  RM References:  10.01.02 (20/2)
+
+.. index:: AI-0042 (Ada 2012 feature)
+
+* *AI-0042 Overriding versus implemented-by (0000-00-00)*
+
+  This AI fixes a wording gap in the RM. An operation of a synchronized
+  interface can be implemented by a protected or task entry, but the abstract
+  operation is not being overridden in the usual sense, and it must be stated
+  separately that this implementation is legal. This has always been the case
+  in GNAT.
+
+  RM References:  9.01 (9.2/2)   9.04 (11.1/2)
+
+.. index:: AI-0043 (Ada 2012 feature)
+
+* *AI-0043 Rules about raising exceptions (0000-00-00)*
+
+  This AI covers various omissions in the RM regarding the raising of
+  exceptions. GNAT has always implemented the intended semantics.
+
+  RM References:  11.04.01 (10.1/2)   11 (2)
+
+.. index:: AI-0044 (Ada 2012 feature)
+
+* *AI-0044 Restrictions on container instantiations (0000-00-00)*
+
+  This AI places restrictions on allowed instantiations of generic containers.
+  These restrictions are not checked by the compiler, so there is nothing to
+  change in the implementation. This affects only the RM documentation.
+
+  RM References:  A.18 (4/2)   A.18.02 (231/2)   A.18.03 (145/2)   A.18.06 (56/2)   A.18.08 (66/2)   A.18.09 (79/2)   A.18.26 (5/2)   A.18.26 (9/2)
+
+.. index:: AI-0046 (Ada 2012 feature)
+
+* *AI-0046 Null exclusion match for full conformance (2010-07-17)*
+
+  For full conformance, in the case of access parameters, the null exclusion
+  must match (either both or neither must have ``not null``).
+
+  RM References:  6.03.02 (18)
+
+.. index:: AI-0050 (Ada 2012 feature)
+
+* *AI-0050 Raising Constraint_Error early for function call (0000-00-00)*
+
+  The implementation permissions for raising ``Constraint_Error`` early on a function call
+  when it was clear an exception would be raised were over-permissive and allowed
+  mishandling of discriminants in some cases. GNAT did
+  not take advantage of these incorrect permissions in any case.
 
-  RM References:  3.09 (7.4/2)   3.09 (12.4/2)
+  RM References:  6.05 (24/2)
 
-.. index:: AI-0076 (Ada 2012 feature)
+.. index:: AI-0056 (Ada 2012 feature)
 
-* *AI-0076 function with controlling result (0000-00-00)*
+* *AI-0056 Index on null string returns zero (0000-00-00)*
 
-  This is an editorial change only. The RM defines calls with controlling
-  results, but uses the term 'function with controlling result' without an
-  explicit definition.
+  The wording in the Ada 2005 RM implied an incompatible handling of the
+  ``Index`` functions, resulting in raising an exception instead of
+  returning zero in some situations.
+  This was not intended and has been corrected.
+  GNAT always returned zero, and is thus consistent with this AI.
 
-  RM References:  3.09.02 (2/2)
+  RM References:  A.04.03 (56.2/2)   A.04.03 (58.5/2)
 
-.. index:: AI-0126 (Ada 2012 feature)
+.. index:: AI-0058 (Ada 2012 feature)
 
-* *AI-0126 Dispatching with no declared operation (0000-00-00)*
+* *AI-0058 Abnormal completion of an extended return (0000-00-00)*
 
-  This AI clarifies dispatching rules, and simply confirms that dispatching
-  executes the operation of the parent type when there is no explicitly or
-  implicitly declared operation for the descendant type. This has always been
-  the case in all versions of GNAT.
+  The RM had some incorrect wording implying wrong treatment of abnormal
+  completion in an extended return. GNAT has always implemented the intended
+  correct semantics as described by this AI.
 
-  RM References:  3.09.02 (20/2)   3.09.02 (20.1/2)   3.09.02 (20.2/2)
+  RM References:  6.05 (22/2)
 
-.. index:: AI-0097 (Ada 2012 feature)
+.. index:: AI-0060 (Ada 2012 feature)
 
-* *AI-0097 Treatment of abstract null extension (2010-07-19)*
+* *AI-0060 Extended definition of remote access types (0000-00-00)*
 
-  The RM as written implied that in some cases it was possible to create an
-  object of an abstract type, by having an abstract extension inherit a non-
-  abstract constructor from its parent type. This mistake has been corrected
-  in GNAT and in the RM, and this construct is now illegal.
+  This AI extends the definition of remote access types to include access
+  to limited, synchronized, protected or task class-wide interface types.
+  GNAT already implemented this extension.
 
-  RM References:  3.09.03 (4/2)
+  RM References:  A (4)   E.02.02 (9/1)   E.02.02 (9.2/1)   E.02.02 (14/2)   E.02.02 (18)
 
-.. index:: AI-0203 (Ada 2012 feature)
+.. index:: AI-0062 (Ada 2012 feature)
 
-* *AI-0203 Extended return cannot be abstract (0000-00-00)*
+* *AI-0062 Null exclusions and deferred constants (0000-00-00)*
 
-  A return_subtype_indication cannot denote an abstract subtype. GNAT has never
-  permitted such usage.
+  A full constant may have a null exclusion even if its associated deferred
+  constant does not. GNAT has always allowed this.
 
-  RM References:  3.09.03 (8/3)
+  RM References:  7.04 (6/2)   7.04 (7.1/2)
 
-.. index:: AI-0198 (Ada 2012 feature)
+.. index:: AI-0064 (Ada 2012 feature)
 
-* *AI-0198 Inheriting abstract operators  (0000-00-00)*
+* *AI-0064 Redundant finalization rule (0000-00-00)*
 
-  This AI resolves a conflict between two rules involving inherited abstract
-  operations and predefined operators. If a derived numeric type inherits
-  an abstract operator, it overrides the predefined one. This interpretation
-  was always the one implemented in GNAT.
+  This is an editorial change only. The intended behavior is already checked
+  by an existing ACATS test, which GNAT has always executed correctly.
 
-  RM References:  3.09.03 (4/3)
+  RM References:  7.06.01 (17.1/1)
 
-.. index:: AI-0073 (Ada 2012 feature)
+.. index:: AI-0065 (Ada 2012 feature)
 
-* *AI-0073 Functions returning abstract types (2010-07-10)*
+* *AI-0065 Remote access types and external streaming (0000-00-00)*
 
-  This AI covers a number of issues regarding returning abstract types. In
-  particular generic functions cannot have abstract result types or access
-  result types designated an abstract type. There are some other cases which
-  are detailed in the AI. Note that this binding interpretation has not been
-  retrofitted to operate before Ada 2012 mode, since it caused a significant
-  number of regressions.
+  This AI clarifies the fact that all remote access types support external
+  streaming. This fixes an obvious oversight in the definition of the
+  language, and GNAT always implemented the intended correct rules.
 
-  RM References:  3.09.03 (8)   3.09.03 (10)   6.05 (8/2)
+  RM References:  13.13.02 (52/2)
 
 .. index:: AI-0070 (Ada 2012 feature)
 
@@ -377,107 +390,87 @@ Supported Aspect                     Source
 
   RM References:  3.09.04 (18/2)
 
-.. index:: AI-0208 (Ada 2012 feature)
-
-* *AI-0208 Characteristics of incomplete views (0000-00-00)*
-
-  The wording in the Ada 2005 RM concerning characteristics of incomplete views
-  was incorrect and implied that some programs intended to be legal were now
-  illegal. GNAT had never considered such programs illegal, so it has always
-  implemented the intent of this AI.
-
-  RM References:  3.10.01 (2.4/2)   3.10.01 (2.6/2)
-
-.. index:: AI-0162 (Ada 2012 feature)
+.. index:: AI-0072 (Ada 2012 feature)
 
-* *AI-0162 Incomplete type completed by partial view (2010-09-15)*
+* *AI-0072 Task signalling using 'Terminated (0000-00-00)*
 
-  Incomplete types are made more useful by allowing them to be completed by
-  private types and private extensions.
+  This AI clarifies that task signalling for reading ``'Terminated`` only
+  occurs if the result is True. GNAT semantics has always been consistent with
+  this notion of task signalling.
 
-  RM References:  3.10.01 (2.5/2)   3.10.01 (2.6/2)   3.10.01 (3)   3.10.01 (4/2)
+  RM References:  9.10 (6.1/1)
 
-.. index:: AI-0098 (Ada 2012 feature)
+.. index:: AI-0073 (Ada 2012 feature)
 
-* *AI-0098 Anonymous subprogram access restrictions (0000-00-00)*
+* *AI-0073 Functions returning abstract types (2010-07-10)*
 
-  An unintentional omission in the RM implied some inconsistent restrictions on
-  the use of anonymous access to subprogram values. These restrictions were not
-  intentional, and have never been enforced by GNAT.
+  This AI covers a number of issues regarding returning abstract types. In
+  particular generic functions cannot have abstract result types or access
+  result types designated an abstract type. There are some other cases which
+  are detailed in the AI. Note that this binding interpretation has not been
+  retrofitted to operate before Ada 2012 mode, since it caused a significant
+  number of regressions.
 
-  RM References:  3.10.01 (6)   3.10.01 (9.2/2)
+  RM References:  3.09.03 (8)   3.09.03 (10)   6.05 (8/2)
 
-.. index:: AI-0199 (Ada 2012 feature)
+.. index:: AI-0076 (Ada 2012 feature)
 
-* *AI-0199 Aggregate with anonymous access components (2010-07-14)*
+* *AI-0076 function with controlling result (0000-00-00)*
 
-  A choice list in a record aggregate can include several components of
-  (distinct) anonymous access types as long as they have matching designated
-  subtypes.
+  This is an editorial change only. The RM defines calls with controlling
+  results, but uses the term 'function with controlling result' without an
+  explicit definition.
 
-  RM References:  4.03.01 (16)
+  RM References:  3.09.02 (2/2)
 
-.. index:: AI-0220 (Ada 2012 feature)
+.. index:: AI-0077 (Ada 2012 feature)
 
-* *AI-0220 Needed components for aggregates (0000-00-00)*
+* *AI-0077 Limited withs and scope of declarations (0000-00-00)*
 
-  This AI addresses a wording problem in the RM that appears to permit some
-  complex cases of aggregates with nonstatic discriminants. GNAT has always
-  implemented the intended semantics.
+  This AI clarifies that a declaration does not include a context clause,
+  and confirms that it is illegal to have a context in which both a limited
+  and a nonlimited view of a package are accessible. Such double visibility
+  was always rejected by GNAT.
 
-  RM References:  4.03.01 (17)
+  RM References:  10.01.02 (12/2)   10.01.02 (21/2)   10.01.02 (22/2)
 
-.. index:: AI-0147 (Ada 2012 feature)
+.. index:: AI-0078 (Ada 2012 feature)
 
-* *AI-0147 Conditional expressions (2009-03-29)*
+* *AI-0078 Relax Unchecked_Conversion alignment rules (0000-00-00)*
 
-  Conditional expressions are permitted. The form of such an expression is:
+  In Ada 2012, compilers are required to support unchecked conversion where the
+  target alignment is a multiple of the source alignment. GNAT always supported
+  this case (and indeed all cases of differing alignments, doing copies where
+  required if the alignment was reduced).
 
-  ::
+  RM References:  13.09 (7)
 
-        (if expr then expr {elsif expr then expr} [else expr])
+.. index:: AI-0079 (Ada 2012 feature)
 
-  The parentheses can be omitted in contexts where parentheses are present
-  anyway, such as subprogram arguments and pragma arguments. If the **else**
-  clause is omitted, **else** *True* is assumed;
-  thus ``(if A then B)`` is a way to conveniently represent
-  *(A implies B)* in standard logic.
+* *AI-0079 Allow other_format characters in source (2010-07-10)*
 
-  RM References:  4.03.03 (15)   4.04 (1)   4.04 (7)   4.05.07 (0)   4.07 (2)
-  4.07 (3)   4.09 (12)   4.09 (33)   5.03 (3)   5.03 (4)   7.05 (2.1/2)
+  Wide characters in the unicode category *other_format* are now allowed in
+  source programs between tokens, but not within a token such as an identifier.
 
-.. index:: AI-0037 (Ada 2012 feature)
+  RM References:  2.01 (4/2)   2.02 (7)
 
-* *AI-0037 Out-of-range box associations in aggregate (0000-00-00)*
+.. index:: AI-0080 (Ada 2012 feature)
 
-  This AI confirms that an association of the form ``Indx => <>`` in an
-  array aggregate must raise ``Constraint_Error`` if ``Indx``
-  is out of range. The RM specified a range check on other associations, but
-  not when the value of the association was defaulted. GNAT has always inserted
-  a constraint check on the index value.
+* *AI-0080 'View of' not needed if clear from context (0000-00-00)*
 
-  RM References:  4.03.03 (29)
+  This is an editorial change only, described as non-testable in the AI.
 
-.. index:: AI-0123 (Ada 2012 feature)
+  RM References:  3.01 (7)
 
-* *AI-0123 Composability of equality (2010-04-13)*
+.. index:: AI-0087 (Ada 2012 feature)
 
-  Equality of untagged record composes, so that the predefined equality for a
-  composite type that includes a component of some untagged record type
-  ``R`` uses the equality operation of ``R`` (which may be user-defined
-  or predefined). This makes the behavior of untagged records identical to that
-  of tagged types in this respect.
+* *AI-0087 Actual for formal nonlimited derived type (2010-07-15)*
 
-  This change is an incompatibility with previous versions of Ada, but it
-  corrects a non-uniformity that was often a source of confusion. Analysis of
-  a large number of industrial programs indicates that in those rare cases
-  where a composite type had an untagged record component with a user-defined
-  equality, either there was no use of the composite equality, or else the code
-  expected the same composability as for tagged types, and thus had a bug that
-  would be fixed by this change.
+  The actual for a formal nonlimited derived type cannot be limited. In
+  particular, a formal derived type that extends a limited interface but which
+  is not explicitly limited cannot be instantiated with a limited type.
 
-  RM References:  4.05.02 (9.7/2)   4.05.02 (14)   4.05.02 (15)   4.05.02 (24)
-  8.05.04 (8)
+  RM References:  7.05 (5/2)   12.05.01 (5.1/2)
 
 .. index:: AI-0088 (Ada 2012 feature)
 
@@ -491,128 +484,100 @@ Supported Aspect                     Source
 
   RM References:  4.05.06 (11)
 
-.. index:: AI-0188 (Ada 2012 feature)
-
-* *AI-0188 Case expressions (2010-01-09)*
-
-  Case expressions are permitted. This allows use of constructs such as:
-
-  .. code-block:: ada
-
-      X := (case Y is when 1 => 2, when 2 => 3, when others => 31)
-
-  RM References:  4.05.07 (0)   4.05.08 (0)   4.09 (12)   4.09 (33)
-
-.. index:: AI-0104 (Ada 2012 feature)
-
-* *AI-0104 Null exclusion and uninitialized allocator (2010-07-15)*
-
-  The assignment ``Ptr := new not null Some_Ptr;`` will raise
-  ``Constraint_Error`` because the default value of the allocated object is
-  **null**. This useless construct is illegal in Ada 2012.
-
-  RM References:  4.08 (2)
-
-.. index:: AI-0157 (Ada 2012 feature)
-
-* *AI-0157 Allocation/Deallocation from empty pool (2010-07-11)*
-
-  Allocation and Deallocation from an empty storage pool (i.e. allocation or
-  deallocation of a pointer for which a static storage size clause of zero
-  has been given) is now illegal and is detected as such. GNAT
-  previously gave a warning but not an error.
-
-  RM References:  4.08 (5.3/2)   13.11.02 (4)   13.11.02 (17)
-
-.. index:: AI-0179 (Ada 2012 feature)
-
-* *AI-0179 Statement not required after label (2010-04-10)*
+.. index:: AI-0091 (Ada 2012 feature)
 
-  It is not necessary to have a statement following a label, so a label
-  can appear at the end of a statement sequence without the need for putting a
-  null statement afterwards, but it is not allowable to have only labels and
-  no real statements in a statement sequence.
+* *AI-0091 Do not allow other_format in identifiers (0000-00-00)*
 
-  RM References:  5.01 (2)
+  Wide characters in the unicode category *other_format* are not permitted
+  within  an identifier, since this can be a security problem. The error
+  message for this case has been improved to be more specific, but GNAT has
+  never allowed such characters to appear in identifiers.
 
-.. index:: AI-0139-2 (Ada 2012 feature)
+  RM References:  2.03 (3.1/2)   2.03 (4/2)   2.03 (5/2)   2.03 (5.1/2)   2.03 (5.2/2)   2.03 (5.3/2)   2.09 (2/2)
 
-* *AI-0139-2 Syntactic sugar for iterators (2010-09-29)*
+.. index:: AI-0093 (Ada 2012 feature)
 
-  The new syntax for iterating over arrays and containers is now implemented.
-  Iteration over containers is for now limited to read-only iterators. Only
-  default iterators are supported, with the syntax:  ``for Elem of C``.
+* *AI-0093 Additional rules use immutably limited (0000-00-00)*
 
-  RM References:  5.05
+  This is an editorial change only, to make more widespread use of the Ada 2012
+  'immutably limited'.
 
-.. index:: AI-0134 (Ada 2012 feature)
+  RM References:  3.03 (23.4/3)
 
-* *AI-0134 Profiles must match for full conformance (0000-00-00)*
+.. index:: AI-0095 (Ada 2012 feature)
 
-  For full conformance, the profiles of anonymous-access-to-subprogram
-  parameters must match. GNAT has always enforced this rule.
+* *AI-0095 Address of intrinsic subprograms (0000-00-00)*
 
-  RM References:  6.03.01 (18)
+  The prefix of ``'Address`` cannot statically denote a subprogram with
+  convention ``Intrinsic``. The use of the ``Address`` attribute raises
+  ``Program_Error`` if the prefix denotes a subprogram with convention
+  ``Intrinsic``.
 
-.. index:: AI-0207 (Ada 2012 feature)
+  RM References:  13.03 (11/1)
 
-* *AI-0207 Mode conformance and access constant (0000-00-00)*
+.. index:: AI-0096 (Ada 2012 feature)
 
-  This AI confirms that access_to_constant indication must match for mode
-  conformance. This was implemented in GNAT when the qualifier was originally
-  introduced in Ada 2005.
+* *AI-0096 Deriving from formal private types (2010-07-20)*
 
-  RM References:  6.03.01 (16/2)
+  In general it is illegal for a type derived from a formal limited type to be
+  nonlimited.  This AI makes an exception to this rule: derivation is legal
+  if it appears in the private part of the generic, and the formal type is not
+  tagged. If the type is tagged, the legality check must be applied to the
+  private part of the package.
 
-.. index:: AI-0046 (Ada 2012 feature)
+  RM References:  3.04 (5.1/2)   6.02 (7)
 
-* *AI-0046 Null exclusion match for full conformance (2010-07-17)*
+.. index:: AI-0097 (Ada 2012 feature)
 
-  For full conformance, in the case of access parameters, the null exclusion
-  must match (either both or neither must have ``not null``).
+* *AI-0097 Treatment of abstract null extension (2010-07-19)*
 
-  RM References:  6.03.02 (18)
+  The RM as written implied that in some cases it was possible to create an
+  object of an abstract type, by having an abstract extension inherit a non-
+  abstract constructor from its parent type. This mistake has been corrected
+  in GNAT and in the RM, and this construct is now illegal.
 
-.. index:: AI-0118 (Ada 2012 feature)
+  RM References:  3.09.03 (4/2)
 
-* *AI-0118 The association of parameter associations (0000-00-00)*
+.. index:: AI-0098 (Ada 2012 feature)
 
-  This AI clarifies the rules for named associations in subprogram calls and
-  generic instantiations. The rules have been in place since Ada 83.
+* *AI-0098 Anonymous subprogram access restrictions (0000-00-00)*
 
-  RM References:  6.04.01 (2)   12.03 (9)
+  An unintentional omission in the RM implied some inconsistent restrictions on
+  the use of anonymous access to subprogram values. These restrictions were not
+  intentional, and have never been enforced by GNAT.
 
-.. index:: AI-0196 (Ada 2012 feature)
+  RM References:  3.10.01 (6)   3.10.01 (9.2/2)
 
-* *AI-0196 Null exclusion tests for out parameters (0000-00-00)*
+.. index:: AI-0099 (Ada 2012 feature)
 
-  Null exclusion checks are not made for ``out`` parameters when
-  evaluating the actual parameters. GNAT has never generated these checks.
+* *AI-0099 Tag determines whether finalization needed (0000-00-00)*
 
-  RM References:  6.04.01 (13)
+  This AI clarifies that 'needs finalization' is part of dynamic semantics,
+  and therefore depends on the run-time characteristics of an object (i.e. its
+  tag) and not on its nominal type. As the AI indicates: "we do not expect
+  this to affect any implementation''.
 
-.. index:: AI-0015 (Ada 2012 feature)
+  RM References:  7.06.01 (6)   7.06.01 (7)   7.06.01 (8)   7.06.01 (9/2)
 
-* *AI-0015 Constant return objects (0000-00-00)*
+.. index:: AI-0100 (Ada 2012 feature)
 
-  The return object declared in an *extended_return_statement* may be
-  declared constant. This was always intended, and GNAT has always allowed it.
+* *AI-0100 Placement of pragmas  (2010-07-01)*
 
-  RM References:  6.05 (2.1/2)   3.03 (10/2)   3.03 (21)   6.05 (5/2)
-  6.05 (5.7/2)
+  This AI is an earlier version of AI-163. It simplifies the rules
+  for legal placement of pragmas. In the case of lists that allow pragmas, if
+  the list may have no elements, then the list may consist solely of pragmas.
 
-.. index:: AI-0032 (Ada 2012 feature)
+  RM References:  2.08 (7)
 
-* *AI-0032 Extended return for class-wide functions (0000-00-00)*
+.. index:: AI-0102 (Ada 2012 feature)
 
-  If a function returns a class-wide type, the object of an extended return
-  statement can be declared with a specific type that is covered by the class-
-  wide type. This has been implemented in GNAT since the introduction of
-  extended returns. Note AI-0103 complements this AI by imposing matching
-  rules for constrained return types.
+* *AI-0102 Some implicit conversions are illegal (0000-00-00)*
 
-  RM References:  6.05 (5.2/2)   6.05 (5.3/2)   6.05 (5.6/2)   6.05 (5.8/2)
-  6.05 (8/2)
+  It is illegal to assign an anonymous access constant to an anonymous access
+  variable. The RM did not have a clear rule to prevent this, but GNAT has
+  always generated an error for this usage.
+
+  RM References:  3.07 (16)   3.07.01 (9)   6.04.01 (6)   8.06 (27/2)
 
 .. index:: AI-0103 (Ada 2012 feature)
 
@@ -624,178 +589,170 @@ Supported Aspect                     Source
 
   RM References:  6.05 (5.2/2)
 
-.. index:: AI-0058 (Ada 2012 feature)
-
-* *AI-0058 Abnormal completion of an extended return (0000-00-00)*
-
-  The RM had some incorrect wording implying wrong treatment of abnormal
-  completion in an extended return. GNAT has always implemented the intended
-  correct semantics as described by this AI.
-
-  RM References:  6.05 (22/2)
+.. index:: AI-0104 (Ada 2012 feature)
 
-.. index:: AI-0050 (Ada 2012 feature)
+* *AI-0104 Null exclusion and uninitialized allocator (2010-07-15)*
 
-* *AI-0050 Raising Constraint_Error early for function call (0000-00-00)*
+  The assignment ``Ptr := new not null Some_Ptr;`` will raise
+  ``Constraint_Error`` because the default value of the allocated object is
+  **null**. This useless construct is illegal in Ada 2012.
 
-  The implementation permissions for raising ``Constraint_Error`` early on a function call
-  when it was clear an exception would be raised were over-permissive and allowed
-  mishandling of discriminants in some cases. GNAT did
-  not take advantage of these incorrect permissions in any case.
+  RM References:  4.08 (2)
 
-  RM References:  6.05 (24/2)
+.. index:: AI-0106 (Ada 2012 feature)
 
-.. index:: AI-0125 (Ada 2012 feature)
+* *AI-0106 No representation pragmas on generic formals (0000-00-00)*
 
-* *AI-0125 Nonoverridable operations of an ancestor (2010-09-28)*
+  The RM appeared to allow representation pragmas on generic formal parameters,
+  but this was not intended, and GNAT has never permitted this usage.
 
-  In Ada 2012, the declaration of a primitive operation of a type extension
-  or private extension can also override an inherited primitive that is not
-  visible at the point of this declaration.
+  RM References:  13.01 (9.1/1)
 
-  RM References:  7.03.01 (6)   8.03 (23)   8.03.01 (5/2)   8.03.01 (6/2)
+.. index:: AI-0108 (Ada 2012 feature)
 
-.. index:: AI-0062 (Ada 2012 feature)
+* *AI-0108 Limited incomplete view and discriminants (0000-00-00)*
 
-* *AI-0062 Null exclusions and deferred constants (0000-00-00)*
+  This AI confirms that an incomplete type from a limited view does not have
+  discriminants. This has always been the case in GNAT.
 
-  A full constant may have a null exclusion even if its associated deferred
-  constant does not. GNAT has always allowed this.
+  RM References:  10.01.01 (12.3/2)
 
-  RM References:  7.04 (6/2)   7.04 (7.1/2)
+.. index:: AI-0109 (Ada 2012 feature)
 
-.. index:: AI-0178 (Ada 2012 feature)
+* *AI-0109 Redundant check in S'Class'Input (0000-00-00)*
 
-* *AI-0178 Incomplete views are limited (0000-00-00)*
+  This AI is an editorial change only. It removes the need for a tag check
+  that can never fail.
 
-  This AI clarifies the role of incomplete views and plugs an omission in the
-  RM. GNAT always correctly restricted the use of incomplete views and types.
+  RM References:  13.13.02 (34/2)
 
-  RM References:  7.05 (3/2)   7.05 (6/2)
+.. index:: AI-0112 (Ada 2012 feature)
 
-.. index:: AI-0087 (Ada 2012 feature)
+* *AI-0112 Detection of duplicate pragmas (2010-07-24)*
 
-* *AI-0087 Actual for formal nonlimited derived type (2010-07-15)*
+  This AI concerns giving names to various representation aspects, but the
+  practical effect is simply to make the use of duplicate
+  ``Atomic[_Components]``,
+  ``Volatile[_Components]``, and
+  ``Independent[_Components]`` pragmas illegal, and GNAT
+  now performs this required check.
 
-  The actual for a formal nonlimited derived type cannot be limited. In
-  particular, a formal derived type that extends a limited interface but which
-  is not explicitly limited cannot be instantiated with a limited type.
+  RM References:  13.01 (8)
 
-  RM References:  7.05 (5/2)   12.05.01 (5.1/2)
+.. index:: AI-0114 (Ada 2012 feature)
 
-.. index:: AI-0099 (Ada 2012 feature)
+* *AI-0114 Classification of letters (0000-00-00)*
 
-* *AI-0099 Tag determines whether finalization needed (0000-00-00)*
+  The code points 170 (``FEMININE ORDINAL INDICATOR``),
+  181 (``MICRO SIGN``), and
+  186 (``MASCULINE ORDINAL INDICATOR``) are technically considered
+  lower case letters by Unicode.
+  However, they are not allowed in identifiers, and they
+  return ``False`` to ``Ada.Characters.Handling.Is_Letter/Is_Lower``.
+  This behavior is consistent with that defined in Ada 95.
 
-  This AI clarifies that 'needs finalization' is part of dynamic semantics,
-  and therefore depends on the run-time characteristics of an object (i.e. its
-  tag) and not on its nominal type. As the AI indicates: "we do not expect
-  this to affect any implementation''.
+  RM References:  A.03.02 (59)   A.04.06 (7)
 
-  RM References:  7.06.01 (6)   7.06.01 (7)   7.06.01 (8)   7.06.01 (9/2)
+.. index:: AI-0116 (Ada 2012 feature)
 
-.. index:: AI-0064 (Ada 2012 feature)
+* *AI-0116 Alignment of class-wide objects (0000-00-00)*
 
-* *AI-0064 Redundant finalization rule (0000-00-00)*
+  This AI requires that the alignment of a class-wide object be no greater
+  than the alignment of any type in the class. GNAT has always followed this
+  recommendation.
 
-  This is an editorial change only. The intended behavior is already checked
-  by an existing ACATS test, which GNAT has always executed correctly.
+  RM References:  13.03 (29)   13.11 (16)
 
-  RM References:  7.06.01 (17.1/1)
+.. index:: AI-0118 (Ada 2012 feature)
 
-.. index:: AI-0026 (Ada 2012 feature)
+* *AI-0118 The association of parameter associations (0000-00-00)*
 
-* *AI-0026 Missing rules for Unchecked_Union (2010-07-07)*
+  This AI clarifies the rules for named associations in subprogram calls and
+  generic instantiations. The rules have been in place since Ada 83.
 
-  Record representation clauses concerning Unchecked_Union types cannot mention
-  the discriminant of the type. The type of a component declared in the variant
-  part of an Unchecked_Union cannot be controlled, have controlled components,
-  nor have protected or task parts. If an Unchecked_Union type is declared
-  within the body of a generic unit or its descendants, then the type of a
-  component declared in the variant part cannot be a formal private type or a
-  formal private extension declared within the same generic unit.
+  RM References:  6.04.01 (2)   12.03 (9)
 
-  RM References:  7.06 (9.4/2)   B.03.03 (9/2)   B.03.03 (10/2)
+.. index:: AI-0120 (Ada 2012 feature)
 
-.. index:: AI-0205 (Ada 2012 feature)
+* *AI-0120 Constant instance of protected object (0000-00-00)*
 
-* *AI-0205 Extended return declares visible name (0000-00-00)*
+  This is an RM editorial change only. The section that lists objects that are
+  constant failed to include the current instance of a protected object
+  within a protected function. This has always been treated as a constant
+  in GNAT.
 
-  This AI corrects a simple omission in the RM. Return objects have always
-  been visible within an extended return statement.
+  RM References:  3.03 (21)
 
-  RM References:  8.03 (17)
+.. index:: AI-0122 (Ada 2012 feature)
 
-.. index:: AI-0042 (Ada 2012 feature)
+* *AI-0122 Private with and children of generics (0000-00-00)*
 
-* *AI-0042 Overriding versus implemented-by (0000-00-00)*
+  This AI clarifies the visibility of private children of generic units within
+  instantiations of a parent. GNAT has always handled this correctly.
 
-  This AI fixes a wording gap in the RM. An operation of a synchronized
-  interface can be implemented by a protected or task entry, but the abstract
-  operation is not being overridden in the usual sense, and it must be stated
-  separately that this implementation is legal. This has always been the case
-  in GNAT.
+  RM References:  10.01.02 (12/2)
 
-  RM References:  9.01 (9.2/2)   9.04 (11.1/2)
+.. index:: AI-0123 (Ada 2012 feature)
 
-.. index:: AI-0030 (Ada 2012 feature)
+* *AI-0123 Composability of equality (2010-04-13)*
 
-* *AI-0030 Requeue on synchronized interfaces (2010-07-19)*
+  Equality of untagged record composes, so that the predefined equality for a
+  composite type that includes a component of some untagged record type
+  ``R`` uses the equality operation of ``R`` (which may be user-defined
+  or predefined). This makes the behavior of untagged records identical to that
+  of tagged types in this respect.
 
-  Requeue is permitted to a protected, synchronized or task interface primitive
-  providing it is known that the overriding operation is an entry. Otherwise
-  the requeue statement has the same effect as a procedure call. Use of pragma
-  ``Implemented`` provides a way to impose a static requirement on the
-  overriding operation by adhering to one of the implementation kinds: entry,
-  protected procedure or any of the above.
+  This change is an incompatibility with previous versions of Ada, but it
+  corrects a non-uniformity that was often a source of confusion. Analysis of
+  a large number of industrial programs indicates that in those rare cases
+  where a composite type had an untagged record component with a user-defined
+  equality, either there was no use of the composite equality, or else the code
+  expected the same composability as for tagged types, and thus had a bug that
+  would be fixed by this change.
 
-  RM References:  9.05 (9)   9.05.04 (2)   9.05.04 (3)   9.05.04 (5)
-  9.05.04 (6)   9.05.04 (7)   9.05.04 (12)
+  RM References:  4.05.02 (9.7/2)   4.05.02 (14)   4.05.02 (15)   4.05.02 (24)
+  8.05.04 (8)
 
-.. index:: AI-0201 (Ada 2012 feature)
+.. index:: AI-0125 (Ada 2012 feature)
 
-* *AI-0201 Independence of atomic object components (2010-07-22)*
+* *AI-0125 Nonoverridable operations of an ancestor (2010-09-28)*
 
-  If an Atomic object has a pragma ``Pack`` or a ``Component_Size``
-  attribute, then individual components may not be addressable by independent
-  tasks. However, if the representation clause has no effect (is confirming),
-  then independence is not compromised. Furthermore, in GNAT, specification of
-  other appropriately addressable component sizes (e.g. 16 for 8-bit
-  characters) also preserves independence. GNAT now gives very clear warnings
-  both for the declaration of such a type, and for any assignment to its components.
+  In Ada 2012, the declaration of a primitive operation of a type extension
+  or private extension can also override an inherited primitive that is not
+  visible at the point of this declaration.
 
-  RM References:  9.10 (1/3)   C.06 (22/2)   C.06 (23/2)
+  RM References:  7.03.01 (6)   8.03 (23)   8.03.01 (5/2)   8.03.01 (6/2)
 
-.. index:: AI-0009 (Ada 2012 feature)
+.. index:: AI-0126 (Ada 2012 feature)
 
-* *AI-0009 Pragma Independent[_Components] (2010-07-23)*
+* *AI-0126 Dispatching with no declared operation (0000-00-00)*
 
-  This AI introduces the new pragmas ``Independent`` and
-  ``Independent_Components``,
-  which control guaranteeing independence of access to objects and components.
-  The AI also requires independence not unaffected by confirming rep clauses.
+  This AI clarifies dispatching rules, and simply confirms that dispatching
+  executes the operation of the parent type when there is no explicitly or
+  implicitly declared operation for the descendant type. This has always been
+  the case in all versions of GNAT.
 
-  RM References:  9.10 (1)   13.01 (15/1)   13.02 (9)   13.03 (13)   C.06 (2)
-  C.06 (4)   C.06 (6)   C.06 (9)   C.06 (13)   C.06 (14)
+  RM References:  3.09.02 (20/2)   3.09.02 (20.1/2)   3.09.02 (20.2/2)
 
-.. index:: AI-0072 (Ada 2012 feature)
+.. index:: AI-0127 (Ada 2012 feature)
 
-* *AI-0072 Task signalling using 'Terminated (0000-00-00)*
+* *AI-0127 Adding Locale Capabilities (2010-09-29)*
 
-  This AI clarifies that task signalling for reading ``'Terminated`` only
-  occurs if the result is True. GNAT semantics has always been consistent with
-  this notion of task signalling.
+  This package provides an interface for identifying the current locale.
 
-  RM References:  9.10 (6.1/1)
+  RM References:  A.19    A.19.01    A.19.02    A.19.03    A.19.05    A.19.06
+  A.19.07    A.19.08    A.19.09    A.19.10    A.19.11    A.19.12    A.19.13
 
-.. index:: AI-0108 (Ada 2012 feature)
+.. index:: AI-0128 (Ada 2012 feature)
 
-* *AI-0108 Limited incomplete view and discriminants (0000-00-00)*
+* *AI-0128 Inequality is a primitive operation (0000-00-00)*
 
-  This AI confirms that an incomplete type from a limited view does not have
-  discriminants. This has always been the case in GNAT.
+  If an equality operator ("=") is declared for a type, then the implicitly
+  declared inequality operator ("/=") is a primitive operation of the type.
+  This is the only reasonable interpretation, and is the one always implemented
+  by GNAT, but the RM was not entirely clear in making this point.
 
-  RM References:  10.01.01 (12.3/2)
+  RM References:  3.02.03 (6)   6.06 (6)
 
 .. index:: AI-0129 (Ada 2012 feature)
 
@@ -809,35 +766,6 @@ Supported Aspect                     Source
 
   RM References:  10.01.01 (12.2/2)   10.01.01 (12.3/2)
 
-.. index:: AI-0077 (Ada 2012 feature)
-
-* *AI-0077 Limited withs and scope of declarations (0000-00-00)*
-
-  This AI clarifies that a declaration does not include a context clause,
-  and confirms that it is illegal to have a context in which both a limited
-  and a nonlimited view of a package are accessible. Such double visibility
-  was always rejected by GNAT.
-
-  RM References:  10.01.02 (12/2)   10.01.02 (21/2)   10.01.02 (22/2)
-
-.. index:: AI-0122 (Ada 2012 feature)
-
-* *AI-0122 Private with and children of generics (0000-00-00)*
-
-  This AI clarifies the visibility of private children of generic units within
-  instantiations of a parent. GNAT has always handled this correctly.
-
-  RM References:  10.01.02 (12/2)
-
-.. index:: AI-0040 (Ada 2012 feature)
-
-* *AI-0040 Limited with clauses on descendant (0000-00-00)*
-
-  This AI confirms that a limited with clause in a child unit cannot name
-  an ancestor of the unit. This has always been checked in GNAT.
-
-  RM References:  10.01.02 (20/2)
-
 .. index:: AI-0132 (Ada 2012 feature)
 
 * *AI-0132 Placement of library unit pragmas (0000-00-00)*
@@ -848,175 +776,173 @@ Supported Aspect                     Source
 
   RM References:  10.01.05 (7)
 
-.. index:: AI-0034 (Ada 2012 feature)
-
-* *AI-0034 Categorization of limited views (0000-00-00)*
-
-  The RM makes certain limited with clauses illegal because of categorization
-  considerations, when the corresponding normal with would be legal. This is
-  not intended, and GNAT has always implemented the recommended behavior.
-
-  RM References:  10.02.01 (11/1)   10.02.01 (17/2)
-
-.. index:: AI-0035 (Ada 2012 feature)
+.. index:: AI-0134 (Ada 2012 feature)
 
-* *AI-0035 Inconsistencies with Pure units (0000-00-00)*
+* *AI-0134 Profiles must match for full conformance (0000-00-00)*
 
-  This AI remedies some inconsistencies in the legality rules for Pure units.
-  Derived access types are legal in a pure unit (on the assumption that the
-  rule for a zero storage pool size has been enforced on the ancestor type).
-  The rules are enforced in generic instances and in subunits. GNAT has always
-  implemented the recommended behavior.
+  For full conformance, the profiles of anonymous-access-to-subprogram
+  parameters must match. GNAT has always enforced this rule.
 
-  RM References:  10.02.01 (15.1/2)   10.02.01 (15.4/2)   10.02.01 (15.5/2)   10.02.01 (17/2)
+  RM References:  6.03.01 (18)
 
-.. index:: AI-0219 (Ada 2012 feature)
+.. index:: AI-0137 (Ada 2012 feature)
 
-* *AI-0219 Pure permissions and limited parameters (2010-05-25)*
+* *AI-0137 String encoding package (2010-03-25)*
 
-  This AI refines the rules for the cases with limited parameters which do not
-  allow the implementations to omit 'redundant'. GNAT now properly conforms
-  to the requirements of this binding interpretation.
+  The packages ``Ada.Strings.UTF_Encoding``, together with its child
+  packages, ``Conversions``, ``Strings``, ``Wide_Strings``,
+  and ``Wide_Wide_Strings`` have been
+  implemented. These packages (whose documentation can be found in the spec
+  files :file:`a-stuten.ads`, :file:`a-suenco.ads`, :file:`a-suenst.ads`,
+  :file:`a-suewst.ads`, :file:`a-suezst.ads`) allow encoding and decoding of
+  ``String``, ``Wide_String``, and ``Wide_Wide_String``
+  values using UTF coding schemes (including UTF-8, UTF-16LE, UTF-16BE, and
+  UTF-16), as well as conversions between the different UTF encodings. With
+  the exception of ``Wide_Wide_Strings``, these packages are available in
+  Ada 95 and Ada 2005 mode as well as Ada 2012 mode.
+  The ``Wide_Wide_Strings`` package
+  is available in Ada 2005 mode as well as Ada 2012 mode (but not in Ada 95
+  mode since it uses ``Wide_Wide_Character``).
 
-  RM References:  10.02.01 (18/2)
+  RM References:  A.04.11
 
-.. index:: AI-0043 (Ada 2012 feature)
+.. index:: AI-0139-2 (Ada 2012 feature)
 
-* *AI-0043 Rules about raising exceptions (0000-00-00)*
+* *AI-0139-2 Syntactic sugar for iterators (2010-09-29)*
 
-  This AI covers various omissions in the RM regarding the raising of
-  exceptions. GNAT has always implemented the intended semantics.
+  The new syntax for iterating over arrays and containers is now implemented.
+  Iteration over containers is for now limited to read-only iterators. Only
+  default iterators are supported, with the syntax:  ``for Elem of C``.
 
-  RM References:  11.04.01 (10.1/2)   11 (2)
+  RM References:  5.05
 
-.. index:: AI-0200 (Ada 2012 feature)
+.. index:: AI-0146 (Ada 2012 feature)
 
-* *AI-0200 Mismatches in formal package declarations (0000-00-00)*
+* *AI-0146 Type invariants (2009-09-21)*
 
-  This AI plugs a gap in the RM which appeared to allow some obviously intended
-  illegal instantiations. GNAT has never allowed these instantiations.
+  Type invariants may be specified for private types using the aspect notation.
+  Aspect ``Type_Invariant`` may be specified for any private type,
+  ``Type_Invariant'Class`` can
+  only be specified for tagged types, and is inherited by any descendent of the
+  tagged types. The invariant is a boolean expression that is tested for being
+  true in the following situations: conversions to the private type, object
+  declarations for the private type that are default initialized, and
+  [**in**] **out**
+  parameters and returned result on return from any primitive operation for
+  the type that is visible to a client.
+  GNAT defines the synonyms ``Invariant`` for ``Type_Invariant`` and
+  ``Invariant'Class`` for ``Type_Invariant'Class``.
 
-  RM References:  12.07 (16)
+  RM References:  13.03.03 (00)
 
-.. index:: AI-0112 (Ada 2012 feature)
+.. index:: AI-0147 (Ada 2012 feature)
 
-* *AI-0112 Detection of duplicate pragmas (2010-07-24)*
+* *AI-0147 Conditional expressions (2009-03-29)*
 
-  This AI concerns giving names to various representation aspects, but the
-  practical effect is simply to make the use of duplicate
-  ``Atomic[_Components]``,
-  ``Volatile[_Components]``, and
-  ``Independent[_Components]`` pragmas illegal, and GNAT
-  now performs this required check.
+  Conditional expressions are permitted. The form of such an expression is:
 
-  RM References:  13.01 (8)
+  ::
 
-.. index:: AI-0106 (Ada 2012 feature)
+        (if expr then expr {elsif expr then expr} [else expr])
 
-* *AI-0106 No representation pragmas on generic formals (0000-00-00)*
+  The parentheses can be omitted in contexts where parentheses are present
+  anyway, such as subprogram arguments and pragma arguments. If the **else**
+  clause is omitted, **else** *True* is assumed;
+  thus ``(if A then B)`` is a way to conveniently represent
+  *(A implies B)* in standard logic.
 
-  The RM appeared to allow representation pragmas on generic formal parameters,
-  but this was not intended, and GNAT has never permitted this usage.
+  RM References:  4.03.03 (15)   4.04 (1)   4.04 (7)   4.05.07 (0)   4.07 (2)
+  4.07 (3)   4.09 (12)   4.09 (33)   5.03 (3)   5.03 (4)   7.05 (2.1/2)
 
-  RM References:  13.01 (9.1/1)
+.. index:: AI-0152 (Ada 2012 feature)
 
-.. index:: AI-0012 (Ada 2012 feature)
+* *AI-0152 Restriction No_Anonymous_Allocators (2010-09-08)*
 
-* *AI-0012 Pack/Component_Size for aliased/atomic (2010-07-15)*
+  Restriction ``No_Anonymous_Allocators`` prevents the use of allocators
+  where the type of the returned value is an anonymous access type.
 
-  It is now illegal to give an inappropriate component size or a pragma
-  ``Pack`` that attempts to change the component size in the case of atomic
-  or aliased components. Previously GNAT ignored such an attempt with a
-  warning.
+  RM References:  H.04 (8/1)
 
-  RM References:  13.02 (6.1/2)   13.02 (7)   C.06 (10)   C.06 (11)   C.06 (21)
+.. index:: AI-0157 (Ada 2012 feature)
 
-.. index:: AI-0039 (Ada 2012 feature)
+* *AI-0157 Allocation/Deallocation from empty pool (2010-07-11)*
 
-* *AI-0039 Stream attributes cannot be dynamic (0000-00-00)*
+  Allocation and Deallocation from an empty storage pool (i.e. allocation or
+  deallocation of a pointer for which a static storage size clause of zero
+  has been given) is now illegal and is detected as such. GNAT
+  previously gave a warning but not an error.
 
-  The RM permitted the use of dynamic expressions (such as ``ptr.all``)`
-  for stream attributes, but these were never useful and are now illegal. GNAT
-  has always regarded such expressions as illegal.
+  RM References:  4.08 (5.3/2)   13.11.02 (4)   13.11.02 (17)
 
-  RM References:  13.03 (4)   13.03 (6)   13.13.02 (38/2)
+.. index:: AI-0158 (Ada 2012 feature)
 
-.. index:: AI-0095 (Ada 2012 feature)
+* *AI-0158 Generalizing membership tests (2010-09-16)*
 
-* *AI-0095 Address of intrinsic subprograms (0000-00-00)*
+  This AI extends the syntax of membership tests to simplify complex conditions
+  that can be expressed as membership in a subset of values of any type. It
+  introduces syntax for a list of expressions that may be used in loop contexts
+  as well.
 
-  The prefix of ``'Address`` cannot statically denote a subprogram with
-  convention ``Intrinsic``. The use of the ``Address`` attribute raises
-  ``Program_Error`` if the prefix denotes a subprogram with convention
-  ``Intrinsic``.
+  RM References:  3.08.01 (5)   4.04 (3)   4.05.02 (3)   4.05.02 (5)   4.05.02 (27)
 
-  RM References:  13.03 (11/1)
+.. index:: AI-0161 (Ada 2012 feature)
 
-.. index:: AI-0116 (Ada 2012 feature)
+* *AI-0161 Restriction No_Default_Stream_Attributes (2010-09-11)*
 
-* *AI-0116 Alignment of class-wide objects (0000-00-00)*
+  A new restriction ``No_Default_Stream_Attributes`` prevents the use of any
+  of the default stream attributes for elementary types. If this restriction is
+  in force, then it is necessary to provide explicit subprograms for any
+  stream attributes used.
 
-  This AI requires that the alignment of a class-wide object be no greater
-  than the alignment of any type in the class. GNAT has always followed this
-  recommendation.
+  RM References:  13.12.01 (4/2)   13.13.02 (40/2)   13.13.02 (52/2)
 
-  RM References:  13.03 (29)   13.11 (16)
+.. index:: AI-0162 (Ada 2012 feature)
 
-.. index:: AI-0146 (Ada 2012 feature)
+* *AI-0162 Incomplete type completed by partial view (2010-09-15)*
 
-* *AI-0146 Type invariants (2009-09-21)*
+  Incomplete types are made more useful by allowing them to be completed by
+  private types and private extensions.
 
-  Type invariants may be specified for private types using the aspect notation.
-  Aspect ``Type_Invariant`` may be specified for any private type,
-  ``Type_Invariant'Class`` can
-  only be specified for tagged types, and is inherited by any descendent of the
-  tagged types. The invariant is a boolean expression that is tested for being
-  true in the following situations: conversions to the private type, object
-  declarations for the private type that are default initialized, and
-  [**in**] **out**
-  parameters and returned result on return from any primitive operation for
-  the type that is visible to a client.
-  GNAT defines the synonyms ``Invariant`` for ``Type_Invariant`` and
-  ``Invariant'Class`` for ``Type_Invariant'Class``.
+  RM References:  3.10.01 (2.5/2)   3.10.01 (2.6/2)   3.10.01 (3)   3.10.01 (4/2)
 
-  RM References:  13.03.03 (00)
+.. index:: AI-0163 (Ada 2012 feature)
 
-.. index:: AI-0078 (Ada 2012 feature)
+* *AI-0163 Pragmas in place of null (2010-07-01)*
 
-* *AI-0078 Relax Unchecked_Conversion alignment rules (0000-00-00)*
+  A statement sequence may be composed entirely of pragmas. It is no longer
+  necessary to add a dummy ``null`` statement to make the sequence legal.
 
-  In Ada 2012, compilers are required to support unchecked conversion where the
-  target alignment is a multiple of the source alignment. GNAT always supported
-  this case (and indeed all cases of differing alignments, doing copies where
-  required if the alignment was reduced).
+  RM References:  2.08 (7)   2.08 (16)
 
-  RM References:  13.09 (7)
+.. index:: AI-0171 (Ada 2012 feature)
 
-.. index:: AI-0195 (Ada 2012 feature)
+* *AI-0171 Pragma CPU and Ravenscar Profile (2010-09-24)*
 
-* *AI-0195 Invalid value handling is implementation defined (2010-07-03)*
+  A new package ``System.Multiprocessors`` is added, together with the
+  definition of pragma ``CPU`` for controlling task affinity. A new no
+  dependence restriction, on ``System.Multiprocessors.Dispatching_Domains``,
+  is added to the Ravenscar profile.
 
-  The handling of invalid values is now designated to be implementation
-  defined. This is a documentation change only, requiring Annex M in the GNAT
-  Reference Manual to document this handling.
-  In GNAT, checks for invalid values are made
-  only when necessary to avoid erroneous behavior. Operations like assignments
-  which cannot cause erroneous behavior ignore the possibility of invalid
-  values and do not do a check. The date given above applies only to the
-  documentation change, this behavior has always been implemented by GNAT.
+  RM References:  D.13.01 (4/2)   D.16
 
-  RM References:  13.09.01 (10)
+.. index:: AI-0173 (Ada 2012 feature)
 
-.. index:: AI-0193 (Ada 2012 feature)
+* *AI-0173 Testing if tags represent abstract types (2010-07-03)*
 
-* *AI-0193 Alignment of allocators (2010-09-16)*
+  The function ``Ada.Tags.Type_Is_Abstract`` returns ``True`` if invoked
+  with the tag of an abstract type, and ``False`` otherwise.
 
-  This AI introduces a new attribute ``Max_Alignment_For_Allocation``,
-  analogous to ``Max_Size_In_Storage_Elements``, but for alignment instead
-  of size.
+  RM References:  3.09 (7.4/2)   3.09 (12.4/2)
 
-  RM References:  13.11 (16)   13.11 (21)   13.11.01 (0)   13.11.01 (1)
-  13.11.01 (2)   13.11.01 (3)
+.. index:: AI-0176 (Ada 2012 feature)
+
+* *AI-0176 Quantified expressions (2010-09-29)*
+
+  Both universally and existentially quantified expressions are implemented.
+  They use the new syntax for iterators proposed in AI05-139-2, as well as
+  the standard Ada loop syntax.
+
+  RM References:  1.01.04 (12)   2.09 (2/2)   4.04 (7)   4.05.09 (0)
 
 .. index:: AI-0177 (Ada 2012 feature)
 
@@ -1035,225 +961,321 @@ Supported Aspect                     Source
 
   RM References:  13.11.01 (3/2)
 
-.. index:: AI-0033 (Ada 2012 feature)
+.. index:: AI-0178 (Ada 2012 feature)
 
-* *AI-0033 Attach/Interrupt_Handler in generic (2010-07-24)*
+* *AI-0178 Incomplete views are limited (0000-00-00)*
 
-  Neither of these two pragmas may appear within a generic template, because
-  the generic might be instantiated at other than the library level.
+  This AI clarifies the role of incomplete views and plugs an omission in the
+  RM. GNAT always correctly restricted the use of incomplete views and types.
 
-  RM References:  13.11.02 (16)   C.03.01 (7/2)   C.03.01 (8/2)
+  RM References:  7.05 (3/2)   7.05 (6/2)
 
-.. index:: AI-0161 (Ada 2012 feature)
+.. index:: AI-0179 (Ada 2012 feature)
 
-* *AI-0161 Restriction No_Default_Stream_Attributes (2010-09-11)*
+* *AI-0179 Statement not required after label (2010-04-10)*
 
-  A new restriction ``No_Default_Stream_Attributes`` prevents the use of any
-  of the default stream attributes for elementary types. If this restriction is
-  in force, then it is necessary to provide explicit subprograms for any
-  stream attributes used.
+  It is not necessary to have a statement following a label, so a label
+  can appear at the end of a statement sequence without the need for putting a
+  null statement afterwards, but it is not allowable to have only labels and
+  no real statements in a statement sequence.
 
-  RM References:  13.12.01 (4/2)   13.13.02 (40/2)   13.13.02 (52/2)
+  RM References:  5.01 (2)
 
-.. index:: AI-0194 (Ada 2012 feature)
+.. index:: AI-0181 (Ada 2012 feature)
 
-* *AI-0194 Value of Stream_Size attribute (0000-00-00)*
+* *AI-0181 Soft hyphen is a non-graphic character (2010-07-23)*
 
-  The ``Stream_Size`` attribute returns the default number of bits in the
-  stream representation of the given type.
-  This value is not affected by the presence
-  of stream subprogram attributes for the type. GNAT has always implemented
-  this interpretation.
+  From Ada 2005 on, soft hyphen is considered a non-graphic character, which
+  means that it has a special name (``SOFT_HYPHEN``) in conjunction with the
+  ``Image`` and ``Value`` attributes for the character types. Strictly
+  speaking this is an inconsistency with Ada 95, but in practice the use of
+  these attributes is so obscure that it will not cause problems.
 
-  RM References:  13.13.02 (1.2/2)
+  RM References:  3.05.02 (2/2)   A.01 (35/2)   A.03.03 (21)
 
-.. index:: AI-0109 (Ada 2012 feature)
+.. index:: AI-0182 (Ada 2012 feature)
 
-* *AI-0109 Redundant check in S'Class'Input (0000-00-00)*
+* *AI-0182 Additional forms for* ``Character'Value`` *(0000-00-00)*
 
-  This AI is an editorial change only. It removes the need for a tag check
-  that can never fail.
+  This AI allows ``Character'Value`` to accept the string ``'?'`` where
+  ``?`` is any character including non-graphic control characters. GNAT has
+  always accepted such strings. It also allows strings such as
+  ``HEX_00000041`` to be accepted, but GNAT does not take advantage of this
+  permission and raises ``Constraint_Error``, as is certainly still
+  permitted.
 
-  RM References:  13.13.02 (34/2)
+  RM References:  3.05 (56/2)
 
-.. index:: AI-0007 (Ada 2012 feature)
+.. index:: AI-0183 (Ada 2012 feature)
 
-* *AI-0007 Stream read and private scalar types (0000-00-00)*
+* *AI-0183 Aspect specifications (2010-08-16)*
 
-  The RM as written appeared to limit the possibilities of declaring read
-  attribute procedures for private scalar types. This limitation was not
-  intended, and has never been enforced by GNAT.
+  Aspect specifications have been fully implemented except for pre and post-
+  conditions, and type invariants, which have their own separate AI's. All
+  forms of declarations listed in the AI are supported. The following is a
+  list of the aspects supported (with GNAT implementation aspects marked)
 
-  RM References:  13.13.02 (50/2)   13.13.02 (51/2)
+==================================== ===========
+Supported Aspect                     Source
+==================================== ===========
+  ``Ada_2005``                           -- GNAT
+  ``Ada_2012``                           -- GNAT
+  ``Address``
+  ``Alignment``
+  ``Atomic``
+  ``Atomic_Components``
+  ``Bit_Order``
+  ``Component_Size``
+  ``Contract_Cases``                     -- GNAT
+  ``Discard_Names``
+  ``External_Tag``
+  ``Favor_Top_Level``                    -- GNAT
+  ``Inline``
+  ``Inline_Always``                      -- GNAT
+  ``Invariant``                          -- GNAT
+  ``Machine_Radix``
+  ``No_Return``
+  ``Object_Size``                        -- GNAT
+  ``Pack``
+  ``Persistent_BSS``                     -- GNAT
+  ``Post``
+  ``Pre``
+  ``Predicate``
+  ``Preelaborable_Initialization``
+  ``Pure_Function``                      -- GNAT
+  ``Remote_Access_Type``                 -- GNAT
+  ``Shared``                             -- GNAT
+  ``Size``
+  ``Storage_Pool``
+  ``Storage_Size``
+  ``Stream_Size``
+  ``Suppress``
+  ``Suppress_Debug_Info``                -- GNAT
+  ``Test_Case``                          -- GNAT
+  ``Thread_Local_Storage``               -- GNAT
+  ``Type_Invariant``
+  ``Unchecked_Union``
+  ``Universal_Aliasing``                 -- GNAT
+  ``Unmodified``                         -- GNAT
+  ``Unreferenced``                       -- GNAT
+  ``Unreferenced_Objects``               -- GNAT
+  ``Unsuppress``
+  ``Value_Size``                         -- GNAT
+  ``Volatile``
+  ``Volatile_Components``
+  ``Warnings``                           -- GNAT
+==================================== ===========
 
-.. index:: AI-0065 (Ada 2012 feature)
+  Note that for aspects with an expression, e.g. ``Size``, the expression is
+  treated like a default expression (visibility is analyzed at the point of
+  occurrence of the aspect, but evaluation of the expression occurs at the
+  freeze point of the entity involved).
 
-* *AI-0065 Remote access types and external streaming (0000-00-00)*
+  RM References:  3.02.01 (3)   3.02.02 (2)   3.03.01 (2/2)   3.08 (6)
+  3.09.03 (1.1/2)   6.01 (2/2)   6.07 (2/2)   9.05.02 (2/2)   7.01 (3)   7.03
+  (2)   7.03 (3)   9.01 (2/2)   9.01 (3/2)   9.04 (2/2)   9.04 (3/2)
+  9.05.02 (2/2)   11.01 (2)   12.01 (3)   12.03 (2/2)   12.04 (2/2)   12.05 (2)
+  12.06 (2.1/2)   12.06 (2.2/2)   12.07 (2)   13.01 (0.1/2)   13.03 (5/1)
+  13.03.01 (0)
 
-  This AI clarifies the fact that all remote access types support external
-  streaming. This fixes an obvious oversight in the definition of the
-  language, and GNAT always implemented the intended correct rules.
+.. index:: AI-0185 (Ada 2012 feature)
 
-  RM References:  13.13.02 (52/2)
+* *AI-0185 Ada.Wide_[Wide_]Characters.Handling (2010-07-06)*
 
-.. index:: AI-0019 (Ada 2012 feature)
+  Two new packages ``Ada.Wide_[Wide_]Characters.Handling`` provide
+  classification functions for ``Wide_Character`` and
+  ``Wide_Wide_Character``, as well as providing
+  case folding routines for ``Wide_[Wide_]Character`` and
+  ``Wide_[Wide_]String``.
 
-* *AI-0019 Freezing of primitives for tagged types (0000-00-00)*
+  RM References:  A.03.05 (0)   A.03.06 (0)
 
-  The RM suggests that primitive subprograms of a specific tagged type are
-  frozen when the tagged type is frozen. This would be an incompatible change
-  and is not intended. GNAT has never attempted this kind of freezing and its
-  behavior is consistent with the recommendation of this AI.
+.. index:: AI-0188 (Ada 2012 feature)
+
+* *AI-0188 Case expressions (2010-01-09)*
+
+  Case expressions are permitted. This allows use of constructs such as:
+
+  .. code-block:: ada
+
+      X := (case Y is when 1 => 2, when 2 => 3, when others => 31)
+
+  RM References:  4.05.07 (0)   4.05.08 (0)   4.09 (12)   4.09 (33)
+
+.. index:: AI-0189 (Ada 2012 feature)
+
+* *AI-0189 No_Allocators_After_Elaboration (2010-01-23)*
+
+  This AI introduces a new restriction ``No_Allocators_After_Elaboration``,
+  which says that no dynamic allocation will occur once elaboration is
+  completed.
+  In general this requires a run-time check, which is not required, and which
+  GNAT does not attempt. But the static cases of allocators in a task body or
+  in the body of the main program are detected and flagged at compile or bind
+  time.
+
+  RM References:  D.07 (19.1/2)   H.04 (23.3/2)
+
+.. index:: AI-0190 (Ada 2012 feature)
+
+* *AI-0190 pragma Default_Storage_Pool (2010-09-15)*
+
+  This AI introduces a new pragma ``Default_Storage_Pool``, which can be
+  used to control storage pools globally.
+  In particular, you can force every access
+  type that is used for allocation (**new**) to have an explicit storage pool,
+  or you can declare a pool globally to be used for all access types that lack
+  an explicit one.
+
+  RM References:  D.07 (8)
+
+.. index:: AI-0193 (Ada 2012 feature)
+
+* *AI-0193 Alignment of allocators (2010-09-16)*
+
+  This AI introduces a new attribute ``Max_Alignment_For_Allocation``,
+  analogous to ``Max_Size_In_Storage_Elements``, but for alignment instead
+  of size.
+
+  RM References:  13.11 (16)   13.11 (21)   13.11.01 (0)   13.11.01 (1)
+  13.11.01 (2)   13.11.01 (3)
+
+.. index:: AI-0194 (Ada 2012 feature)
+
+* *AI-0194 Value of Stream_Size attribute (0000-00-00)*
+
+  The ``Stream_Size`` attribute returns the default number of bits in the
+  stream representation of the given type.
+  This value is not affected by the presence
+  of stream subprogram attributes for the type. GNAT has always implemented
+  this interpretation.
 
-  RM References:  13.14 (2)   13.14 (3/1)   13.14 (8.1/1)   13.14 (10)   13.14 (14)   13.14 (15.1/2)
+  RM References:  13.13.02 (1.2/2)
 
-.. index:: AI-0017 (Ada 2012 feature)
+.. index:: AI-0195 (Ada 2012 feature)
 
-* *AI-0017 Freezing and incomplete types (0000-00-00)*
+* *AI-0195 Invalid value handling is implementation defined (2010-07-03)*
 
-  So-called 'Taft-amendment types' (i.e., types that are completed in package
-  bodies) are not frozen by the occurrence of bodies in the
-  enclosing declarative part. GNAT always implemented this properly.
+  The handling of invalid values is now designated to be implementation
+  defined. This is a documentation change only, requiring Annex M in the GNAT
+  Reference Manual to document this handling.
+  In GNAT, checks for invalid values are made
+  only when necessary to avoid erroneous behavior. Operations like assignments
+  which cannot cause erroneous behavior ignore the possibility of invalid
+  values and do not do a check. The date given above applies only to the
+  documentation change, this behavior has always been implemented by GNAT.
 
-  RM References:  13.14 (3/1)
+  RM References:  13.09.01 (10)
 
-.. index:: AI-0060 (Ada 2012 feature)
+.. index:: AI-0196 (Ada 2012 feature)
 
-* *AI-0060 Extended definition of remote access types (0000-00-00)*
+* *AI-0196 Null exclusion tests for out parameters (0000-00-00)*
 
-  This AI extends the definition of remote access types to include access
-  to limited, synchronized, protected or task class-wide interface types.
-  GNAT already implemented this extension.
+  Null exclusion checks are not made for ``out`` parameters when
+  evaluating the actual parameters. GNAT has never generated these checks.
 
-  RM References:  A (4)   E.02.02 (9/1)   E.02.02 (9.2/1)   E.02.02 (14/2)   E.02.02 (18)
+  RM References:  6.04.01 (13)
 
-.. index:: AI-0114 (Ada 2012 feature)
+.. index:: AI-0198 (Ada 2012 feature)
 
-* *AI-0114 Classification of letters (0000-00-00)*
+* *AI-0198 Inheriting abstract operators  (0000-00-00)*
 
-  The code points 170 (``FEMININE ORDINAL INDICATOR``),
-  181 (``MICRO SIGN``), and
-  186 (``MASCULINE ORDINAL INDICATOR``) are technically considered
-  lower case letters by Unicode.
-  However, they are not allowed in identifiers, and they
-  return ``False`` to ``Ada.Characters.Handling.Is_Letter/Is_Lower``.
-  This behavior is consistent with that defined in Ada 95.
+  This AI resolves a conflict between two rules involving inherited abstract
+  operations and predefined operators. If a derived numeric type inherits
+  an abstract operator, it overrides the predefined one. This interpretation
+  was always the one implemented in GNAT.
 
-  RM References:  A.03.02 (59)   A.04.06 (7)
+  RM References:  3.09.03 (4/3)
 
-.. index:: AI-0185 (Ada 2012 feature)
+.. index:: AI-0199 (Ada 2012 feature)
 
-* *AI-0185 Ada.Wide_[Wide_]Characters.Handling (2010-07-06)*
+* *AI-0199 Aggregate with anonymous access components (2010-07-14)*
 
-  Two new packages ``Ada.Wide_[Wide_]Characters.Handling`` provide
-  classification functions for ``Wide_Character`` and
-  ``Wide_Wide_Character``, as well as providing
-  case folding routines for ``Wide_[Wide_]Character`` and
-  ``Wide_[Wide_]String``.
+  A choice list in a record aggregate can include several components of
+  (distinct) anonymous access types as long as they have matching designated
+  subtypes.
 
-  RM References:  A.03.05 (0)   A.03.06 (0)
+  RM References:  4.03.01 (16)
 
-.. index:: AI-0031 (Ada 2012 feature)
+.. index:: AI-0200 (Ada 2012 feature)
 
-* *AI-0031 Add From parameter to Find_Token (2010-07-25)*
+* *AI-0200 Mismatches in formal package declarations (0000-00-00)*
 
-  A new version of ``Find_Token`` is added to all relevant string packages,
-  with an extra parameter ``From``. Instead of starting at the first
-  character of the string, the search for a matching Token starts at the
-  character indexed by the value of ``From``.
-  These procedures are available in all versions of Ada
-  but if used in versions earlier than Ada 2012 they will generate a warning
-  that an Ada 2012 subprogram is being used.
+  This AI plugs a gap in the RM which appeared to allow some obviously intended
+  illegal instantiations. GNAT has never allowed these instantiations.
 
-  RM References:  A.04.03 (16)   A.04.03 (67)   A.04.03 (68/1)   A.04.04 (51)
-  A.04.05 (46)
+  RM References:  12.07 (16)
 
-.. index:: AI-0056 (Ada 2012 feature)
+.. index:: AI-0201 (Ada 2012 feature)
 
-* *AI-0056 Index on null string returns zero (0000-00-00)*
+* *AI-0201 Independence of atomic object components (2010-07-22)*
 
-  The wording in the Ada 2005 RM implied an incompatible handling of the
-  ``Index`` functions, resulting in raising an exception instead of
-  returning zero in some situations.
-  This was not intended and has been corrected.
-  GNAT always returned zero, and is thus consistent with this AI.
+  If an Atomic object has a pragma ``Pack`` or a ``Component_Size``
+  attribute, then individual components may not be addressable by independent
+  tasks. However, if the representation clause has no effect (is confirming),
+  then independence is not compromised. Furthermore, in GNAT, specification of
+  other appropriately addressable component sizes (e.g. 16 for 8-bit
+  characters) also preserves independence. GNAT now gives very clear warnings
+  both for the declaration of such a type, and for any assignment to its components.
 
-  RM References:  A.04.03 (56.2/2)   A.04.03 (58.5/2)
+  RM References:  9.10 (1/3)   C.06 (22/2)   C.06 (23/2)
 
-.. index:: AI-0137 (Ada 2012 feature)
+.. index:: AI-0203 (Ada 2012 feature)
 
-* *AI-0137 String encoding package (2010-03-25)*
+* *AI-0203 Extended return cannot be abstract (0000-00-00)*
 
-  The packages ``Ada.Strings.UTF_Encoding``, together with its child
-  packages, ``Conversions``, ``Strings``, ``Wide_Strings``,
-  and ``Wide_Wide_Strings`` have been
-  implemented. These packages (whose documentation can be found in the spec
-  files :file:`a-stuten.ads`, :file:`a-suenco.ads`, :file:`a-suenst.ads`,
-  :file:`a-suewst.ads`, :file:`a-suezst.ads`) allow encoding and decoding of
-  ``String``, ``Wide_String``, and ``Wide_Wide_String``
-  values using UTF coding schemes (including UTF-8, UTF-16LE, UTF-16BE, and
-  UTF-16), as well as conversions between the different UTF encodings. With
-  the exception of ``Wide_Wide_Strings``, these packages are available in
-  Ada 95 and Ada 2005 mode as well as Ada 2012 mode.
-  The ``Wide_Wide_Strings`` package
-  is available in Ada 2005 mode as well as Ada 2012 mode (but not in Ada 95
-  mode since it uses ``Wide_Wide_Character``).
+  A return_subtype_indication cannot denote an abstract subtype. GNAT has never
+  permitted such usage.
 
-  RM References:  A.04.11
+  RM References:  3.09.03 (8/3)
 
-.. index:: AI-0038 (Ada 2012 feature)
+.. index:: AI-0205 (Ada 2012 feature)
 
-* *AI-0038 Minor errors in Text_IO (0000-00-00)*
+* *AI-0205 Extended return declares visible name (0000-00-00)*
 
-  These are minor errors in the description on three points. The intent on
-  all these points has always been clear, and GNAT has always implemented the
-  correct intended semantics.
+  This AI corrects a simple omission in the RM. Return objects have always
+  been visible within an extended return statement.
 
-  RM References:  A.10.05 (37)   A.10.07 (8/1)   A.10.07 (10)   A.10.07 (12)   A.10.08 (10)   A.10.08 (24)
+  RM References:  8.03 (17)
 
-.. index:: AI-0044 (Ada 2012 feature)
+.. index:: AI-0206 (Ada 2012 feature)
 
-* *AI-0044 Restrictions on container instantiations (0000-00-00)*
+* *AI-0206 Remote types packages and preelaborate (2010-07-24)*
 
-  This AI places restrictions on allowed instantiations of generic containers.
-  These restrictions are not checked by the compiler, so there is nothing to
-  change in the implementation. This affects only the RM documentation.
+  Remote types packages are now allowed to depend on preelaborated packages.
+  This was formerly considered illegal.
 
-  RM References:  A.18 (4/2)   A.18.02 (231/2)   A.18.03 (145/2)   A.18.06 (56/2)   A.18.08 (66/2)   A.18.09 (79/2)   A.18.26 (5/2)   A.18.26 (9/2)
+  RM References:  E.02.02 (6)
 
-.. index:: AI-0127 (Ada 2012 feature)
+.. index:: AI-0207 (Ada 2012 feature)
 
-* *AI-0127 Adding Locale Capabilities (2010-09-29)*
+* *AI-0207 Mode conformance and access constant (0000-00-00)*
 
-  This package provides an interface for identifying the current locale.
+  This AI confirms that access_to_constant indication must match for mode
+  conformance. This was implemented in GNAT when the qualifier was originally
+  introduced in Ada 2005.
 
-  RM References:  A.19    A.19.01    A.19.02    A.19.03    A.19.05    A.19.06
-  A.19.07    A.19.08    A.19.09    A.19.10    A.19.11    A.19.12    A.19.13
+  RM References:  6.03.01 (16/2)
 
-.. index:: AI-0002 (Ada 2012 feature)
+.. index:: AI-0208 (Ada 2012 feature)
 
-* *AI-0002 Export C with unconstrained arrays (0000-00-00)*
+* *AI-0208 Characteristics of incomplete views (0000-00-00)*
 
-  The compiler is not required to support exporting an Ada subprogram with
-  convention C if there are parameters or a return type of an unconstrained
-  array type (such as ``String``). GNAT allows such declarations but
-  generates warnings. It is possible, but complicated, to write the
-  corresponding C code and certainly such code would be specific to GNAT and
-  non-portable.
+  The wording in the Ada 2005 RM concerning characteristics of incomplete views
+  was incorrect and implied that some programs intended to be legal were now
+  illegal. GNAT had never considered such programs illegal, so it has always
+  implemented the intent of this AI.
 
-  RM References:  B.01 (17)   B.03 (62)   B.03 (71.1/2)
+  RM References:  3.10.01 (2.4/2)   3.10.01 (2.6/2)
 
-.. index:: AI-0216 (Ada 2012 feature)
+.. index:: AI-0210 (Ada 2012 feature)
 
-* *AI-0216 No_Task_Hierarchy forbids local tasks (0000-00-00)*
+* *AI-0210 Correct Timing_Events metric (0000-00-00)*
 
-  It is clearly the intention that ``No_Task_Hierarchy`` is intended to
-  forbid tasks declared locally within subprograms, or functions returning task
-  objects, and that is the implementation that GNAT has always provided.
-  However the language in the RM was not sufficiently clear on this point.
-  Thus this is a documentation change in the RM only.
+  This is a documentation only issue regarding wording of metric requirements,
+  that does not affect the implementation of the compiler.
 
-  RM References:  D.07 (3/3)
+  RM References:  D.15 (24/2)
 
 .. index:: AI-0211 (Ada 2012 feature)
 
@@ -1264,67 +1286,45 @@ Supported Aspect                     Source
 
   RM References:  D.07 (5)   D.07 (10/2)   D.07 (10.4/2)   D.07 (10.7/2)
 
-.. index:: AI-0190 (Ada 2012 feature)
-
-* *AI-0190 pragma Default_Storage_Pool (2010-09-15)*
-
-  This AI introduces a new pragma ``Default_Storage_Pool``, which can be
-  used to control storage pools globally.
-  In particular, you can force every access
-  type that is used for allocation (**new**) to have an explicit storage pool,
-  or you can declare a pool globally to be used for all access types that lack
-  an explicit one.
-
-  RM References:  D.07 (8)
-
-.. index:: AI-0189 (Ada 2012 feature)
-
-* *AI-0189 No_Allocators_After_Elaboration (2010-01-23)*
-
-  This AI introduces a new restriction ``No_Allocators_After_Elaboration``,
-  which says that no dynamic allocation will occur once elaboration is
-  completed.
-  In general this requires a run-time check, which is not required, and which
-  GNAT does not attempt. But the static cases of allocators in a task body or
-  in the body of the main program are detected and flagged at compile or bind
-  time.
-
-  RM References:  D.07 (19.1/2)   H.04 (23.3/2)
-
-.. index:: AI-0171 (Ada 2012 feature)
+.. index:: AI-0214 (Ada 2012 feature)
 
-* *AI-0171 Pragma CPU and Ravenscar Profile (2010-09-24)*
+* *AI-0214 Defaulted discriminants for limited tagged (2010-10-01)*
 
-  A new package ``System.Multiprocessors`` is added, together with the
-  definition of pragma ``CPU`` for controlling task affinity. A new no
-  dependence restriction, on ``System.Multiprocessors.Dispatching_Domains``,
-  is added to the Ravenscar profile.
+  Ada 2012 relaxes the restriction that forbids discriminants of tagged types
+  to have default expressions by allowing them when the type is limited. It
+  is often useful to define a default value for a discriminant even though
+  it can't be changed by assignment.
 
-  RM References:  D.13.01 (4/2)   D.16
+  RM References:  3.07 (9.1/2)   3.07.02 (3)
 
-.. index:: AI-0210 (Ada 2012 feature)
+.. index:: AI-0216 (Ada 2012 feature)
 
-* *AI-0210 Correct Timing_Events metric (0000-00-00)*
+* *AI-0216 No_Task_Hierarchy forbids local tasks (0000-00-00)*
 
-  This is a documentation only issue regarding wording of metric requirements,
-  that does not affect the implementation of the compiler.
+  It is clearly the intention that ``No_Task_Hierarchy`` is intended to
+  forbid tasks declared locally within subprograms, or functions returning task
+  objects, and that is the implementation that GNAT has always provided.
+  However the language in the RM was not sufficiently clear on this point.
+  Thus this is a documentation change in the RM only.
 
-  RM References:  D.15 (24/2)
+  RM References:  D.07 (3/3)
 
-.. index:: AI-0206 (Ada 2012 feature)
+.. index:: AI-0219 (Ada 2012 feature)
 
-* *AI-0206 Remote types packages and preelaborate (2010-07-24)*
+* *AI-0219 Pure permissions and limited parameters (2010-05-25)*
 
-  Remote types packages are now allowed to depend on preelaborated packages.
-  This was formerly considered illegal.
+  This AI refines the rules for the cases with limited parameters which do not
+  allow the implementations to omit 'redundant'. GNAT now properly conforms
+  to the requirements of this binding interpretation.
 
-  RM References:  E.02.02 (6)
+  RM References:  10.02.01 (18/2)
 
-.. index:: AI-0152 (Ada 2012 feature)
+.. index:: AI-0220 (Ada 2012 feature)
 
-* *AI-0152 Restriction No_Anonymous_Allocators (2010-09-08)*
+* *AI-0220 Needed components for aggregates (0000-00-00)*
 
-  Restriction ``No_Anonymous_Allocators`` prevents the use of allocators
-  where the type of the returned value is an anonymous access type.
+  This AI addresses a wording problem in the RM that appears to permit some
+  complex cases of aggregates with nonstatic discriminants. GNAT has always
+  implemented the intended semantics.
 
-  RM References:  H.04 (8/1)
+  RM References:  4.03.01 (17)
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 0d38b1a4bc6..df6969f98b7 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -26607,865 +26607,958 @@ in the RM, the earliest is used.
 A complete description of the AIs may be found in
 @indicateurl{http://www.ada-auth.org/ai05-summary.html}.
 
-@geindex AI-0176 (Ada 2012 feature)
+@geindex AI-0002 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0176 Quantified expressions (2010-09-29)'
+`AI-0002 Export C with unconstrained arrays (0000-00-00)'
 
-Both universally and existentially quantified expressions are implemented.
-They use the new syntax for iterators proposed in AI05-139-2, as well as
-the standard Ada loop syntax.
+The compiler is not required to support exporting an Ada subprogram with
+convention C if there are parameters or a return type of an unconstrained
+array type (such as @code{String}). GNAT allows such declarations but
+generates warnings. It is possible, but complicated, to write the
+corresponding C code and certainly such code would be specific to GNAT and
+non-portable.
 
-RM References:  1.01.04 (12)   2.09 (2/2)   4.04 (7)   4.05.09 (0)
+RM References:  B.01 (17)   B.03 (62)   B.03 (71.1/2)
 @end itemize
 
-@geindex AI-0079 (Ada 2012 feature)
+@geindex AI-0003 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0079 Allow other_format characters in source (2010-07-10)'
+`AI-0003 Qualified expressions as names (2010-07-11)'
 
-Wide characters in the unicode category `other_format' are now allowed in
-source programs between tokens, but not within a token such as an identifier.
+In Ada 2012, a qualified expression is considered to be syntactically a name,
+meaning that constructs such as @code{A'(F(X)).B} are now legal. This is
+useful in disambiguating some cases of overloading.
 
-RM References:  2.01 (4/2)   2.02 (7)
+RM References:  3.03 (11)   3.03 (21)   4.01 (2)   4.04 (7)   4.07 (3)
+5.04 (7)
 @end itemize
 
-@geindex AI-0091 (Ada 2012 feature)
+@geindex AI-0007 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0091 Do not allow other_format in identifiers (0000-00-00)'
+`AI-0007 Stream read and private scalar types (0000-00-00)'
 
-Wide characters in the unicode category `other_format' are not permitted
-within  an identifier, since this can be a security problem. The error
-message for this case has been improved to be more specific, but GNAT has
-never allowed such characters to appear in identifiers.
+The RM as written appeared to limit the possibilities of declaring read
+attribute procedures for private scalar types. This limitation was not
+intended, and has never been enforced by GNAT.
 
-RM References:  2.03 (3.1/2)   2.03 (4/2)   2.03 (5/2)   2.03 (5.1/2)   2.03 (5.2/2)   2.03 (5.3/2)   2.09 (2/2)
+RM References:  13.13.02 (50/2)   13.13.02 (51/2)
 @end itemize
 
-@geindex AI-0100 (Ada 2012 feature)
+@geindex AI-0008 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0100 Placement of pragmas  (2010-07-01)'
+`AI-0008 General access to constrained objects (0000-00-00)'
 
-This AI is an earlier version of AI-163. It simplifies the rules
-for legal placement of pragmas. In the case of lists that allow pragmas, if
-the list may have no elements, then the list may consist solely of pragmas.
+The wording in the RM implied that if you have a general access to a
+constrained object, it could be used to modify the discriminants. This was
+obviously not intended. @code{Constraint_Error} should be raised, and GNAT
+has always done so in this situation.
 
-RM References:  2.08 (7)
+RM References:  3.03 (23)   3.10.02 (26/2)   4.01 (9)   6.04.01 (17)   8.05.01 (5/2)
 @end itemize
 
-@geindex AI-0163 (Ada 2012 feature)
+@geindex AI-0009 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0163 Pragmas in place of null (2010-07-01)'
+`AI-0009 Pragma Independent[_Components] (2010-07-23)'
 
-A statement sequence may be composed entirely of pragmas. It is no longer
-necessary to add a dummy @code{null} statement to make the sequence legal.
+This AI introduces the new pragmas @code{Independent} and
+@code{Independent_Components},
+which control guaranteeing independence of access to objects and components.
+The AI also requires independence not unaffected by confirming rep clauses.
 
-RM References:  2.08 (7)   2.08 (16)
+RM References:  9.10 (1)   13.01 (15/1)   13.02 (9)   13.03 (13)   C.06 (2)
+C.06 (4)   C.06 (6)   C.06 (9)   C.06 (13)   C.06 (14)
 @end itemize
 
-@geindex AI-0080 (Ada 2012 feature)
+@geindex AI-0012 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0080 ‘View of’ not needed if clear from context (0000-00-00)'
+`AI-0012 Pack/Component_Size for aliased/atomic (2010-07-15)'
 
-This is an editorial change only, described as non-testable in the AI.
+It is now illegal to give an inappropriate component size or a pragma
+@code{Pack} that attempts to change the component size in the case of atomic
+or aliased components. Previously GNAT ignored such an attempt with a
+warning.
 
-RM References:  3.01 (7)
+RM References:  13.02 (6.1/2)   13.02 (7)   C.06 (10)   C.06 (11)   C.06 (21)
 @end itemize
 
-@geindex AI-0183 (Ada 2012 feature)
+@geindex AI-0015 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0183 Aspect specifications (2010-08-16)'
-
-Aspect specifications have been fully implemented except for pre and post-
-conditions, and type invariants, which have their own separate AI’s. All
-forms of declarations listed in the AI are supported. The following is a
-list of the aspects supported (with GNAT implementation aspects marked)
-@end itemize
+`AI-0015 Constant return objects (0000-00-00)'
 
+The return object declared in an `extended_return_statement' may be
+declared constant. This was always intended, and GNAT has always allowed it.
 
-@multitable {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} {xxxxxxxxxxxxx} 
-@headitem
+RM References:  6.05 (2.1/2)   3.03 (10/2)   3.03 (21)   6.05 (5/2)
+6.05 (5.7/2)
+@end itemize
 
-Supported Aspect
+@geindex AI-0017 (Ada 2012 feature)
 
-@tab
 
-Source
+@itemize *
 
-@item
+@item 
+`AI-0017 Freezing and incomplete types (0000-00-00)'
 
-@code{Ada_2005}
+So-called ‘Taft-amendment types’ (i.e., types that are completed in package
+bodies) are not frozen by the occurrence of bodies in the
+enclosing declarative part. GNAT always implemented this properly.
 
-@tab
+RM References:  13.14 (3/1)
+@end itemize
 
-– GNAT
+@geindex AI-0019 (Ada 2012 feature)
 
-@item
 
-@code{Ada_2012}
+@itemize *
 
-@tab
+@item 
+`AI-0019 Freezing of primitives for tagged types (0000-00-00)'
 
-– GNAT
+The RM suggests that primitive subprograms of a specific tagged type are
+frozen when the tagged type is frozen. This would be an incompatible change
+and is not intended. GNAT has never attempted this kind of freezing and its
+behavior is consistent with the recommendation of this AI.
 
-@item
+RM References:  13.14 (2)   13.14 (3/1)   13.14 (8.1/1)   13.14 (10)   13.14 (14)   13.14 (15.1/2)
+@end itemize
 
-@code{Address}
+@geindex AI-0026 (Ada 2012 feature)
 
-@tab
 
-@item
+@itemize *
 
-@code{Alignment}
+@item 
+`AI-0026 Missing rules for Unchecked_Union (2010-07-07)'
 
-@tab
+Record representation clauses concerning Unchecked_Union types cannot mention
+the discriminant of the type. The type of a component declared in the variant
+part of an Unchecked_Union cannot be controlled, have controlled components,
+nor have protected or task parts. If an Unchecked_Union type is declared
+within the body of a generic unit or its descendants, then the type of a
+component declared in the variant part cannot be a formal private type or a
+formal private extension declared within the same generic unit.
 
-@item
+RM References:  7.06 (9.4/2)   B.03.03 (9/2)   B.03.03 (10/2)
+@end itemize
 
-@code{Atomic}
+@geindex AI-0030 (Ada 2012 feature)
 
-@tab
 
-@item
+@itemize *
 
-@code{Atomic_Components}
+@item 
+`AI-0030 Requeue on synchronized interfaces (2010-07-19)'
 
-@tab
+Requeue is permitted to a protected, synchronized or task interface primitive
+providing it is known that the overriding operation is an entry. Otherwise
+the requeue statement has the same effect as a procedure call. Use of pragma
+@code{Implemented} provides a way to impose a static requirement on the
+overriding operation by adhering to one of the implementation kinds: entry,
+protected procedure or any of the above.
 
-@item
+RM References:  9.05 (9)   9.05.04 (2)   9.05.04 (3)   9.05.04 (5)
+9.05.04 (6)   9.05.04 (7)   9.05.04 (12)
+@end itemize
 
-@code{Bit_Order}
+@geindex AI-0031 (Ada 2012 feature)
 
-@tab
 
-@item
+@itemize *
 
-@code{Component_Size}
+@item 
+`AI-0031 Add From parameter to Find_Token (2010-07-25)'
 
-@tab
+A new version of @code{Find_Token} is added to all relevant string packages,
+with an extra parameter @code{From}. Instead of starting at the first
+character of the string, the search for a matching Token starts at the
+character indexed by the value of @code{From}.
+These procedures are available in all versions of Ada
+but if used in versions earlier than Ada 2012 they will generate a warning
+that an Ada 2012 subprogram is being used.
 
-@item
+RM References:  A.04.03 (16)   A.04.03 (67)   A.04.03 (68/1)   A.04.04 (51)
+A.04.05 (46)
+@end itemize
 
-@code{Contract_Cases}
+@geindex AI-0032 (Ada 2012 feature)
 
-@tab
 
-– GNAT
+@itemize *
 
-@item
+@item 
+`AI-0032 Extended return for class-wide functions (0000-00-00)'
 
-@code{Discard_Names}
+If a function returns a class-wide type, the object of an extended return
+statement can be declared with a specific type that is covered by the class-
+wide type. This has been implemented in GNAT since the introduction of
+extended returns. Note AI-0103 complements this AI by imposing matching
+rules for constrained return types.
 
-@tab
+RM References:  6.05 (5.2/2)   6.05 (5.3/2)   6.05 (5.6/2)   6.05 (5.8/2)
+6.05 (8/2)
+@end itemize
 
-@item
+@geindex AI-0033 (Ada 2012 feature)
 
-@code{External_Tag}
 
-@tab
+@itemize *
 
-@item
+@item 
+`AI-0033 Attach/Interrupt_Handler in generic (2010-07-24)'
 
-@code{Favor_Top_Level}
+Neither of these two pragmas may appear within a generic template, because
+the generic might be instantiated at other than the library level.
 
-@tab
+RM References:  13.11.02 (16)   C.03.01 (7/2)   C.03.01 (8/2)
+@end itemize
 
-– GNAT
+@geindex AI-0034 (Ada 2012 feature)
 
-@item
 
-@code{Inline}
+@itemize *
 
-@tab
+@item 
+`AI-0034 Categorization of limited views (0000-00-00)'
 
-@item
+The RM makes certain limited with clauses illegal because of categorization
+considerations, when the corresponding normal with would be legal. This is
+not intended, and GNAT has always implemented the recommended behavior.
 
-@code{Inline_Always}
+RM References:  10.02.01 (11/1)   10.02.01 (17/2)
+@end itemize
 
-@tab
+@geindex AI-0035 (Ada 2012 feature)
 
-– GNAT
 
-@item
+@itemize *
 
-@code{Invariant}
+@item 
+`AI-0035 Inconsistencies with Pure units (0000-00-00)'
 
-@tab
+This AI remedies some inconsistencies in the legality rules for Pure units.
+Derived access types are legal in a pure unit (on the assumption that the
+rule for a zero storage pool size has been enforced on the ancestor type).
+The rules are enforced in generic instances and in subunits. GNAT has always
+implemented the recommended behavior.
 
-– GNAT
+RM References:  10.02.01 (15.1/2)   10.02.01 (15.4/2)   10.02.01 (15.5/2)   10.02.01 (17/2)
+@end itemize
 
-@item
+@geindex AI-0037 (Ada 2012 feature)
 
-@code{Machine_Radix}
 
-@tab
+@itemize *
 
-@item
+@item 
+`AI-0037 Out-of-range box associations in aggregate (0000-00-00)'
 
-@code{No_Return}
+This AI confirms that an association of the form @code{Indx => <>} in an
+array aggregate must raise @code{Constraint_Error} if @code{Indx}
+is out of range. The RM specified a range check on other associations, but
+not when the value of the association was defaulted. GNAT has always inserted
+a constraint check on the index value.
 
-@tab
+RM References:  4.03.03 (29)
+@end itemize
 
-@item
+@geindex AI-0038 (Ada 2012 feature)
 
-@code{Object_Size}
 
-@tab
+@itemize *
 
-– GNAT
+@item 
+`AI-0038 Minor errors in Text_IO (0000-00-00)'
 
-@item
+These are minor errors in the description on three points. The intent on
+all these points has always been clear, and GNAT has always implemented the
+correct intended semantics.
 
-@code{Pack}
+RM References:  A.10.05 (37)   A.10.07 (8/1)   A.10.07 (10)   A.10.07 (12)   A.10.08 (10)   A.10.08 (24)
+@end itemize
 
-@tab
+@geindex AI-0039 (Ada 2012 feature)
 
-@item
 
-@code{Persistent_BSS}
+@itemize *
 
-@tab
+@item 
+`AI-0039 Stream attributes cannot be dynamic (0000-00-00)'
 
-– GNAT
+The RM permitted the use of dynamic expressions (such as @code{ptr.all})`
+for stream attributes, but these were never useful and are now illegal. GNAT
+has always regarded such expressions as illegal.
 
-@item
+RM References:  13.03 (4)   13.03 (6)   13.13.02 (38/2)
+@end itemize
 
-@code{Post}
+@geindex AI-0040 (Ada 2012 feature)
 
-@tab
 
-@item
+@itemize *
 
-@code{Pre}
+@item 
+`AI-0040 Limited with clauses on descendant (0000-00-00)'
 
-@tab
+This AI confirms that a limited with clause in a child unit cannot name
+an ancestor of the unit. This has always been checked in GNAT.
 
-@item
+RM References:  10.01.02 (20/2)
+@end itemize
 
-@code{Predicate}
+@geindex AI-0042 (Ada 2012 feature)
 
-@tab
 
-@item
+@itemize *
 
-@code{Preelaborable_Initialization}
+@item 
+`AI-0042 Overriding versus implemented-by (0000-00-00)'
 
-@tab
+This AI fixes a wording gap in the RM. An operation of a synchronized
+interface can be implemented by a protected or task entry, but the abstract
+operation is not being overridden in the usual sense, and it must be stated
+separately that this implementation is legal. This has always been the case
+in GNAT.
 
-@item
+RM References:  9.01 (9.2/2)   9.04 (11.1/2)
+@end itemize
 
-@code{Pure_Function}
+@geindex AI-0043 (Ada 2012 feature)
 
-@tab
 
-– GNAT
+@itemize *
 
-@item
+@item 
+`AI-0043 Rules about raising exceptions (0000-00-00)'
 
-@code{Remote_Access_Type}
+This AI covers various omissions in the RM regarding the raising of
+exceptions. GNAT has always implemented the intended semantics.
 
-@tab
+RM References:  11.04.01 (10.1/2)   11 (2)
+@end itemize
 
-– GNAT
+@geindex AI-0044 (Ada 2012 feature)
 
-@item
 
-@code{Shared}
+@itemize *
 
-@tab
+@item 
+`AI-0044 Restrictions on container instantiations (0000-00-00)'
 
-– GNAT
+This AI places restrictions on allowed instantiations of generic containers.
+These restrictions are not checked by the compiler, so there is nothing to
+change in the implementation. This affects only the RM documentation.
 
-@item
+RM References:  A.18 (4/2)   A.18.02 (231/2)   A.18.03 (145/2)   A.18.06 (56/2)   A.18.08 (66/2)   A.18.09 (79/2)   A.18.26 (5/2)   A.18.26 (9/2)
+@end itemize
 
-@code{Size}
+@geindex AI-0046 (Ada 2012 feature)
 
-@tab
 
-@item
+@itemize *
 
-@code{Storage_Pool}
+@item 
+`AI-0046 Null exclusion match for full conformance (2010-07-17)'
 
-@tab
+For full conformance, in the case of access parameters, the null exclusion
+must match (either both or neither must have @code{not null}).
 
-@item
+RM References:  6.03.02 (18)
+@end itemize
 
-@code{Storage_Size}
+@geindex AI-0050 (Ada 2012 feature)
 
-@tab
 
-@item
+@itemize *
 
-@code{Stream_Size}
+@item 
+`AI-0050 Raising Constraint_Error early for function call (0000-00-00)'
 
-@tab
+The implementation permissions for raising @code{Constraint_Error} early on a function call
+when it was clear an exception would be raised were over-permissive and allowed
+mishandling of discriminants in some cases. GNAT did
+not take advantage of these incorrect permissions in any case.
 
-@item
+RM References:  6.05 (24/2)
+@end itemize
 
-@code{Suppress}
+@geindex AI-0056 (Ada 2012 feature)
 
-@tab
 
-@item
+@itemize *
 
-@code{Suppress_Debug_Info}
+@item 
+`AI-0056 Index on null string returns zero (0000-00-00)'
 
-@tab
+The wording in the Ada 2005 RM implied an incompatible handling of the
+@code{Index} functions, resulting in raising an exception instead of
+returning zero in some situations.
+This was not intended and has been corrected.
+GNAT always returned zero, and is thus consistent with this AI.
 
-– GNAT
+RM References:  A.04.03 (56.2/2)   A.04.03 (58.5/2)
+@end itemize
 
-@item
+@geindex AI-0058 (Ada 2012 feature)
 
-@code{Test_Case}
 
-@tab
+@itemize *
 
-– GNAT
+@item 
+`AI-0058 Abnormal completion of an extended return (0000-00-00)'
 
-@item
+The RM had some incorrect wording implying wrong treatment of abnormal
+completion in an extended return. GNAT has always implemented the intended
+correct semantics as described by this AI.
 
-@code{Thread_Local_Storage}
+RM References:  6.05 (22/2)
+@end itemize
 
-@tab
+@geindex AI-0060 (Ada 2012 feature)
 
-– GNAT
 
-@item
+@itemize *
 
-@code{Type_Invariant}
+@item 
+`AI-0060 Extended definition of remote access types (0000-00-00)'
 
-@tab
+This AI extends the definition of remote access types to include access
+to limited, synchronized, protected or task class-wide interface types.
+GNAT already implemented this extension.
 
-@item
+RM References:  A (4)   E.02.02 (9/1)   E.02.02 (9.2/1)   E.02.02 (14/2)   E.02.02 (18)
+@end itemize
 
-@code{Unchecked_Union}
+@geindex AI-0062 (Ada 2012 feature)
 
-@tab
 
-@item
+@itemize *
 
-@code{Universal_Aliasing}
+@item 
+`AI-0062 Null exclusions and deferred constants (0000-00-00)'
 
-@tab
+A full constant may have a null exclusion even if its associated deferred
+constant does not. GNAT has always allowed this.
 
-– GNAT
+RM References:  7.04 (6/2)   7.04 (7.1/2)
+@end itemize
 
-@item
+@geindex AI-0064 (Ada 2012 feature)
 
-@code{Unmodified}
 
-@tab
+@itemize *
 
-– GNAT
+@item 
+`AI-0064 Redundant finalization rule (0000-00-00)'
 
-@item
+This is an editorial change only. The intended behavior is already checked
+by an existing ACATS test, which GNAT has always executed correctly.
 
-@code{Unreferenced}
+RM References:  7.06.01 (17.1/1)
+@end itemize
 
-@tab
+@geindex AI-0065 (Ada 2012 feature)
 
-– GNAT
 
-@item
+@itemize *
 
-@code{Unreferenced_Objects}
+@item 
+`AI-0065 Remote access types and external streaming (0000-00-00)'
 
-@tab
+This AI clarifies the fact that all remote access types support external
+streaming. This fixes an obvious oversight in the definition of the
+language, and GNAT always implemented the intended correct rules.
 
-– GNAT
+RM References:  13.13.02 (52/2)
+@end itemize
 
-@item
+@geindex AI-0070 (Ada 2012 feature)
 
-@code{Unsuppress}
 
-@tab
+@itemize *
 
-@item
+@item 
+`AI-0070 Elaboration of interface types (0000-00-00)'
 
-@code{Value_Size}
+This is an editorial change only, there are no testable consequences short of
+checking for the absence of generated code for an interface declaration.
 
-@tab
+RM References:  3.09.04 (18/2)
+@end itemize
 
-– GNAT
+@geindex AI-0072 (Ada 2012 feature)
 
-@item
 
-@code{Volatile}
+@itemize *
 
-@tab
+@item 
+`AI-0072 Task signalling using ‘Terminated (0000-00-00)'
 
-@item
+This AI clarifies that task signalling for reading @code{'Terminated} only
+occurs if the result is True. GNAT semantics has always been consistent with
+this notion of task signalling.
 
-@code{Volatile_Components}
+RM References:  9.10 (6.1/1)
+@end itemize
 
-@tab
+@geindex AI-0073 (Ada 2012 feature)
 
-@item
 
-@code{Warnings}
+@itemize *
 
-@tab
+@item 
+`AI-0073 Functions returning abstract types (2010-07-10)'
 
-– GNAT
-
-@end multitable
-
-
-@quotation
-
-Note that for aspects with an expression, e.g. @code{Size}, the expression is
-treated like a default expression (visibility is analyzed at the point of
-occurrence of the aspect, but evaluation of the expression occurs at the
-freeze point of the entity involved).
+This AI covers a number of issues regarding returning abstract types. In
+particular generic functions cannot have abstract result types or access
+result types designated an abstract type. There are some other cases which
+are detailed in the AI. Note that this binding interpretation has not been
+retrofitted to operate before Ada 2012 mode, since it caused a significant
+number of regressions.
 
-RM References:  3.02.01 (3)   3.02.02 (2)   3.03.01 (2/2)   3.08 (6)
-3.09.03 (1.1/2)   6.01 (2/2)   6.07 (2/2)   9.05.02 (2/2)   7.01 (3)   7.03
-(2)   7.03 (3)   9.01 (2/2)   9.01 (3/2)   9.04 (2/2)   9.04 (3/2)
-9.05.02 (2/2)   11.01 (2)   12.01 (3)   12.03 (2/2)   12.04 (2/2)   12.05 (2)
-12.06 (2.1/2)   12.06 (2.2/2)   12.07 (2)   13.01 (0.1/2)   13.03 (5/1)
-13.03.01 (0)
-@end quotation
+RM References:  3.09.03 (8)   3.09.03 (10)   6.05 (8/2)
+@end itemize
 
-@geindex AI-0128 (Ada 2012 feature)
+@geindex AI-0076 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0128 Inequality is a primitive operation (0000-00-00)'
+`AI-0076 function with controlling result (0000-00-00)'
 
-If an equality operator (“=”) is declared for a type, then the implicitly
-declared inequality operator (“/=”) is a primitive operation of the type.
-This is the only reasonable interpretation, and is the one always implemented
-by GNAT, but the RM was not entirely clear in making this point.
+This is an editorial change only. The RM defines calls with controlling
+results, but uses the term ‘function with controlling result’ without an
+explicit definition.
 
-RM References:  3.02.03 (6)   6.06 (6)
+RM References:  3.09.02 (2/2)
 @end itemize
 
-@geindex AI-0003 (Ada 2012 feature)
+@geindex AI-0077 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0003 Qualified expressions as names (2010-07-11)'
+`AI-0077 Limited withs and scope of declarations (0000-00-00)'
 
-In Ada 2012, a qualified expression is considered to be syntactically a name,
-meaning that constructs such as @code{A'(F(X)).B} are now legal. This is
-useful in disambiguating some cases of overloading.
+This AI clarifies that a declaration does not include a context clause,
+and confirms that it is illegal to have a context in which both a limited
+and a nonlimited view of a package are accessible. Such double visibility
+was always rejected by GNAT.
 
-RM References:  3.03 (11)   3.03 (21)   4.01 (2)   4.04 (7)   4.07 (3)
-5.04 (7)
+RM References:  10.01.02 (12/2)   10.01.02 (21/2)   10.01.02 (22/2)
 @end itemize
 
-@geindex AI-0120 (Ada 2012 feature)
+@geindex AI-0078 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0120 Constant instance of protected object (0000-00-00)'
+`AI-0078 Relax Unchecked_Conversion alignment rules (0000-00-00)'
 
-This is an RM editorial change only. The section that lists objects that are
-constant failed to include the current instance of a protected object
-within a protected function. This has always been treated as a constant
-in GNAT.
+In Ada 2012, compilers are required to support unchecked conversion where the
+target alignment is a multiple of the source alignment. GNAT always supported
+this case (and indeed all cases of differing alignments, doing copies where
+required if the alignment was reduced).
 
-RM References:  3.03 (21)
+RM References:  13.09 (7)
 @end itemize
 
-@geindex AI-0008 (Ada 2012 feature)
+@geindex AI-0079 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0008 General access to constrained objects (0000-00-00)'
+`AI-0079 Allow other_format characters in source (2010-07-10)'
 
-The wording in the RM implied that if you have a general access to a
-constrained object, it could be used to modify the discriminants. This was
-obviously not intended. @code{Constraint_Error} should be raised, and GNAT
-has always done so in this situation.
+Wide characters in the unicode category `other_format' are now allowed in
+source programs between tokens, but not within a token such as an identifier.
 
-RM References:  3.03 (23)   3.10.02 (26/2)   4.01 (9)   6.04.01 (17)   8.05.01 (5/2)
+RM References:  2.01 (4/2)   2.02 (7)
 @end itemize
 
-@geindex AI-0093 (Ada 2012 feature)
+@geindex AI-0080 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0093 Additional rules use immutably limited (0000-00-00)'
+`AI-0080 ‘View of’ not needed if clear from context (0000-00-00)'
 
-This is an editorial change only, to make more widespread use of the Ada 2012
-‘immutably limited’.
+This is an editorial change only, described as non-testable in the AI.
 
-RM References:  3.03 (23.4/3)
+RM References:  3.01 (7)
 @end itemize
 
-@geindex AI-0096 (Ada 2012 feature)
+@geindex AI-0087 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0096 Deriving from formal private types (2010-07-20)'
+`AI-0087 Actual for formal nonlimited derived type (2010-07-15)'
 
-In general it is illegal for a type derived from a formal limited type to be
-nonlimited.  This AI makes an exception to this rule: derivation is legal
-if it appears in the private part of the generic, and the formal type is not
-tagged. If the type is tagged, the legality check must be applied to the
-private part of the package.
+The actual for a formal nonlimited derived type cannot be limited. In
+particular, a formal derived type that extends a limited interface but which
+is not explicitly limited cannot be instantiated with a limited type.
 
-RM References:  3.04 (5.1/2)   6.02 (7)
+RM References:  7.05 (5/2)   12.05.01 (5.1/2)
 @end itemize
 
-@geindex AI-0181 (Ada 2012 feature)
+@geindex AI-0088 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0181 Soft hyphen is a non-graphic character (2010-07-23)'
+`AI-0088 The value of exponentiation (0000-00-00)'
 
-From Ada 2005 on, soft hyphen is considered a non-graphic character, which
-means that it has a special name (@code{SOFT_HYPHEN}) in conjunction with the
-@code{Image} and @code{Value} attributes for the character types. Strictly
-speaking this is an inconsistency with Ada 95, but in practice the use of
-these attributes is so obscure that it will not cause problems.
+This AI clarifies the equivalence rule given for the dynamic semantics of
+exponentiation: the value of the operation can be obtained by repeated
+multiplication, but the operation can be implemented otherwise (for example
+using the familiar divide-by-two-and-square algorithm, even if this is less
+accurate), and does not imply repeated reads of a volatile base.
 
-RM References:  3.05.02 (2/2)   A.01 (35/2)   A.03.03 (21)
+RM References:  4.05.06 (11)
 @end itemize
 
-@geindex AI-0182 (Ada 2012 feature)
+@geindex AI-0091 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0182 Additional forms for' @code{Character'Value} `(0000-00-00)'
+`AI-0091 Do not allow other_format in identifiers (0000-00-00)'
 
-This AI allows @code{Character'Value} to accept the string @code{'?'} where
-@code{?} is any character including non-graphic control characters. GNAT has
-always accepted such strings. It also allows strings such as
-@code{HEX_00000041} to be accepted, but GNAT does not take advantage of this
-permission and raises @code{Constraint_Error}, as is certainly still
-permitted.
+Wide characters in the unicode category `other_format' are not permitted
+within  an identifier, since this can be a security problem. The error
+message for this case has been improved to be more specific, but GNAT has
+never allowed such characters to appear in identifiers.
 
-RM References:  3.05 (56/2)
+RM References:  2.03 (3.1/2)   2.03 (4/2)   2.03 (5/2)   2.03 (5.1/2)   2.03 (5.2/2)   2.03 (5.3/2)   2.09 (2/2)
 @end itemize
 
-@geindex AI-0214 (Ada 2012 feature)
+@geindex AI-0093 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0214 Defaulted discriminants for limited tagged (2010-10-01)'
+`AI-0093 Additional rules use immutably limited (0000-00-00)'
 
-Ada 2012 relaxes the restriction that forbids discriminants of tagged types
-to have default expressions by allowing them when the type is limited. It
-is often useful to define a default value for a discriminant even though
-it can’t be changed by assignment.
+This is an editorial change only, to make more widespread use of the Ada 2012
+‘immutably limited’.
 
-RM References:  3.07 (9.1/2)   3.07.02 (3)
+RM References:  3.03 (23.4/3)
 @end itemize
 
-@geindex AI-0102 (Ada 2012 feature)
+@geindex AI-0095 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0102 Some implicit conversions are illegal (0000-00-00)'
+`AI-0095 Address of intrinsic subprograms (0000-00-00)'
 
-It is illegal to assign an anonymous access constant to an anonymous access
-variable. The RM did not have a clear rule to prevent this, but GNAT has
-always generated an error for this usage.
+The prefix of @code{'Address} cannot statically denote a subprogram with
+convention @code{Intrinsic}. The use of the @code{Address} attribute raises
+@code{Program_Error} if the prefix denotes a subprogram with convention
+@code{Intrinsic}.
 
-RM References:  3.07 (16)   3.07.01 (9)   6.04.01 (6)   8.06 (27/2)
+RM References:  13.03 (11/1)
 @end itemize
 
-@geindex AI-0158 (Ada 2012 feature)
+@geindex AI-0096 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0158 Generalizing membership tests (2010-09-16)'
+`AI-0096 Deriving from formal private types (2010-07-20)'
 
-This AI extends the syntax of membership tests to simplify complex conditions
-that can be expressed as membership in a subset of values of any type. It
-introduces syntax for a list of expressions that may be used in loop contexts
-as well.
+In general it is illegal for a type derived from a formal limited type to be
+nonlimited.  This AI makes an exception to this rule: derivation is legal
+if it appears in the private part of the generic, and the formal type is not
+tagged. If the type is tagged, the legality check must be applied to the
+private part of the package.
 
-RM References:  3.08.01 (5)   4.04 (3)   4.05.02 (3)   4.05.02 (5)   4.05.02 (27)
+RM References:  3.04 (5.1/2)   6.02 (7)
 @end itemize
 
-@geindex AI-0173 (Ada 2012 feature)
+@geindex AI-0097 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0173 Testing if tags represent abstract types (2010-07-03)'
+`AI-0097 Treatment of abstract null extension (2010-07-19)'
 
-The function @code{Ada.Tags.Type_Is_Abstract} returns @code{True} if invoked
-with the tag of an abstract type, and @code{False} otherwise.
+The RM as written implied that in some cases it was possible to create an
+object of an abstract type, by having an abstract extension inherit a non-
+abstract constructor from its parent type. This mistake has been corrected
+in GNAT and in the RM, and this construct is now illegal.
 
-RM References:  3.09 (7.4/2)   3.09 (12.4/2)
+RM References:  3.09.03 (4/2)
 @end itemize
 
-@geindex AI-0076 (Ada 2012 feature)
+@geindex AI-0098 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0076 function with controlling result (0000-00-00)'
+`AI-0098 Anonymous subprogram access restrictions (0000-00-00)'
 
-This is an editorial change only. The RM defines calls with controlling
-results, but uses the term ‘function with controlling result’ without an
-explicit definition.
+An unintentional omission in the RM implied some inconsistent restrictions on
+the use of anonymous access to subprogram values. These restrictions were not
+intentional, and have never been enforced by GNAT.
 
-RM References:  3.09.02 (2/2)
+RM References:  3.10.01 (6)   3.10.01 (9.2/2)
 @end itemize
 
-@geindex AI-0126 (Ada 2012 feature)
+@geindex AI-0099 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0126 Dispatching with no declared operation (0000-00-00)'
+`AI-0099 Tag determines whether finalization needed (0000-00-00)'
 
-This AI clarifies dispatching rules, and simply confirms that dispatching
-executes the operation of the parent type when there is no explicitly or
-implicitly declared operation for the descendant type. This has always been
-the case in all versions of GNAT.
+This AI clarifies that ‘needs finalization’ is part of dynamic semantics,
+and therefore depends on the run-time characteristics of an object (i.e. its
+tag) and not on its nominal type. As the AI indicates: “we do not expect
+this to affect any implementation’’.
 
-RM References:  3.09.02 (20/2)   3.09.02 (20.1/2)   3.09.02 (20.2/2)
+RM References:  7.06.01 (6)   7.06.01 (7)   7.06.01 (8)   7.06.01 (9/2)
 @end itemize
 
-@geindex AI-0097 (Ada 2012 feature)
+@geindex AI-0100 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0097 Treatment of abstract null extension (2010-07-19)'
+`AI-0100 Placement of pragmas  (2010-07-01)'
 
-The RM as written implied that in some cases it was possible to create an
-object of an abstract type, by having an abstract extension inherit a non-
-abstract constructor from its parent type. This mistake has been corrected
-in GNAT and in the RM, and this construct is now illegal.
+This AI is an earlier version of AI-163. It simplifies the rules
+for legal placement of pragmas. In the case of lists that allow pragmas, if
+the list may have no elements, then the list may consist solely of pragmas.
 
-RM References:  3.09.03 (4/2)
+RM References:  2.08 (7)
 @end itemize
 
-@geindex AI-0203 (Ada 2012 feature)
+@geindex AI-0102 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0203 Extended return cannot be abstract (0000-00-00)'
+`AI-0102 Some implicit conversions are illegal (0000-00-00)'
 
-A return_subtype_indication cannot denote an abstract subtype. GNAT has never
-permitted such usage.
+It is illegal to assign an anonymous access constant to an anonymous access
+variable. The RM did not have a clear rule to prevent this, but GNAT has
+always generated an error for this usage.
 
-RM References:  3.09.03 (8/3)
+RM References:  3.07 (16)   3.07.01 (9)   6.04.01 (6)   8.06 (27/2)
 @end itemize
 
-@geindex AI-0198 (Ada 2012 feature)
+@geindex AI-0103 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0198 Inheriting abstract operators  (0000-00-00)'
+`AI-0103 Static matching for extended return (2010-07-23)'
 
-This AI resolves a conflict between two rules involving inherited abstract
-operations and predefined operators. If a derived numeric type inherits
-an abstract operator, it overrides the predefined one. This interpretation
-was always the one implemented in GNAT.
+If the return subtype of a function is an elementary type or a constrained
+type, the subtype indication in an extended return statement must match
+statically this return subtype.
 
-RM References:  3.09.03 (4/3)
+RM References:  6.05 (5.2/2)
 @end itemize
 
-@geindex AI-0073 (Ada 2012 feature)
+@geindex AI-0104 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0073 Functions returning abstract types (2010-07-10)'
+`AI-0104 Null exclusion and uninitialized allocator (2010-07-15)'
 
-This AI covers a number of issues regarding returning abstract types. In
-particular generic functions cannot have abstract result types or access
-result types designated an abstract type. There are some other cases which
-are detailed in the AI. Note that this binding interpretation has not been
-retrofitted to operate before Ada 2012 mode, since it caused a significant
-number of regressions.
+The assignment @code{Ptr := new not null Some_Ptr;} will raise
+@code{Constraint_Error} because the default value of the allocated object is
+`null'. This useless construct is illegal in Ada 2012.
 
-RM References:  3.09.03 (8)   3.09.03 (10)   6.05 (8/2)
+RM References:  4.08 (2)
 @end itemize
 
-@geindex AI-0070 (Ada 2012 feature)
+@geindex AI-0106 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0070 Elaboration of interface types (0000-00-00)'
+`AI-0106 No representation pragmas on generic formals (0000-00-00)'
 
-This is an editorial change only, there are no testable consequences short of
-checking for the absence of generated code for an interface declaration.
+The RM appeared to allow representation pragmas on generic formal parameters,
+but this was not intended, and GNAT has never permitted this usage.
 
-RM References:  3.09.04 (18/2)
+RM References:  13.01 (9.1/1)
 @end itemize
 
-@geindex AI-0208 (Ada 2012 feature)
+@geindex AI-0108 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0208 Characteristics of incomplete views (0000-00-00)'
+`AI-0108 Limited incomplete view and discriminants (0000-00-00)'
 
-The wording in the Ada 2005 RM concerning characteristics of incomplete views
-was incorrect and implied that some programs intended to be legal were now
-illegal. GNAT had never considered such programs illegal, so it has always
-implemented the intent of this AI.
+This AI confirms that an incomplete type from a limited view does not have
+discriminants. This has always been the case in GNAT.
 
-RM References:  3.10.01 (2.4/2)   3.10.01 (2.6/2)
+RM References:  10.01.01 (12.3/2)
 @end itemize
 
-@geindex AI-0162 (Ada 2012 feature)
+@geindex AI-0109 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0162 Incomplete type completed by partial view (2010-09-15)'
+`AI-0109 Redundant check in S’Class’Input (0000-00-00)'
 
-Incomplete types are made more useful by allowing them to be completed by
-private types and private extensions.
+This AI is an editorial change only. It removes the need for a tag check
+that can never fail.
 
-RM References:  3.10.01 (2.5/2)   3.10.01 (2.6/2)   3.10.01 (3)   3.10.01 (4/2)
+RM References:  13.13.02 (34/2)
 @end itemize
 
-@geindex AI-0098 (Ada 2012 feature)
+@geindex AI-0112 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0098 Anonymous subprogram access restrictions (0000-00-00)'
+`AI-0112 Detection of duplicate pragmas (2010-07-24)'
 
-An unintentional omission in the RM implied some inconsistent restrictions on
-the use of anonymous access to subprogram values. These restrictions were not
-intentional, and have never been enforced by GNAT.
+This AI concerns giving names to various representation aspects, but the
+practical effect is simply to make the use of duplicate
+@code{Atomic[_Components]},
+@code{Volatile[_Components]}, and
+@code{Independent[_Components]} pragmas illegal, and GNAT
+now performs this required check.
 
-RM References:  3.10.01 (6)   3.10.01 (9.2/2)
+RM References:  13.01 (8)
 @end itemize
 
-@geindex AI-0199 (Ada 2012 feature)
+@geindex AI-0114 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0199 Aggregate with anonymous access components (2010-07-14)'
+`AI-0114 Classification of letters (0000-00-00)'
 
-A choice list in a record aggregate can include several components of
-(distinct) anonymous access types as long as they have matching designated
-subtypes.
+The code points 170 (@code{FEMININE ORDINAL INDICATOR}),
+181 (@code{MICRO SIGN}), and
+186 (@code{MASCULINE ORDINAL INDICATOR}) are technically considered
+lower case letters by Unicode.
+However, they are not allowed in identifiers, and they
+return @code{False} to @code{Ada.Characters.Handling.Is_Letter/Is_Lower}.
+This behavior is consistent with that defined in Ada 95.
 
-RM References:  4.03.01 (16)
+RM References:  A.03.02 (59)   A.04.06 (7)
 @end itemize
 
-@geindex AI-0220 (Ada 2012 feature)
+@geindex AI-0116 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0220 Needed components for aggregates (0000-00-00)'
+`AI-0116 Alignment of class-wide objects (0000-00-00)'
 
-This AI addresses a wording problem in the RM that appears to permit some
-complex cases of aggregates with nonstatic discriminants. GNAT has always
-implemented the intended semantics.
+This AI requires that the alignment of a class-wide object be no greater
+than the alignment of any type in the class. GNAT has always followed this
+recommendation.
 
-RM References:  4.03.01 (17)
+RM References:  13.03 (29)   13.11 (16)
 @end itemize
 
-@geindex AI-0147 (Ada 2012 feature)
+@geindex AI-0118 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0147 Conditional expressions (2009-03-29)'
+`AI-0118 The association of parameter associations (0000-00-00)'
 
-Conditional expressions are permitted. The form of such an expression is:
+This AI clarifies the rules for named associations in subprogram calls and
+generic instantiations. The rules have been in place since Ada 83.
 
-@example
-(if expr then expr @{elsif expr then expr@} [else expr])
-@end example
+RM References:  6.04.01 (2)   12.03 (9)
+@end itemize
 
-The parentheses can be omitted in contexts where parentheses are present
-anyway, such as subprogram arguments and pragma arguments. If the `else'
-clause is omitted, `else' `True' is assumed;
-thus @code{(if A then B)} is a way to conveniently represent
-`(A implies B)' in standard logic.
+@geindex AI-0120 (Ada 2012 feature)
 
-RM References:  4.03.03 (15)   4.04 (1)   4.04 (7)   4.05.07 (0)   4.07 (2)
-4.07 (3)   4.09 (12)   4.09 (33)   5.03 (3)   5.03 (4)   7.05 (2.1/2)
+
+@itemize *
+
+@item 
+`AI-0120 Constant instance of protected object (0000-00-00)'
+
+This is an RM editorial change only. The section that lists objects that are
+constant failed to include the current instance of a protected object
+within a protected function. This has always been treated as a constant
+in GNAT.
+
+RM References:  3.03 (21)
 @end itemize
 
-@geindex AI-0037 (Ada 2012 feature)
+@geindex AI-0122 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0037 Out-of-range box associations in aggregate (0000-00-00)'
+`AI-0122 Private with and children of generics (0000-00-00)'
 
-This AI confirms that an association of the form @code{Indx => <>} in an
-array aggregate must raise @code{Constraint_Error} if @code{Indx}
-is out of range. The RM specified a range check on other associations, but
-not when the value of the association was defaulted. GNAT has always inserted
-a constraint check on the index value.
+This AI clarifies the visibility of private children of generic units within
+instantiations of a parent. GNAT has always handled this correctly.
 
-RM References:  4.03.03 (29)
+RM References:  10.01.02 (12/2)
 @end itemize
 
 @geindex AI-0123 (Ada 2012 feature)
@@ -27494,100 +27587,97 @@ RM References:  4.05.02 (9.7/2)   4.05.02 (14)   4.05.02 (15)   4.05.02 (24)
 8.05.04 (8)
 @end itemize
 
-@geindex AI-0088 (Ada 2012 feature)
+@geindex AI-0125 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0088 The value of exponentiation (0000-00-00)'
+`AI-0125 Nonoverridable operations of an ancestor (2010-09-28)'
 
-This AI clarifies the equivalence rule given for the dynamic semantics of
-exponentiation: the value of the operation can be obtained by repeated
-multiplication, but the operation can be implemented otherwise (for example
-using the familiar divide-by-two-and-square algorithm, even if this is less
-accurate), and does not imply repeated reads of a volatile base.
+In Ada 2012, the declaration of a primitive operation of a type extension
+or private extension can also override an inherited primitive that is not
+visible at the point of this declaration.
 
-RM References:  4.05.06 (11)
+RM References:  7.03.01 (6)   8.03 (23)   8.03.01 (5/2)   8.03.01 (6/2)
 @end itemize
 
-@geindex AI-0188 (Ada 2012 feature)
+@geindex AI-0126 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0188 Case expressions (2010-01-09)'
-
-Case expressions are permitted. This allows use of constructs such as:
+`AI-0126 Dispatching with no declared operation (0000-00-00)'
 
-@example
-X := (case Y is when 1 => 2, when 2 => 3, when others => 31)
-@end example
+This AI clarifies dispatching rules, and simply confirms that dispatching
+executes the operation of the parent type when there is no explicitly or
+implicitly declared operation for the descendant type. This has always been
+the case in all versions of GNAT.
 
-RM References:  4.05.07 (0)   4.05.08 (0)   4.09 (12)   4.09 (33)
+RM References:  3.09.02 (20/2)   3.09.02 (20.1/2)   3.09.02 (20.2/2)
 @end itemize
 
-@geindex AI-0104 (Ada 2012 feature)
+@geindex AI-0127 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0104 Null exclusion and uninitialized allocator (2010-07-15)'
+`AI-0127 Adding Locale Capabilities (2010-09-29)'
 
-The assignment @code{Ptr := new not null Some_Ptr;} will raise
-@code{Constraint_Error} because the default value of the allocated object is
-`null'. This useless construct is illegal in Ada 2012.
+This package provides an interface for identifying the current locale.
 
-RM References:  4.08 (2)
+RM References:  A.19    A.19.01    A.19.02    A.19.03    A.19.05    A.19.06
+A.19.07    A.19.08    A.19.09    A.19.10    A.19.11    A.19.12    A.19.13
 @end itemize
 
-@geindex AI-0157 (Ada 2012 feature)
+@geindex AI-0128 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0157 Allocation/Deallocation from empty pool (2010-07-11)'
+`AI-0128 Inequality is a primitive operation (0000-00-00)'
 
-Allocation and Deallocation from an empty storage pool (i.e. allocation or
-deallocation of a pointer for which a static storage size clause of zero
-has been given) is now illegal and is detected as such. GNAT
-previously gave a warning but not an error.
+If an equality operator (“=”) is declared for a type, then the implicitly
+declared inequality operator (“/=”) is a primitive operation of the type.
+This is the only reasonable interpretation, and is the one always implemented
+by GNAT, but the RM was not entirely clear in making this point.
 
-RM References:  4.08 (5.3/2)   13.11.02 (4)   13.11.02 (17)
+RM References:  3.02.03 (6)   6.06 (6)
 @end itemize
 
-@geindex AI-0179 (Ada 2012 feature)
+@geindex AI-0129 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0179 Statement not required after label (2010-04-10)'
+`AI-0129 Limited views and incomplete types (0000-00-00)'
 
-It is not necessary to have a statement following a label, so a label
-can appear at the end of a statement sequence without the need for putting a
-null statement afterwards, but it is not allowable to have only labels and
-no real statements in a statement sequence.
+This AI clarifies the description of limited views: a limited view of a
+package includes only one view of a type that has an incomplete declaration
+and a full declaration (there is no possible ambiguity in a client package).
+This AI also fixes an omission: a nested package in the private part has no
+limited view. GNAT always implemented this correctly.
 
-RM References:  5.01 (2)
+RM References:  10.01.01 (12.2/2)   10.01.01 (12.3/2)
 @end itemize
 
-@geindex AI-0139-2 (Ada 2012 feature)
+@geindex AI-0132 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0139-2 Syntactic sugar for iterators (2010-09-29)'
+`AI-0132 Placement of library unit pragmas (0000-00-00)'
 
-The new syntax for iterating over arrays and containers is now implemented.
-Iteration over containers is for now limited to read-only iterators. Only
-default iterators are supported, with the syntax:  @code{for Elem of C}.
+This AI fills a gap in the description of library unit pragmas. The pragma
+clearly must apply to a library unit, even if it does not carry the name
+of the enclosing unit. GNAT has always enforced the required check.
 
-RM References:  5.05
+RM References:  10.01.05 (7)
 @end itemize
 
 @geindex AI-0134 (Ada 2012 feature)
@@ -27604,1129 +27694,1039 @@ parameters must match. GNAT has always enforced this rule.
 RM References:  6.03.01 (18)
 @end itemize
 
-@geindex AI-0207 (Ada 2012 feature)
+@geindex AI-0137 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0207 Mode conformance and access constant (0000-00-00)'
+`AI-0137 String encoding package (2010-03-25)'
 
-This AI confirms that access_to_constant indication must match for mode
-conformance. This was implemented in GNAT when the qualifier was originally
-introduced in Ada 2005.
+The packages @code{Ada.Strings.UTF_Encoding}, together with its child
+packages, @code{Conversions}, @code{Strings}, @code{Wide_Strings},
+and @code{Wide_Wide_Strings} have been
+implemented. These packages (whose documentation can be found in the spec
+files @code{a-stuten.ads}, @code{a-suenco.ads}, @code{a-suenst.ads},
+@code{a-suewst.ads}, @code{a-suezst.ads}) allow encoding and decoding of
+@code{String}, @code{Wide_String}, and @code{Wide_Wide_String}
+values using UTF coding schemes (including UTF-8, UTF-16LE, UTF-16BE, and
+UTF-16), as well as conversions between the different UTF encodings. With
+the exception of @code{Wide_Wide_Strings}, these packages are available in
+Ada 95 and Ada 2005 mode as well as Ada 2012 mode.
+The @code{Wide_Wide_Strings} package
+is available in Ada 2005 mode as well as Ada 2012 mode (but not in Ada 95
+mode since it uses @code{Wide_Wide_Character}).
 
-RM References:  6.03.01 (16/2)
+RM References:  A.04.11
 @end itemize
 
-@geindex AI-0046 (Ada 2012 feature)
+@geindex AI-0139-2 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0046 Null exclusion match for full conformance (2010-07-17)'
+`AI-0139-2 Syntactic sugar for iterators (2010-09-29)'
 
-For full conformance, in the case of access parameters, the null exclusion
-must match (either both or neither must have @code{not null}).
+The new syntax for iterating over arrays and containers is now implemented.
+Iteration over containers is for now limited to read-only iterators. Only
+default iterators are supported, with the syntax:  @code{for Elem of C}.
 
-RM References:  6.03.02 (18)
+RM References:  5.05
 @end itemize
 
-@geindex AI-0118 (Ada 2012 feature)
+@geindex AI-0146 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0118 The association of parameter associations (0000-00-00)'
-
-This AI clarifies the rules for named associations in subprogram calls and
-generic instantiations. The rules have been in place since Ada 83.
-
-RM References:  6.04.01 (2)   12.03 (9)
-@end itemize
-
-@geindex AI-0196 (Ada 2012 feature)
-
+`AI-0146 Type invariants (2009-09-21)'
 
-@itemize *
-
-@item 
-`AI-0196 Null exclusion tests for out parameters (0000-00-00)'
-
-Null exclusion checks are not made for @code{out} parameters when
-evaluating the actual parameters. GNAT has never generated these checks.
+Type invariants may be specified for private types using the aspect notation.
+Aspect @code{Type_Invariant} may be specified for any private type,
+@code{Type_Invariant'Class} can
+only be specified for tagged types, and is inherited by any descendent of the
+tagged types. The invariant is a boolean expression that is tested for being
+true in the following situations: conversions to the private type, object
+declarations for the private type that are default initialized, and
+[`in'] `out'
+parameters and returned result on return from any primitive operation for
+the type that is visible to a client.
+GNAT defines the synonyms @code{Invariant} for @code{Type_Invariant} and
+@code{Invariant'Class} for @code{Type_Invariant'Class}.
 
-RM References:  6.04.01 (13)
+RM References:  13.03.03 (00)
 @end itemize
 
-@geindex AI-0015 (Ada 2012 feature)
+@geindex AI-0147 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0015 Constant return objects (0000-00-00)'
+`AI-0147 Conditional expressions (2009-03-29)'
 
-The return object declared in an `extended_return_statement' may be
-declared constant. This was always intended, and GNAT has always allowed it.
+Conditional expressions are permitted. The form of such an expression is:
 
-RM References:  6.05 (2.1/2)   3.03 (10/2)   3.03 (21)   6.05 (5/2)
-6.05 (5.7/2)
+@example
+(if expr then expr @{elsif expr then expr@} [else expr])
+@end example
+
+The parentheses can be omitted in contexts where parentheses are present
+anyway, such as subprogram arguments and pragma arguments. If the `else'
+clause is omitted, `else' `True' is assumed;
+thus @code{(if A then B)} is a way to conveniently represent
+`(A implies B)' in standard logic.
+
+RM References:  4.03.03 (15)   4.04 (1)   4.04 (7)   4.05.07 (0)   4.07 (2)
+4.07 (3)   4.09 (12)   4.09 (33)   5.03 (3)   5.03 (4)   7.05 (2.1/2)
 @end itemize
 
-@geindex AI-0032 (Ada 2012 feature)
+@geindex AI-0152 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0032 Extended return for class-wide functions (0000-00-00)'
+`AI-0152 Restriction No_Anonymous_Allocators (2010-09-08)'
 
-If a function returns a class-wide type, the object of an extended return
-statement can be declared with a specific type that is covered by the class-
-wide type. This has been implemented in GNAT since the introduction of
-extended returns. Note AI-0103 complements this AI by imposing matching
-rules for constrained return types.
+Restriction @code{No_Anonymous_Allocators} prevents the use of allocators
+where the type of the returned value is an anonymous access type.
 
-RM References:  6.05 (5.2/2)   6.05 (5.3/2)   6.05 (5.6/2)   6.05 (5.8/2)
-6.05 (8/2)
+RM References:  H.04 (8/1)
 @end itemize
 
-@geindex AI-0103 (Ada 2012 feature)
+@geindex AI-0157 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0103 Static matching for extended return (2010-07-23)'
+`AI-0157 Allocation/Deallocation from empty pool (2010-07-11)'
 
-If the return subtype of a function is an elementary type or a constrained
-type, the subtype indication in an extended return statement must match
-statically this return subtype.
+Allocation and Deallocation from an empty storage pool (i.e. allocation or
+deallocation of a pointer for which a static storage size clause of zero
+has been given) is now illegal and is detected as such. GNAT
+previously gave a warning but not an error.
 
-RM References:  6.05 (5.2/2)
+RM References:  4.08 (5.3/2)   13.11.02 (4)   13.11.02 (17)
 @end itemize
 
-@geindex AI-0058 (Ada 2012 feature)
+@geindex AI-0158 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0058 Abnormal completion of an extended return (0000-00-00)'
+`AI-0158 Generalizing membership tests (2010-09-16)'
 
-The RM had some incorrect wording implying wrong treatment of abnormal
-completion in an extended return. GNAT has always implemented the intended
-correct semantics as described by this AI.
+This AI extends the syntax of membership tests to simplify complex conditions
+that can be expressed as membership in a subset of values of any type. It
+introduces syntax for a list of expressions that may be used in loop contexts
+as well.
 
-RM References:  6.05 (22/2)
+RM References:  3.08.01 (5)   4.04 (3)   4.05.02 (3)   4.05.02 (5)   4.05.02 (27)
 @end itemize
 
-@geindex AI-0050 (Ada 2012 feature)
+@geindex AI-0161 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0050 Raising Constraint_Error early for function call (0000-00-00)'
+`AI-0161 Restriction No_Default_Stream_Attributes (2010-09-11)'
 
-The implementation permissions for raising @code{Constraint_Error} early on a function call
-when it was clear an exception would be raised were over-permissive and allowed
-mishandling of discriminants in some cases. GNAT did
-not take advantage of these incorrect permissions in any case.
+A new restriction @code{No_Default_Stream_Attributes} prevents the use of any
+of the default stream attributes for elementary types. If this restriction is
+in force, then it is necessary to provide explicit subprograms for any
+stream attributes used.
 
-RM References:  6.05 (24/2)
+RM References:  13.12.01 (4/2)   13.13.02 (40/2)   13.13.02 (52/2)
 @end itemize
 
-@geindex AI-0125 (Ada 2012 feature)
+@geindex AI-0162 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0125 Nonoverridable operations of an ancestor (2010-09-28)'
+`AI-0162 Incomplete type completed by partial view (2010-09-15)'
 
-In Ada 2012, the declaration of a primitive operation of a type extension
-or private extension can also override an inherited primitive that is not
-visible at the point of this declaration.
+Incomplete types are made more useful by allowing them to be completed by
+private types and private extensions.
 
-RM References:  7.03.01 (6)   8.03 (23)   8.03.01 (5/2)   8.03.01 (6/2)
+RM References:  3.10.01 (2.5/2)   3.10.01 (2.6/2)   3.10.01 (3)   3.10.01 (4/2)
 @end itemize
 
-@geindex AI-0062 (Ada 2012 feature)
+@geindex AI-0163 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0062 Null exclusions and deferred constants (0000-00-00)'
+`AI-0163 Pragmas in place of null (2010-07-01)'
 
-A full constant may have a null exclusion even if its associated deferred
-constant does not. GNAT has always allowed this.
+A statement sequence may be composed entirely of pragmas. It is no longer
+necessary to add a dummy @code{null} statement to make the sequence legal.
 
-RM References:  7.04 (6/2)   7.04 (7.1/2)
+RM References:  2.08 (7)   2.08 (16)
 @end itemize
 
-@geindex AI-0178 (Ada 2012 feature)
+@geindex AI-0171 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0178 Incomplete views are limited (0000-00-00)'
+`AI-0171 Pragma CPU and Ravenscar Profile (2010-09-24)'
 
-This AI clarifies the role of incomplete views and plugs an omission in the
-RM. GNAT always correctly restricted the use of incomplete views and types.
+A new package @code{System.Multiprocessors} is added, together with the
+definition of pragma @code{CPU} for controlling task affinity. A new no
+dependence restriction, on @code{System.Multiprocessors.Dispatching_Domains},
+is added to the Ravenscar profile.
 
-RM References:  7.05 (3/2)   7.05 (6/2)
+RM References:  D.13.01 (4/2)   D.16
 @end itemize
 
-@geindex AI-0087 (Ada 2012 feature)
+@geindex AI-0173 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0087 Actual for formal nonlimited derived type (2010-07-15)'
+`AI-0173 Testing if tags represent abstract types (2010-07-03)'
 
-The actual for a formal nonlimited derived type cannot be limited. In
-particular, a formal derived type that extends a limited interface but which
-is not explicitly limited cannot be instantiated with a limited type.
+The function @code{Ada.Tags.Type_Is_Abstract} returns @code{True} if invoked
+with the tag of an abstract type, and @code{False} otherwise.
 
-RM References:  7.05 (5/2)   12.05.01 (5.1/2)
+RM References:  3.09 (7.4/2)   3.09 (12.4/2)
 @end itemize
 
-@geindex AI-0099 (Ada 2012 feature)
+@geindex AI-0176 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0099 Tag determines whether finalization needed (0000-00-00)'
+`AI-0176 Quantified expressions (2010-09-29)'
 
-This AI clarifies that ‘needs finalization’ is part of dynamic semantics,
-and therefore depends on the run-time characteristics of an object (i.e. its
-tag) and not on its nominal type. As the AI indicates: “we do not expect
-this to affect any implementation’’.
+Both universally and existentially quantified expressions are implemented.
+They use the new syntax for iterators proposed in AI05-139-2, as well as
+the standard Ada loop syntax.
 
-RM References:  7.06.01 (6)   7.06.01 (7)   7.06.01 (8)   7.06.01 (9/2)
+RM References:  1.01.04 (12)   2.09 (2/2)   4.04 (7)   4.05.09 (0)
 @end itemize
 
-@geindex AI-0064 (Ada 2012 feature)
+@geindex AI-0177 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0064 Redundant finalization rule (0000-00-00)'
+`AI-0177 Parameterized expressions (2010-07-10)'
 
-This is an editorial change only. The intended behavior is already checked
-by an existing ACATS test, which GNAT has always executed correctly.
+The new Ada 2012 notion of parameterized expressions is implemented. The form
+is:
 
-RM References:  7.06.01 (17.1/1)
+@example
+function-specification is (expression)
+@end example
+
+This is exactly equivalent to the
+corresponding function body that returns the expression, but it can appear
+in a package spec. Note that the expression must be parenthesized.
+
+RM References:  13.11.01 (3/2)
 @end itemize
 
-@geindex AI-0026 (Ada 2012 feature)
+@geindex AI-0178 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0026 Missing rules for Unchecked_Union (2010-07-07)'
+`AI-0178 Incomplete views are limited (0000-00-00)'
 
-Record representation clauses concerning Unchecked_Union types cannot mention
-the discriminant of the type. The type of a component declared in the variant
-part of an Unchecked_Union cannot be controlled, have controlled components,
-nor have protected or task parts. If an Unchecked_Union type is declared
-within the body of a generic unit or its descendants, then the type of a
-component declared in the variant part cannot be a formal private type or a
-formal private extension declared within the same generic unit.
+This AI clarifies the role of incomplete views and plugs an omission in the
+RM. GNAT always correctly restricted the use of incomplete views and types.
 
-RM References:  7.06 (9.4/2)   B.03.03 (9/2)   B.03.03 (10/2)
+RM References:  7.05 (3/2)   7.05 (6/2)
 @end itemize
 
-@geindex AI-0205 (Ada 2012 feature)
+@geindex AI-0179 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0205 Extended return declares visible name (0000-00-00)'
+`AI-0179 Statement not required after label (2010-04-10)'
 
-This AI corrects a simple omission in the RM. Return objects have always
-been visible within an extended return statement.
+It is not necessary to have a statement following a label, so a label
+can appear at the end of a statement sequence without the need for putting a
+null statement afterwards, but it is not allowable to have only labels and
+no real statements in a statement sequence.
 
-RM References:  8.03 (17)
+RM References:  5.01 (2)
 @end itemize
 
-@geindex AI-0042 (Ada 2012 feature)
+@geindex AI-0181 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0042 Overriding versus implemented-by (0000-00-00)'
+`AI-0181 Soft hyphen is a non-graphic character (2010-07-23)'
 
-This AI fixes a wording gap in the RM. An operation of a synchronized
-interface can be implemented by a protected or task entry, but the abstract
-operation is not being overridden in the usual sense, and it must be stated
-separately that this implementation is legal. This has always been the case
-in GNAT.
+From Ada 2005 on, soft hyphen is considered a non-graphic character, which
+means that it has a special name (@code{SOFT_HYPHEN}) in conjunction with the
+@code{Image} and @code{Value} attributes for the character types. Strictly
+speaking this is an inconsistency with Ada 95, but in practice the use of
+these attributes is so obscure that it will not cause problems.
 
-RM References:  9.01 (9.2/2)   9.04 (11.1/2)
+RM References:  3.05.02 (2/2)   A.01 (35/2)   A.03.03 (21)
 @end itemize
 
-@geindex AI-0030 (Ada 2012 feature)
+@geindex AI-0182 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0030 Requeue on synchronized interfaces (2010-07-19)'
+`AI-0182 Additional forms for' @code{Character'Value} `(0000-00-00)'
 
-Requeue is permitted to a protected, synchronized or task interface primitive
-providing it is known that the overriding operation is an entry. Otherwise
-the requeue statement has the same effect as a procedure call. Use of pragma
-@code{Implemented} provides a way to impose a static requirement on the
-overriding operation by adhering to one of the implementation kinds: entry,
-protected procedure or any of the above.
+This AI allows @code{Character'Value} to accept the string @code{'?'} where
+@code{?} is any character including non-graphic control characters. GNAT has
+always accepted such strings. It also allows strings such as
+@code{HEX_00000041} to be accepted, but GNAT does not take advantage of this
+permission and raises @code{Constraint_Error}, as is certainly still
+permitted.
 
-RM References:  9.05 (9)   9.05.04 (2)   9.05.04 (3)   9.05.04 (5)
-9.05.04 (6)   9.05.04 (7)   9.05.04 (12)
+RM References:  3.05 (56/2)
 @end itemize
 
-@geindex AI-0201 (Ada 2012 feature)
+@geindex AI-0183 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0201 Independence of atomic object components (2010-07-22)'
-
-If an Atomic object has a pragma @code{Pack} or a @code{Component_Size}
-attribute, then individual components may not be addressable by independent
-tasks. However, if the representation clause has no effect (is confirming),
-then independence is not compromised. Furthermore, in GNAT, specification of
-other appropriately addressable component sizes (e.g. 16 for 8-bit
-characters) also preserves independence. GNAT now gives very clear warnings
-both for the declaration of such a type, and for any assignment to its components.
+`AI-0183 Aspect specifications (2010-08-16)'
 
-RM References:  9.10 (1/3)   C.06 (22/2)   C.06 (23/2)
+Aspect specifications have been fully implemented except for pre and post-
+conditions, and type invariants, which have their own separate AI’s. All
+forms of declarations listed in the AI are supported. The following is a
+list of the aspects supported (with GNAT implementation aspects marked)
 @end itemize
 
-@geindex AI-0009 (Ada 2012 feature)
 
+@multitable {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} {xxxxxxxxxxxxx} 
+@headitem
 
-@itemize *
+Supported Aspect
 
-@item 
-`AI-0009 Pragma Independent[_Components] (2010-07-23)'
+@tab
 
-This AI introduces the new pragmas @code{Independent} and
-@code{Independent_Components},
-which control guaranteeing independence of access to objects and components.
-The AI also requires independence not unaffected by confirming rep clauses.
+Source
 
-RM References:  9.10 (1)   13.01 (15/1)   13.02 (9)   13.03 (13)   C.06 (2)
-C.06 (4)   C.06 (6)   C.06 (9)   C.06 (13)   C.06 (14)
-@end itemize
+@item
 
-@geindex AI-0072 (Ada 2012 feature)
+@code{Ada_2005}
 
+@tab
 
-@itemize *
+– GNAT
 
-@item 
-`AI-0072 Task signalling using ‘Terminated (0000-00-00)'
+@item
 
-This AI clarifies that task signalling for reading @code{'Terminated} only
-occurs if the result is True. GNAT semantics has always been consistent with
-this notion of task signalling.
+@code{Ada_2012}
 
-RM References:  9.10 (6.1/1)
-@end itemize
+@tab
 
-@geindex AI-0108 (Ada 2012 feature)
+– GNAT
 
+@item
 
-@itemize *
+@code{Address}
 
-@item 
-`AI-0108 Limited incomplete view and discriminants (0000-00-00)'
+@tab
 
-This AI confirms that an incomplete type from a limited view does not have
-discriminants. This has always been the case in GNAT.
+@item
 
-RM References:  10.01.01 (12.3/2)
-@end itemize
+@code{Alignment}
 
-@geindex AI-0129 (Ada 2012 feature)
+@tab
 
+@item
 
-@itemize *
+@code{Atomic}
 
-@item 
-`AI-0129 Limited views and incomplete types (0000-00-00)'
+@tab
 
-This AI clarifies the description of limited views: a limited view of a
-package includes only one view of a type that has an incomplete declaration
-and a full declaration (there is no possible ambiguity in a client package).
-This AI also fixes an omission: a nested package in the private part has no
-limited view. GNAT always implemented this correctly.
+@item
 
-RM References:  10.01.01 (12.2/2)   10.01.01 (12.3/2)
-@end itemize
+@code{Atomic_Components}
 
-@geindex AI-0077 (Ada 2012 feature)
+@tab
 
+@item
 
-@itemize *
+@code{Bit_Order}
 
-@item 
-`AI-0077 Limited withs and scope of declarations (0000-00-00)'
+@tab
 
-This AI clarifies that a declaration does not include a context clause,
-and confirms that it is illegal to have a context in which both a limited
-and a nonlimited view of a package are accessible. Such double visibility
-was always rejected by GNAT.
+@item
 
-RM References:  10.01.02 (12/2)   10.01.02 (21/2)   10.01.02 (22/2)
-@end itemize
+@code{Component_Size}
 
-@geindex AI-0122 (Ada 2012 feature)
+@tab
 
+@item
 
-@itemize *
+@code{Contract_Cases}
 
-@item 
-`AI-0122 Private with and children of generics (0000-00-00)'
+@tab
 
-This AI clarifies the visibility of private children of generic units within
-instantiations of a parent. GNAT has always handled this correctly.
+– GNAT
 
-RM References:  10.01.02 (12/2)
-@end itemize
+@item
 
-@geindex AI-0040 (Ada 2012 feature)
+@code{Discard_Names}
 
+@tab
 
-@itemize *
+@item
 
-@item 
-`AI-0040 Limited with clauses on descendant (0000-00-00)'
+@code{External_Tag}
 
-This AI confirms that a limited with clause in a child unit cannot name
-an ancestor of the unit. This has always been checked in GNAT.
+@tab
 
-RM References:  10.01.02 (20/2)
-@end itemize
+@item
 
-@geindex AI-0132 (Ada 2012 feature)
+@code{Favor_Top_Level}
 
+@tab
 
-@itemize *
+– GNAT
 
-@item 
-`AI-0132 Placement of library unit pragmas (0000-00-00)'
+@item
 
-This AI fills a gap in the description of library unit pragmas. The pragma
-clearly must apply to a library unit, even if it does not carry the name
-of the enclosing unit. GNAT has always enforced the required check.
+@code{Inline}
 
-RM References:  10.01.05 (7)
-@end itemize
+@tab
 
-@geindex AI-0034 (Ada 2012 feature)
+@item
 
+@code{Inline_Always}
 
-@itemize *
+@tab
 
-@item 
-`AI-0034 Categorization of limited views (0000-00-00)'
+– GNAT
 
-The RM makes certain limited with clauses illegal because of categorization
-considerations, when the corresponding normal with would be legal. This is
-not intended, and GNAT has always implemented the recommended behavior.
+@item
 
-RM References:  10.02.01 (11/1)   10.02.01 (17/2)
-@end itemize
+@code{Invariant}
 
-@geindex AI-0035 (Ada 2012 feature)
+@tab
 
+– GNAT
 
-@itemize *
+@item
 
-@item 
-`AI-0035 Inconsistencies with Pure units (0000-00-00)'
+@code{Machine_Radix}
 
-This AI remedies some inconsistencies in the legality rules for Pure units.
-Derived access types are legal in a pure unit (on the assumption that the
-rule for a zero storage pool size has been enforced on the ancestor type).
-The rules are enforced in generic instances and in subunits. GNAT has always
-implemented the recommended behavior.
+@tab
 
-RM References:  10.02.01 (15.1/2)   10.02.01 (15.4/2)   10.02.01 (15.5/2)   10.02.01 (17/2)
-@end itemize
+@item
 
-@geindex AI-0219 (Ada 2012 feature)
+@code{No_Return}
 
+@tab
 
-@itemize *
+@item
 
-@item 
-`AI-0219 Pure permissions and limited parameters (2010-05-25)'
+@code{Object_Size}
 
-This AI refines the rules for the cases with limited parameters which do not
-allow the implementations to omit ‘redundant’. GNAT now properly conforms
-to the requirements of this binding interpretation.
+@tab
 
-RM References:  10.02.01 (18/2)
-@end itemize
+– GNAT
 
-@geindex AI-0043 (Ada 2012 feature)
+@item
 
+@code{Pack}
 
-@itemize *
+@tab
 
-@item 
-`AI-0043 Rules about raising exceptions (0000-00-00)'
+@item
 
-This AI covers various omissions in the RM regarding the raising of
-exceptions. GNAT has always implemented the intended semantics.
+@code{Persistent_BSS}
 
-RM References:  11.04.01 (10.1/2)   11 (2)
-@end itemize
+@tab
 
-@geindex AI-0200 (Ada 2012 feature)
+– GNAT
 
+@item
 
-@itemize *
+@code{Post}
 
-@item 
-`AI-0200 Mismatches in formal package declarations (0000-00-00)'
+@tab
 
-This AI plugs a gap in the RM which appeared to allow some obviously intended
-illegal instantiations. GNAT has never allowed these instantiations.
+@item
 
-RM References:  12.07 (16)
-@end itemize
+@code{Pre}
 
-@geindex AI-0112 (Ada 2012 feature)
+@tab
 
+@item
 
-@itemize *
+@code{Predicate}
 
-@item 
-`AI-0112 Detection of duplicate pragmas (2010-07-24)'
+@tab
 
-This AI concerns giving names to various representation aspects, but the
-practical effect is simply to make the use of duplicate
-@code{Atomic[_Components]},
-@code{Volatile[_Components]}, and
-@code{Independent[_Components]} pragmas illegal, and GNAT
-now performs this required check.
+@item
 
-RM References:  13.01 (8)
-@end itemize
+@code{Preelaborable_Initialization}
 
-@geindex AI-0106 (Ada 2012 feature)
+@tab
 
+@item
 
-@itemize *
+@code{Pure_Function}
 
-@item 
-`AI-0106 No representation pragmas on generic formals (0000-00-00)'
+@tab
 
-The RM appeared to allow representation pragmas on generic formal parameters,
-but this was not intended, and GNAT has never permitted this usage.
+– GNAT
 
-RM References:  13.01 (9.1/1)
-@end itemize
+@item
 
-@geindex AI-0012 (Ada 2012 feature)
+@code{Remote_Access_Type}
 
+@tab
 
-@itemize *
+– GNAT
 
-@item 
-`AI-0012 Pack/Component_Size for aliased/atomic (2010-07-15)'
+@item
 
-It is now illegal to give an inappropriate component size or a pragma
-@code{Pack} that attempts to change the component size in the case of atomic
-or aliased components. Previously GNAT ignored such an attempt with a
-warning.
+@code{Shared}
 
-RM References:  13.02 (6.1/2)   13.02 (7)   C.06 (10)   C.06 (11)   C.06 (21)
-@end itemize
+@tab
 
-@geindex AI-0039 (Ada 2012 feature)
+– GNAT
 
+@item
 
-@itemize *
+@code{Size}
 
-@item 
-`AI-0039 Stream attributes cannot be dynamic (0000-00-00)'
+@tab
 
-The RM permitted the use of dynamic expressions (such as @code{ptr.all})`
-for stream attributes, but these were never useful and are now illegal. GNAT
-has always regarded such expressions as illegal.
+@item
 
-RM References:  13.03 (4)   13.03 (6)   13.13.02 (38/2)
-@end itemize
+@code{Storage_Pool}
 
-@geindex AI-0095 (Ada 2012 feature)
+@tab
+
+@item
+
+@code{Storage_Size}
+
+@tab
+
+@item
 
+@code{Stream_Size}
 
-@itemize *
+@tab
 
-@item 
-`AI-0095 Address of intrinsic subprograms (0000-00-00)'
+@item
 
-The prefix of @code{'Address} cannot statically denote a subprogram with
-convention @code{Intrinsic}. The use of the @code{Address} attribute raises
-@code{Program_Error} if the prefix denotes a subprogram with convention
-@code{Intrinsic}.
+@code{Suppress}
 
-RM References:  13.03 (11/1)
-@end itemize
+@tab
 
-@geindex AI-0116 (Ada 2012 feature)
+@item
 
+@code{Suppress_Debug_Info}
 
-@itemize *
+@tab
 
-@item 
-`AI-0116 Alignment of class-wide objects (0000-00-00)'
+– GNAT
 
-This AI requires that the alignment of a class-wide object be no greater
-than the alignment of any type in the class. GNAT has always followed this
-recommendation.
+@item
 
-RM References:  13.03 (29)   13.11 (16)
-@end itemize
+@code{Test_Case}
 
-@geindex AI-0146 (Ada 2012 feature)
+@tab
 
+– GNAT
 
-@itemize *
+@item
 
-@item 
-`AI-0146 Type invariants (2009-09-21)'
+@code{Thread_Local_Storage}
 
-Type invariants may be specified for private types using the aspect notation.
-Aspect @code{Type_Invariant} may be specified for any private type,
-@code{Type_Invariant'Class} can
-only be specified for tagged types, and is inherited by any descendent of the
-tagged types. The invariant is a boolean expression that is tested for being
-true in the following situations: conversions to the private type, object
-declarations for the private type that are default initialized, and
-[`in'] `out'
-parameters and returned result on return from any primitive operation for
-the type that is visible to a client.
-GNAT defines the synonyms @code{Invariant} for @code{Type_Invariant} and
-@code{Invariant'Class} for @code{Type_Invariant'Class}.
+@tab
 
-RM References:  13.03.03 (00)
-@end itemize
+– GNAT
 
-@geindex AI-0078 (Ada 2012 feature)
+@item
 
+@code{Type_Invariant}
 
-@itemize *
+@tab
 
-@item 
-`AI-0078 Relax Unchecked_Conversion alignment rules (0000-00-00)'
+@item
 
-In Ada 2012, compilers are required to support unchecked conversion where the
-target alignment is a multiple of the source alignment. GNAT always supported
-this case (and indeed all cases of differing alignments, doing copies where
-required if the alignment was reduced).
+@code{Unchecked_Union}
 
-RM References:  13.09 (7)
-@end itemize
+@tab
 
-@geindex AI-0195 (Ada 2012 feature)
+@item
 
+@code{Universal_Aliasing}
 
-@itemize *
+@tab
 
-@item 
-`AI-0195 Invalid value handling is implementation defined (2010-07-03)'
+– GNAT
 
-The handling of invalid values is now designated to be implementation
-defined. This is a documentation change only, requiring Annex M in the GNAT
-Reference Manual to document this handling.
-In GNAT, checks for invalid values are made
-only when necessary to avoid erroneous behavior. Operations like assignments
-which cannot cause erroneous behavior ignore the possibility of invalid
-values and do not do a check. The date given above applies only to the
-documentation change, this behavior has always been implemented by GNAT.
+@item
 
-RM References:  13.09.01 (10)
-@end itemize
+@code{Unmodified}
 
-@geindex AI-0193 (Ada 2012 feature)
+@tab
 
+– GNAT
 
-@itemize *
+@item
 
-@item 
-`AI-0193 Alignment of allocators (2010-09-16)'
+@code{Unreferenced}
 
-This AI introduces a new attribute @code{Max_Alignment_For_Allocation},
-analogous to @code{Max_Size_In_Storage_Elements}, but for alignment instead
-of size.
+@tab
 
-RM References:  13.11 (16)   13.11 (21)   13.11.01 (0)   13.11.01 (1)
-13.11.01 (2)   13.11.01 (3)
-@end itemize
+– GNAT
 
-@geindex AI-0177 (Ada 2012 feature)
+@item
 
+@code{Unreferenced_Objects}
 
-@itemize *
+@tab
 
-@item 
-`AI-0177 Parameterized expressions (2010-07-10)'
+– GNAT
 
-The new Ada 2012 notion of parameterized expressions is implemented. The form
-is:
+@item
 
-@example
-function-specification is (expression)
-@end example
+@code{Unsuppress}
 
-This is exactly equivalent to the
-corresponding function body that returns the expression, but it can appear
-in a package spec. Note that the expression must be parenthesized.
+@tab
 
-RM References:  13.11.01 (3/2)
-@end itemize
+@item
 
-@geindex AI-0033 (Ada 2012 feature)
+@code{Value_Size}
 
+@tab
 
-@itemize *
+– GNAT
 
-@item 
-`AI-0033 Attach/Interrupt_Handler in generic (2010-07-24)'
+@item
 
-Neither of these two pragmas may appear within a generic template, because
-the generic might be instantiated at other than the library level.
+@code{Volatile}
 
-RM References:  13.11.02 (16)   C.03.01 (7/2)   C.03.01 (8/2)
-@end itemize
+@tab
 
-@geindex AI-0161 (Ada 2012 feature)
+@item
 
+@code{Volatile_Components}
 
-@itemize *
+@tab
 
-@item 
-`AI-0161 Restriction No_Default_Stream_Attributes (2010-09-11)'
+@item
 
-A new restriction @code{No_Default_Stream_Attributes} prevents the use of any
-of the default stream attributes for elementary types. If this restriction is
-in force, then it is necessary to provide explicit subprograms for any
-stream attributes used.
+@code{Warnings}
 
-RM References:  13.12.01 (4/2)   13.13.02 (40/2)   13.13.02 (52/2)
-@end itemize
+@tab
 
-@geindex AI-0194 (Ada 2012 feature)
+– GNAT
 
+@end multitable
 
-@itemize *
 
-@item 
-`AI-0194 Value of Stream_Size attribute (0000-00-00)'
+@quotation
 
-The @code{Stream_Size} attribute returns the default number of bits in the
-stream representation of the given type.
-This value is not affected by the presence
-of stream subprogram attributes for the type. GNAT has always implemented
-this interpretation.
+Note that for aspects with an expression, e.g. @code{Size}, the expression is
+treated like a default expression (visibility is analyzed at the point of
+occurrence of the aspect, but evaluation of the expression occurs at the
+freeze point of the entity involved).
 
-RM References:  13.13.02 (1.2/2)
-@end itemize
+RM References:  3.02.01 (3)   3.02.02 (2)   3.03.01 (2/2)   3.08 (6)
+3.09.03 (1.1/2)   6.01 (2/2)   6.07 (2/2)   9.05.02 (2/2)   7.01 (3)   7.03
+(2)   7.03 (3)   9.01 (2/2)   9.01 (3/2)   9.04 (2/2)   9.04 (3/2)
+9.05.02 (2/2)   11.01 (2)   12.01 (3)   12.03 (2/2)   12.04 (2/2)   12.05 (2)
+12.06 (2.1/2)   12.06 (2.2/2)   12.07 (2)   13.01 (0.1/2)   13.03 (5/1)
+13.03.01 (0)
+@end quotation
 
-@geindex AI-0109 (Ada 2012 feature)
+@geindex AI-0185 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0109 Redundant check in S’Class’Input (0000-00-00)'
+`AI-0185 Ada.Wide_[Wide_]Characters.Handling (2010-07-06)'
 
-This AI is an editorial change only. It removes the need for a tag check
-that can never fail.
+Two new packages @code{Ada.Wide_[Wide_]Characters.Handling} provide
+classification functions for @code{Wide_Character} and
+@code{Wide_Wide_Character}, as well as providing
+case folding routines for @code{Wide_[Wide_]Character} and
+@code{Wide_[Wide_]String}.
 
-RM References:  13.13.02 (34/2)
+RM References:  A.03.05 (0)   A.03.06 (0)
 @end itemize
 
-@geindex AI-0007 (Ada 2012 feature)
+@geindex AI-0188 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0007 Stream read and private scalar types (0000-00-00)'
+`AI-0188 Case expressions (2010-01-09)'
 
-The RM as written appeared to limit the possibilities of declaring read
-attribute procedures for private scalar types. This limitation was not
-intended, and has never been enforced by GNAT.
+Case expressions are permitted. This allows use of constructs such as:
 
-RM References:  13.13.02 (50/2)   13.13.02 (51/2)
+@example
+X := (case Y is when 1 => 2, when 2 => 3, when others => 31)
+@end example
+
+RM References:  4.05.07 (0)   4.05.08 (0)   4.09 (12)   4.09 (33)
 @end itemize
 
-@geindex AI-0065 (Ada 2012 feature)
+@geindex AI-0189 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0065 Remote access types and external streaming (0000-00-00)'
+`AI-0189 No_Allocators_After_Elaboration (2010-01-23)'
 
-This AI clarifies the fact that all remote access types support external
-streaming. This fixes an obvious oversight in the definition of the
-language, and GNAT always implemented the intended correct rules.
+This AI introduces a new restriction @code{No_Allocators_After_Elaboration},
+which says that no dynamic allocation will occur once elaboration is
+completed.
+In general this requires a run-time check, which is not required, and which
+GNAT does not attempt. But the static cases of allocators in a task body or
+in the body of the main program are detected and flagged at compile or bind
+time.
 
-RM References:  13.13.02 (52/2)
+RM References:  D.07 (19.1/2)   H.04 (23.3/2)
 @end itemize
 
-@geindex AI-0019 (Ada 2012 feature)
+@geindex AI-0190 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0019 Freezing of primitives for tagged types (0000-00-00)'
+`AI-0190 pragma Default_Storage_Pool (2010-09-15)'
 
-The RM suggests that primitive subprograms of a specific tagged type are
-frozen when the tagged type is frozen. This would be an incompatible change
-and is not intended. GNAT has never attempted this kind of freezing and its
-behavior is consistent with the recommendation of this AI.
+This AI introduces a new pragma @code{Default_Storage_Pool}, which can be
+used to control storage pools globally.
+In particular, you can force every access
+type that is used for allocation (`new') to have an explicit storage pool,
+or you can declare a pool globally to be used for all access types that lack
+an explicit one.
 
-RM References:  13.14 (2)   13.14 (3/1)   13.14 (8.1/1)   13.14 (10)   13.14 (14)   13.14 (15.1/2)
+RM References:  D.07 (8)
 @end itemize
 
-@geindex AI-0017 (Ada 2012 feature)
+@geindex AI-0193 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0017 Freezing and incomplete types (0000-00-00)'
+`AI-0193 Alignment of allocators (2010-09-16)'
 
-So-called ‘Taft-amendment types’ (i.e., types that are completed in package
-bodies) are not frozen by the occurrence of bodies in the
-enclosing declarative part. GNAT always implemented this properly.
+This AI introduces a new attribute @code{Max_Alignment_For_Allocation},
+analogous to @code{Max_Size_In_Storage_Elements}, but for alignment instead
+of size.
 
-RM References:  13.14 (3/1)
+RM References:  13.11 (16)   13.11 (21)   13.11.01 (0)   13.11.01 (1)
+13.11.01 (2)   13.11.01 (3)
 @end itemize
 
-@geindex AI-0060 (Ada 2012 feature)
+@geindex AI-0194 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0060 Extended definition of remote access types (0000-00-00)'
+`AI-0194 Value of Stream_Size attribute (0000-00-00)'
 
-This AI extends the definition of remote access types to include access
-to limited, synchronized, protected or task class-wide interface types.
-GNAT already implemented this extension.
+The @code{Stream_Size} attribute returns the default number of bits in the
+stream representation of the given type.
+This value is not affected by the presence
+of stream subprogram attributes for the type. GNAT has always implemented
+this interpretation.
 
-RM References:  A (4)   E.02.02 (9/1)   E.02.02 (9.2/1)   E.02.02 (14/2)   E.02.02 (18)
+RM References:  13.13.02 (1.2/2)
 @end itemize
 
-@geindex AI-0114 (Ada 2012 feature)
+@geindex AI-0195 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0114 Classification of letters (0000-00-00)'
+`AI-0195 Invalid value handling is implementation defined (2010-07-03)'
 
-The code points 170 (@code{FEMININE ORDINAL INDICATOR}),
-181 (@code{MICRO SIGN}), and
-186 (@code{MASCULINE ORDINAL INDICATOR}) are technically considered
-lower case letters by Unicode.
-However, they are not allowed in identifiers, and they
-return @code{False} to @code{Ada.Characters.Handling.Is_Letter/Is_Lower}.
-This behavior is consistent with that defined in Ada 95.
+The handling of invalid values is now designated to be implementation
+defined. This is a documentation change only, requiring Annex M in the GNAT
+Reference Manual to document this handling.
+In GNAT, checks for invalid values are made
+only when necessary to avoid erroneous behavior. Operations like assignments
+which cannot cause erroneous behavior ignore the possibility of invalid
+values and do not do a check. The date given above applies only to the
+documentation change, this behavior has always been implemented by GNAT.
 
-RM References:  A.03.02 (59)   A.04.06 (7)
+RM References:  13.09.01 (10)
 @end itemize
 
-@geindex AI-0185 (Ada 2012 feature)
+@geindex AI-0196 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0185 Ada.Wide_[Wide_]Characters.Handling (2010-07-06)'
+`AI-0196 Null exclusion tests for out parameters (0000-00-00)'
 
-Two new packages @code{Ada.Wide_[Wide_]Characters.Handling} provide
-classification functions for @code{Wide_Character} and
-@code{Wide_Wide_Character}, as well as providing
-case folding routines for @code{Wide_[Wide_]Character} and
-@code{Wide_[Wide_]String}.
+Null exclusion checks are not made for @code{out} parameters when
+evaluating the actual parameters. GNAT has never generated these checks.
 
-RM References:  A.03.05 (0)   A.03.06 (0)
+RM References:  6.04.01 (13)
 @end itemize
 
-@geindex AI-0031 (Ada 2012 feature)
+@geindex AI-0198 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0031 Add From parameter to Find_Token (2010-07-25)'
+`AI-0198 Inheriting abstract operators  (0000-00-00)'
 
-A new version of @code{Find_Token} is added to all relevant string packages,
-with an extra parameter @code{From}. Instead of starting at the first
-character of the string, the search for a matching Token starts at the
-character indexed by the value of @code{From}.
-These procedures are available in all versions of Ada
-but if used in versions earlier than Ada 2012 they will generate a warning
-that an Ada 2012 subprogram is being used.
+This AI resolves a conflict between two rules involving inherited abstract
+operations and predefined operators. If a derived numeric type inherits
+an abstract operator, it overrides the predefined one. This interpretation
+was always the one implemented in GNAT.
 
-RM References:  A.04.03 (16)   A.04.03 (67)   A.04.03 (68/1)   A.04.04 (51)
-A.04.05 (46)
+RM References:  3.09.03 (4/3)
 @end itemize
 
-@geindex AI-0056 (Ada 2012 feature)
+@geindex AI-0199 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0056 Index on null string returns zero (0000-00-00)'
+`AI-0199 Aggregate with anonymous access components (2010-07-14)'
 
-The wording in the Ada 2005 RM implied an incompatible handling of the
-@code{Index} functions, resulting in raising an exception instead of
-returning zero in some situations.
-This was not intended and has been corrected.
-GNAT always returned zero, and is thus consistent with this AI.
+A choice list in a record aggregate can include several components of
+(distinct) anonymous access types as long as they have matching designated
+subtypes.
 
-RM References:  A.04.03 (56.2/2)   A.04.03 (58.5/2)
+RM References:  4.03.01 (16)
 @end itemize
 
-@geindex AI-0137 (Ada 2012 feature)
+@geindex AI-0200 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0137 String encoding package (2010-03-25)'
+`AI-0200 Mismatches in formal package declarations (0000-00-00)'
 
-The packages @code{Ada.Strings.UTF_Encoding}, together with its child
-packages, @code{Conversions}, @code{Strings}, @code{Wide_Strings},
-and @code{Wide_Wide_Strings} have been
-implemented. These packages (whose documentation can be found in the spec
-files @code{a-stuten.ads}, @code{a-suenco.ads}, @code{a-suenst.ads},
-@code{a-suewst.ads}, @code{a-suezst.ads}) allow encoding and decoding of
-@code{String}, @code{Wide_String}, and @code{Wide_Wide_String}
-values using UTF coding schemes (including UTF-8, UTF-16LE, UTF-16BE, and
-UTF-16), as well as conversions between the different UTF encodings. With
-the exception of @code{Wide_Wide_Strings}, these packages are available in
-Ada 95 and Ada 2005 mode as well as Ada 2012 mode.
-The @code{Wide_Wide_Strings} package
-is available in Ada 2005 mode as well as Ada 2012 mode (but not in Ada 95
-mode since it uses @code{Wide_Wide_Character}).
+This AI plugs a gap in the RM which appeared to allow some obviously intended
+illegal instantiations. GNAT has never allowed these instantiations.
 
-RM References:  A.04.11
+RM References:  12.07 (16)
 @end itemize
 
-@geindex AI-0038 (Ada 2012 feature)
+@geindex AI-0201 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0038 Minor errors in Text_IO (0000-00-00)'
+`AI-0201 Independence of atomic object components (2010-07-22)'
 
-These are minor errors in the description on three points. The intent on
-all these points has always been clear, and GNAT has always implemented the
-correct intended semantics.
+If an Atomic object has a pragma @code{Pack} or a @code{Component_Size}
+attribute, then individual components may not be addressable by independent
+tasks. However, if the representation clause has no effect (is confirming),
+then independence is not compromised. Furthermore, in GNAT, specification of
+other appropriately addressable component sizes (e.g. 16 for 8-bit
+characters) also preserves independence. GNAT now gives very clear warnings
+both for the declaration of such a type, and for any assignment to its components.
 
-RM References:  A.10.05 (37)   A.10.07 (8/1)   A.10.07 (10)   A.10.07 (12)   A.10.08 (10)   A.10.08 (24)
+RM References:  9.10 (1/3)   C.06 (22/2)   C.06 (23/2)
 @end itemize
 
-@geindex AI-0044 (Ada 2012 feature)
+@geindex AI-0203 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0044 Restrictions on container instantiations (0000-00-00)'
+`AI-0203 Extended return cannot be abstract (0000-00-00)'
 
-This AI places restrictions on allowed instantiations of generic containers.
-These restrictions are not checked by the compiler, so there is nothing to
-change in the implementation. This affects only the RM documentation.
+A return_subtype_indication cannot denote an abstract subtype. GNAT has never
+permitted such usage.
 
-RM References:  A.18 (4/2)   A.18.02 (231/2)   A.18.03 (145/2)   A.18.06 (56/2)   A.18.08 (66/2)   A.18.09 (79/2)   A.18.26 (5/2)   A.18.26 (9/2)
+RM References:  3.09.03 (8/3)
 @end itemize
 
-@geindex AI-0127 (Ada 2012 feature)
+@geindex AI-0205 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0127 Adding Locale Capabilities (2010-09-29)'
+`AI-0205 Extended return declares visible name (0000-00-00)'
 
-This package provides an interface for identifying the current locale.
+This AI corrects a simple omission in the RM. Return objects have always
+been visible within an extended return statement.
 
-RM References:  A.19    A.19.01    A.19.02    A.19.03    A.19.05    A.19.06
-A.19.07    A.19.08    A.19.09    A.19.10    A.19.11    A.19.12    A.19.13
+RM References:  8.03 (17)
 @end itemize
 
-@geindex AI-0002 (Ada 2012 feature)
+@geindex AI-0206 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0002 Export C with unconstrained arrays (0000-00-00)'
+`AI-0206 Remote types packages and preelaborate (2010-07-24)'
 
-The compiler is not required to support exporting an Ada subprogram with
-convention C if there are parameters or a return type of an unconstrained
-array type (such as @code{String}). GNAT allows such declarations but
-generates warnings. It is possible, but complicated, to write the
-corresponding C code and certainly such code would be specific to GNAT and
-non-portable.
+Remote types packages are now allowed to depend on preelaborated packages.
+This was formerly considered illegal.
 
-RM References:  B.01 (17)   B.03 (62)   B.03 (71.1/2)
+RM References:  E.02.02 (6)
 @end itemize
 
-@geindex AI-0216 (Ada 2012 feature)
+@geindex AI-0207 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0216 No_Task_Hierarchy forbids local tasks (0000-00-00)'
+`AI-0207 Mode conformance and access constant (0000-00-00)'
 
-It is clearly the intention that @code{No_Task_Hierarchy} is intended to
-forbid tasks declared locally within subprograms, or functions returning task
-objects, and that is the implementation that GNAT has always provided.
-However the language in the RM was not sufficiently clear on this point.
-Thus this is a documentation change in the RM only.
+This AI confirms that access_to_constant indication must match for mode
+conformance. This was implemented in GNAT when the qualifier was originally
+introduced in Ada 2005.
 
-RM References:  D.07 (3/3)
+RM References:  6.03.01 (16/2)
 @end itemize
 
-@geindex AI-0211 (Ada 2012 feature)
+@geindex AI-0208 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0211 No_Relative_Delays forbids Set_Handler use (2010-07-09)'
+`AI-0208 Characteristics of incomplete views (0000-00-00)'
 
-The restriction @code{No_Relative_Delays} forbids any calls to the subprogram
-@code{Ada.Real_Time.Timing_Events.Set_Handler}.
+The wording in the Ada 2005 RM concerning characteristics of incomplete views
+was incorrect and implied that some programs intended to be legal were now
+illegal. GNAT had never considered such programs illegal, so it has always
+implemented the intent of this AI.
 
-RM References:  D.07 (5)   D.07 (10/2)   D.07 (10.4/2)   D.07 (10.7/2)
+RM References:  3.10.01 (2.4/2)   3.10.01 (2.6/2)
 @end itemize
 
-@geindex AI-0190 (Ada 2012 feature)
+@geindex AI-0210 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0190 pragma Default_Storage_Pool (2010-09-15)'
+`AI-0210 Correct Timing_Events metric (0000-00-00)'
 
-This AI introduces a new pragma @code{Default_Storage_Pool}, which can be
-used to control storage pools globally.
-In particular, you can force every access
-type that is used for allocation (`new') to have an explicit storage pool,
-or you can declare a pool globally to be used for all access types that lack
-an explicit one.
+This is a documentation only issue regarding wording of metric requirements,
+that does not affect the implementation of the compiler.
 
-RM References:  D.07 (8)
+RM References:  D.15 (24/2)
 @end itemize
 
-@geindex AI-0189 (Ada 2012 feature)
+@geindex AI-0211 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0189 No_Allocators_After_Elaboration (2010-01-23)'
+`AI-0211 No_Relative_Delays forbids Set_Handler use (2010-07-09)'
 
-This AI introduces a new restriction @code{No_Allocators_After_Elaboration},
-which says that no dynamic allocation will occur once elaboration is
-completed.
-In general this requires a run-time check, which is not required, and which
-GNAT does not attempt. But the static cases of allocators in a task body or
-in the body of the main program are detected and flagged at compile or bind
-time.
+The restriction @code{No_Relative_Delays} forbids any calls to the subprogram
+@code{Ada.Real_Time.Timing_Events.Set_Handler}.
 
-RM References:  D.07 (19.1/2)   H.04 (23.3/2)
+RM References:  D.07 (5)   D.07 (10/2)   D.07 (10.4/2)   D.07 (10.7/2)
 @end itemize
 
-@geindex AI-0171 (Ada 2012 feature)
+@geindex AI-0214 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0171 Pragma CPU and Ravenscar Profile (2010-09-24)'
+`AI-0214 Defaulted discriminants for limited tagged (2010-10-01)'
 
-A new package @code{System.Multiprocessors} is added, together with the
-definition of pragma @code{CPU} for controlling task affinity. A new no
-dependence restriction, on @code{System.Multiprocessors.Dispatching_Domains},
-is added to the Ravenscar profile.
+Ada 2012 relaxes the restriction that forbids discriminants of tagged types
+to have default expressions by allowing them when the type is limited. It
+is often useful to define a default value for a discriminant even though
+it can’t be changed by assignment.
 
-RM References:  D.13.01 (4/2)   D.16
+RM References:  3.07 (9.1/2)   3.07.02 (3)
 @end itemize
 
-@geindex AI-0210 (Ada 2012 feature)
+@geindex AI-0216 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0210 Correct Timing_Events metric (0000-00-00)'
+`AI-0216 No_Task_Hierarchy forbids local tasks (0000-00-00)'
 
-This is a documentation only issue regarding wording of metric requirements,
-that does not affect the implementation of the compiler.
+It is clearly the intention that @code{No_Task_Hierarchy} is intended to
+forbid tasks declared locally within subprograms, or functions returning task
+objects, and that is the implementation that GNAT has always provided.
+However the language in the RM was not sufficiently clear on this point.
+Thus this is a documentation change in the RM only.
 
-RM References:  D.15 (24/2)
+RM References:  D.07 (3/3)
 @end itemize
 
-@geindex AI-0206 (Ada 2012 feature)
+@geindex AI-0219 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0206 Remote types packages and preelaborate (2010-07-24)'
+`AI-0219 Pure permissions and limited parameters (2010-05-25)'
 
-Remote types packages are now allowed to depend on preelaborated packages.
-This was formerly considered illegal.
+This AI refines the rules for the cases with limited parameters which do not
+allow the implementations to omit ‘redundant’. GNAT now properly conforms
+to the requirements of this binding interpretation.
 
-RM References:  E.02.02 (6)
+RM References:  10.02.01 (18/2)
 @end itemize
 
-@geindex AI-0152 (Ada 2012 feature)
+@geindex AI-0220 (Ada 2012 feature)
 
 
 @itemize *
 
 @item 
-`AI-0152 Restriction No_Anonymous_Allocators (2010-09-08)'
+`AI-0220 Needed components for aggregates (0000-00-00)'
 
-Restriction @code{No_Anonymous_Allocators} prevents the use of allocators
-where the type of the returned value is an anonymous access type.
+This AI addresses a wording problem in the RM that appears to permit some
+complex cases of aggregates with nonstatic discriminants. GNAT has always
+implemented the intended semantics.
 
-RM References:  H.04 (8/1)
+RM References:  4.03.01 (17)
 @end itemize
 
 @node GNAT language extensions,Security Hardening Features,Implementation of Ada 2012 Features,Top
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 09/31] ada: Fix formatting in list of implemented Ada 2012 features
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (6 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 08/31] ada: Sort list of implemented Ada 2012 features Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 10/31] ada: Remove some explicit yields in tasking run-time Marc Poulhiès
                   ` (21 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

From: Piotr Trojanek <trojanek@adacore.com>

Fix formatting; meaning is unaffected.

gcc/ada/

	* doc/gnat_rm/implementation_of_ada_2012_features.rst:
	Fix formatting.
	* gnat_rm.texi: Regenerate.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst | 6 +++---
 gcc/ada/gnat_rm.texi                                        | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst b/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst
index 706de492301..9708e15de8d 100644
--- a/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst
@@ -255,7 +255,7 @@ http://www.ada-auth.org/ai05-summary.html.
 
 * *AI-0039 Stream attributes cannot be dynamic (0000-00-00)*
 
-  The RM permitted the use of dynamic expressions (such as ``ptr.all``)`
+  The RM permitted the use of dynamic expressions (such as ``ptr.all``)
   for stream attributes, but these were never useful and are now illegal. GNAT
   has always regarded such expressions as illegal.
 
@@ -555,7 +555,7 @@ http://www.ada-auth.org/ai05-summary.html.
   This AI clarifies that 'needs finalization' is part of dynamic semantics,
   and therefore depends on the run-time characteristics of an object (i.e. its
   tag) and not on its nominal type. As the AI indicates: "we do not expect
-  this to affect any implementation''.
+  this to affect any implementation".
 
   RM References:  7.06.01 (6)   7.06.01 (7)   7.06.01 (8)   7.06.01 (9/2)
 
@@ -812,7 +812,7 @@ http://www.ada-auth.org/ai05-summary.html.
 
   The new syntax for iterating over arrays and containers is now implemented.
   Iteration over containers is for now limited to read-only iterators. Only
-  default iterators are supported, with the syntax:  ``for Elem of C``.
+  default iterators are supported, with the syntax: ``for Elem of C``.
 
   RM References:  5.05
 
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index df6969f98b7..776dd4a4afc 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -26913,7 +26913,7 @@ RM References:  A.10.05 (37)   A.10.07 (8/1)   A.10.07 (10)   A.10.07 (12)   A.1
 @item 
 `AI-0039 Stream attributes cannot be dynamic (0000-00-00)'
 
-The RM permitted the use of dynamic expressions (such as @code{ptr.all})`
+The RM permitted the use of dynamic expressions (such as @code{ptr.all})
 for stream attributes, but these were never useful and are now illegal. GNAT
 has always regarded such expressions as illegal.
 
@@ -27358,7 +27358,7 @@ RM References:  3.10.01 (6)   3.10.01 (9.2/2)
 This AI clarifies that ‘needs finalization’ is part of dynamic semantics,
 and therefore depends on the run-time characteristics of an object (i.e. its
 tag) and not on its nominal type. As the AI indicates: “we do not expect
-this to affect any implementation’’.
+this to affect any implementation”.
 
 RM References:  7.06.01 (6)   7.06.01 (7)   7.06.01 (8)   7.06.01 (9/2)
 @end itemize
@@ -27730,7 +27730,7 @@ RM References:  A.04.11
 
 The new syntax for iterating over arrays and containers is now implemented.
 Iteration over containers is for now limited to read-only iterators. Only
-default iterators are supported, with the syntax:  @code{for Elem of C}.
+default iterators are supported, with the syntax: @code{for Elem of C}.
 
 RM References:  5.05
 @end itemize
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 10/31] ada: Remove some explicit yields in tasking run-time
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (7 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 09/31] ada: Fix formatting in " Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 11/31] ada: Simplify management of scopes while inlining Marc Poulhiès
                   ` (20 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Ronan Desplanques

From: Ronan Desplanques <desplanques@adacore.com>

This patch removes three occurrences where tasking run-time
subprograms yielded control shortly before conditional calls to Sleep,
in order to avoid these calls more often. It was intended as an
optimization on systems where calls to Sleep are costly and in
particular VMS.

A problem was that two of the yields contained data races that were
reported by thread sanitizing tools on some platforms, and that's the
motivation for removing them.

gcc/ada/

	* libgnarl/s-taenca.adb (Wait_For_Completion): Remove call to
	Yield.
	* libgnarl/s-tasren.adb (Timed_Selective_Wait, Wait_For_Call):
	Remove calls to Yield.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/libgnarl/s-taenca.adb | 12 ------------
 gcc/ada/libgnarl/s-tasren.adb | 24 ------------------------
 2 files changed, 36 deletions(-)

diff --git a/gcc/ada/libgnarl/s-taenca.adb b/gcc/ada/libgnarl/s-taenca.adb
index cd9c53b19fe..1dc8ec518bd 100644
--- a/gcc/ada/libgnarl/s-taenca.adb
+++ b/gcc/ada/libgnarl/s-taenca.adb
@@ -410,18 +410,6 @@ package body System.Tasking.Entry_Calls is
 
       Self_Id.Common.State := Entry_Caller_Sleep;
 
-      --  Try to remove calls to Sleep in the loop below by letting the caller
-      --  a chance of getting ready immediately, using Unlock & Yield.
-      --  See similar action in Wait_For_Call & Timed_Selective_Wait.
-
-      STPO.Unlock (Self_Id);
-
-      if Entry_Call.State < Done then
-         STPO.Yield;
-      end if;
-
-      STPO.Write_Lock (Self_Id);
-
       loop
          Check_Pending_Actions_For_Entry_Call (Self_Id, Entry_Call);
 
diff --git a/gcc/ada/libgnarl/s-tasren.adb b/gcc/ada/libgnarl/s-tasren.adb
index d65b9f011b0..6face7ef8d4 100644
--- a/gcc/ada/libgnarl/s-tasren.adb
+++ b/gcc/ada/libgnarl/s-tasren.adb
@@ -1317,18 +1317,6 @@ package body System.Tasking.Rendezvous is
 
             Self_Id.Common.State := Acceptor_Delay_Sleep;
 
-            --  Try to remove calls to Sleep in the loop below by letting the
-            --  caller a chance of getting ready immediately, using Unlock
-            --  Yield. See similar action in Wait_For_Completion/Wait_For_Call.
-
-            Unlock (Self_Id);
-
-            if Self_Id.Open_Accepts /= null then
-               Yield;
-            end if;
-
-            Write_Lock (Self_Id);
-
             --  Check if this task has been aborted while the lock was released
 
             if Self_Id.Pending_ATC_Level < Self_Id.ATC_Nesting_Level then
@@ -1510,18 +1498,6 @@ package body System.Tasking.Rendezvous is
    begin
       Self_Id.Common.State := Acceptor_Sleep;
 
-      --  Try to remove calls to Sleep in the loop below by letting the caller
-      --  a chance of getting ready immediately, using Unlock & Yield.
-      --  See similar action in Wait_For_Completion & Timed_Selective_Wait.
-
-      Unlock (Self_Id);
-
-      if Self_Id.Open_Accepts /= null then
-         Yield;
-      end if;
-
-      Write_Lock (Self_Id);
-
       --  Check if this task has been aborted while the lock was released
 
       if Self_Id.Pending_ATC_Level < Self_Id.ATC_Nesting_Level then
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 11/31] ada: Simplify management of scopes while inlining
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (8 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 10/31] ada: Remove some explicit yields in tasking run-time Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 12/31] ada: Add elaboration switch tags to info messages Marc Poulhiès
                   ` (19 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

From: Piotr Trojanek <trojanek@adacore.com>

Code cleanup; semantics is unaffected.

gcc/ada/

	* inline.adb (Add_Scope_To_Clean): Use Append_Unique_Elmt.
	(Analyze_Inlined_Bodies): Refine type of a local counter;
	remove extra whitespace.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/inline.adb | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index a628a59e145..17b3099e6a6 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -845,19 +845,8 @@ package body Inline is
    ------------------------
 
    procedure Add_Scope_To_Clean (Scop : Entity_Id) is
-      Elmt : Elmt_Id;
-
    begin
-      Elmt := First_Elmt (To_Clean);
-      while Present (Elmt) loop
-         if Node (Elmt) = Scop then
-            return;
-         end if;
-
-         Next_Elmt (Elmt);
-      end loop;
-
-      Append_Elmt (Scop, To_Clean);
+      Append_Unique_Elmt (Scop, To_Clean);
    end Add_Scope_To_Clean;
 
    --------------
@@ -915,7 +904,7 @@ package body Inline is
 
    procedure Analyze_Inlined_Bodies is
       Comp_Unit : Node_Id;
-      J         : Int;
+      J         : Nat;
       Pack      : Entity_Id;
       Subp      : Subp_Index;
       S         : Succ_Index;
@@ -2569,8 +2558,8 @@ package body Inline is
            (Proc_Id   : out Entity_Id;
             Decl_List : out List_Id)
          is
-            Formals   : constant List_Id   := New_List;
-            Subp_Name : constant Name_Id   := New_Internal_Name ('F');
+            Formals   : constant List_Id := New_List;
+            Subp_Name : constant Name_Id := New_Internal_Name ('F');
 
             Body_Decls : List_Id := No_List;
             Decl       : Node_Id;
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 12/31] ada: Add elaboration switch tags to info messages
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (9 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 11/31] ada: Simplify management of scopes while inlining Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 13/31] ada: Remove useless trampolines caused by Unchecked_Conversion Marc Poulhiès
                   ` (18 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Viljar Indus

From: Viljar Indus <indus@adacore.com>

Add the ?$? insertion characters for elaboration
message so they would be marked with the [-gnatel]
tag. Note that these insertion characters were
not added for SPARK elaboration messages:

gcc/ada/

	* sem_elab.adb: Add missing elaboration insertion
	characters to info messages.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sem_elab.adb | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb
index 9205f4cef82..4d6e14cc49c 100644
--- a/gcc/ada/sem_elab.adb
+++ b/gcc/ada/sem_elab.adb
@@ -4920,7 +4920,7 @@ package body Sem_Elab is
            and then not New_In_State.Suppress_Info_Messages
          then
             Error_Msg_NE
-              ("info: access to & during elaboration", Attr, Subp_Id);
+              ("info: access to & during elaboration?$?", Attr, Subp_Id);
          end if;
 
          --  Warnings are suppressed when a prior scenario is already in that
@@ -5027,7 +5027,7 @@ package body Sem_Elab is
            and then not New_In_State.Suppress_Info_Messages
          then
             Error_Msg_NE
-              ("info: activation of & during elaboration", Call, Obj_Id);
+              ("info: activation of & during elaboration?$?", Call, Obj_Id);
          end if;
 
          --  Nothing to do when the call activates a task whose type is defined
@@ -6461,7 +6461,7 @@ package body Sem_Elab is
             if In_SPARK then
                return " in SPARK";
             else
-               return "";
+               return "?$?";
             end if;
          end Suffix;
 
@@ -8277,7 +8277,9 @@ package body Sem_Elab is
                Error_Msg_Name_1     := Prag_Nam;
                Error_Msg_Qual_Level := Nat'Last;
 
-               Error_Msg_NE ("info: missing pragma % for unit &", N, Unit_Id);
+               Error_Msg_NE
+                 ("info: missing pragma % for unit &?$?", N,
+                  Unit_Id);
                Error_Msg_Qual_Level := 0;
             end if;
          end Info_Missing_Pragma;
@@ -8406,7 +8408,8 @@ package body Sem_Elab is
                Error_Msg_Qual_Level := Nat'Last;
 
                Error_Msg_NE
-                 ("info: implicit pragma % generated for unit &", N, Unit_Id);
+                 ("info: implicit pragma % generated for unit &?$?",
+                   N, Unit_Id);
 
                Error_Msg_Qual_Level := 0;
                Output_Active_Scenarios (N, In_State);
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 13/31] ada: Remove useless trampolines caused by Unchecked_Conversion
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (10 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 12/31] ada: Add elaboration switch tags to info messages Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 14/31] ada: Remove duplicate statement Marc Poulhiès
                   ` (17 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

The partial solution implemented in Validate_Unchecked_Conversion to support
unchecked conversions between addresses and pointers to subprograms, for the
platforms where pointers to subprograms do not all have the same size, turns
out to be counter-productive for others because it may cause the creation of
useless trampolines, which in turn makes the stack executable.

gcc/ada/

	* sem_ch13.adb (Validate_Unchecked_Conversion): Restrict forcing the
	Can_Use_Internal_Rep flag to platforms that require unnesting.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sem_ch13.adb | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 59c80022c20..4cf6fc9a645 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -18132,20 +18132,23 @@ package body Sem_Ch13 is
          Set_No_Strict_Aliasing (Implementation_Base_Type (Target));
       end if;
 
-      --  If the unchecked conversion is between Address and an access
-      --  subprogram type, show that we shouldn't use an internal
-      --  representation for the access subprogram type.
+      --  For code generators that do not support nested subprograms, if the
+      --  unchecked conversion is between Address and an access subprogram
+      --  type, show that we shouldn't use an internal representation for the
+      --  access subprogram type.
 
-      if Is_Access_Subprogram_Type (Target)
-        and then Is_Descendant_Of_Address (Source)
-        and then In_Same_Source_Unit (Target, N)
-      then
-         Set_Can_Use_Internal_Rep (Base_Type (Target), False);
-      elsif Is_Access_Subprogram_Type (Source)
-        and then Is_Descendant_Of_Address (Target)
-        and then In_Same_Source_Unit (Source, N)
-      then
-         Set_Can_Use_Internal_Rep (Base_Type (Source), False);
+      if Unnest_Subprogram_Mode then
+         if Is_Access_Subprogram_Type (Target)
+           and then Is_Descendant_Of_Address (Source)
+           and then In_Same_Source_Unit (Target, N)
+         then
+            Set_Can_Use_Internal_Rep (Base_Type (Target), False);
+         elsif Is_Access_Subprogram_Type (Source)
+           and then Is_Descendant_Of_Address (Target)
+           and then In_Same_Source_Unit (Source, N)
+         then
+            Set_Can_Use_Internal_Rep (Base_Type (Source), False);
+         end if;
       end if;
 
       --  Generate N_Validate_Unchecked_Conversion node for back end in case
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 14/31] ada: Remove duplicate statement
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (11 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 13/31] ada: Remove useless trampolines caused by Unchecked_Conversion Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 15/31] ada: Fix layout in a list of aspects Marc Poulhiès
                   ` (16 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Ronan Desplanques

From: Ronan Desplanques <desplanques@adacore.com>

This patch removes a duplicate statement that was useless and could
be misleading to the reader by suggesting that there are multiple
global variables named Style_Check, while there is just one.

gcc/ada/

	* frontend.adb (Frontend): Remove duplicate statement.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/frontend.adb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb
index bd0f0c44ff4..ece0e728e4a 100644
--- a/gcc/ada/frontend.adb
+++ b/gcc/ada/frontend.adb
@@ -158,7 +158,6 @@ begin
       --  intended -gnatg or -gnaty compilations. We also disconnect checking
       --  for maximum line length.
 
-      Opt.Style_Check := False;
       Style_Check := False;
 
       --  Capture current suppress options, which may get modified
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 15/31] ada: Fix layout in a list of aspects
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (12 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 14/31] ada: Remove duplicate statement Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 16/31] ada: Missing constraint check for initial value of object with address clause Marc Poulhiès
                   ` (15 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

From: Piotr Trojanek <trojanek@adacore.com>

Code cleanup; semantics is unaffected.

gcc/ada/

	* aspects.ads (Nonoverridable_Aspect_Id): Fix layout.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/aspects.ads | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/gcc/ada/aspects.ads b/gcc/ada/aspects.ads
index ce393d4f602..3cc62de3411 100644
--- a/gcc/ada/aspects.ads
+++ b/gcc/ada/aspects.ads
@@ -237,14 +237,17 @@ package Aspects is
    --  Aspect_Id's excluding No_Aspect
 
    subtype Nonoverridable_Aspect_Id is Aspect_Id with
-     Static_Predicate => Nonoverridable_Aspect_Id in
-       Aspect_Default_Iterator | Aspect_Iterator_Element |
-       Aspect_Implicit_Dereference | Aspect_Constant_Indexing |
-       Aspect_Variable_Indexing | Aspect_Aggregate |
-       Aspect_Max_Entry_Queue_Length
-        | Aspect_No_Controlled_Parts
-       --  ??? No_Controlled_Parts not yet in Aspect_Id enumeration
-       ;  --  see RM 13.1.1(18.7)
+     Static_Predicate =>
+       Nonoverridable_Aspect_Id in Aspect_Aggregate
+                                 | Aspect_Constant_Indexing
+                                 | Aspect_Default_Iterator
+                                 | Aspect_Implicit_Dereference
+                                 | Aspect_Iterator_Element
+                                 | Aspect_Max_Entry_Queue_Length
+                                 | Aspect_No_Controlled_Parts
+                                 | Aspect_Variable_Indexing;
+   --  ??? No_Controlled_Parts not yet in Aspect_Id enumeration see RM
+   --  13.1.1(18.7).
 
    --  The following array indicates aspects that accept 'Class
 
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 16/31] ada: Missing constraint check for initial value of object with address clause
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (13 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 15/31] ada: Fix layout in a list of aspects Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 17/31] ada: Fix oversight in previous change Marc Poulhiès
                   ` (14 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Steve Baird

From: Steve Baird <baird@adacore.com>

In some cases where an object is declared with an initial value that is
an aggregate and also with a specified Address (either via an
aspect_specification or via an attribute_definition_clause), the
check that the initial value satisfies the constraints of the object's
subtype was incorrectly omitted.

gcc/ada/

	* exp_util.adb (Remove_Side_Effects): Make_Reference assumes that
	the referenced object satisfies the constraints of the designated
	subtype of the access type. Ensure that this assumption holds by
	introducing a qualified expression if needed (and then ensuring
	that checking associated with evaluation of the qualified
	expression is not suppressed).

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/exp_util.adb | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index b71f7739481..654ea7d9124 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -12772,6 +12772,35 @@ package body Exp_Util is
             --  since we know it cannot be null and we don't want a check.
 
             else
+               --  Make_Reference assumes that the referenced
+               --  object satisfies the constraints of the designated
+               --  subtype of the access type. Ensure that this assumption
+               --  holds by introducing a qualified expression if needed.
+
+               if not Analyzed (Exp)
+                 and then Nkind (Exp) = N_Aggregate
+                 and then (Is_Array_Type (Exp_Type)
+                           or else Has_Discriminants (Exp_Type))
+                 and then Is_Constrained (Exp_Type)
+               then
+                  --  Do not suppress checks associated with the qualified
+                  --  expression we are about to introduce (unless those
+                  --  checks were already suppressed when Remove_Side_Effects
+                  --  was called).
+
+                  if Is_Array_Type (Exp_Type) then
+                     Scope_Suppress.Suppress (Length_Check)
+                       := Svg_Suppress.Suppress (Length_Check);
+                  else
+                     Scope_Suppress.Suppress (Discriminant_Check)
+                       := Svg_Suppress.Suppress (Discriminant_Check);
+                  end if;
+
+                  E := Make_Qualified_Expression (Loc,
+                         Subtype_Mark => New_Occurrence_Of (Exp_Type, Loc),
+                         Expression => E);
+               end if;
+
                New_Exp := Make_Reference (Loc, E);
                Set_Is_Known_Non_Null (Def_Id);
             end if;
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 17/31] ada: Fix oversight in previous change
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (14 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 16/31] ada: Missing constraint check for initial value of object with address clause Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 18/31] ada: Fix small inaccuracy for Size attribute applied to objects Marc Poulhiès
                   ` (13 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

In rare cases, types using structural equality may reach relate_alias_sets.

gcc/ada/

	* gcc-interface/utils.cc (relate_alias_sets): Restore previous code
	when the type uses structural equality.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/utils.cc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/gcc-interface/utils.cc b/gcc/ada/gcc-interface/utils.cc
index b628481335d..ae520542ace 100644
--- a/gcc/ada/gcc-interface/utils.cc
+++ b/gcc/ada/gcc-interface/utils.cc
@@ -1867,8 +1867,11 @@ relate_alias_sets (tree new_type, tree old_type, enum alias_set_op op)
 		      && TYPE_NONALIASED_COMPONENT (new_type)
 			 != TYPE_NONALIASED_COMPONENT (old_type)));
 
-      /* The alias set always lives on the TYPE_CANONICAL.  */
-      TYPE_ALIAS_SET (TYPE_CANONICAL (new_type)) = get_alias_set (old_type);
+      /* The alias set is a property of the TYPE_CANONICAL if it exists.  */
+      if (TYPE_STRUCTURAL_EQUALITY_P (new_type))
+	TYPE_ALIAS_SET (new_type) = get_alias_set (old_type);
+      else
+	TYPE_ALIAS_SET (TYPE_CANONICAL (new_type)) = get_alias_set (old_type);
       break;
 
     case ALIAS_SET_SUBSET:
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 18/31] ada: Fix small inaccuracy for Size attribute applied to objects
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (15 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 17/31] ada: Fix oversight in previous change Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 19/31] ada: Fix crash on aliased constant with packed array type and -g switch Marc Poulhiès
                   ` (12 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

This reverts a change made some time ago in lvalue_required_for_attribute_p
whereby the Size attribute applied to objects would no longer be considered
as requiring an lvalue.

While not wrong in principle, this turns out to be problematic because the
implementation in Attribute_to_gnu needs to look at the translated prefix
to spot particular cases and not only at the actual type of its value.

This of course requires a small adjustment in gnat_to_gnu to compensate.

gcc/ada/

	* gcc-interface/trans.cc (access_attribute_p): New predicate.
	(lvalue_required_for_attribute_p): Return again 1 for Size and add
	the missing terminating call to gcc_unreachable.
	(gnat_to_gnu): Return the result unmodified for a reference to an
	unconstrained array only if it is the prefix of an access attribute.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/trans.cc | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index 8c7ffbf5687..6f761766559 100644
--- a/gcc/ada/gcc-interface/trans.cc
+++ b/gcc/ada/gcc-interface/trans.cc
@@ -745,6 +745,26 @@ build_raise_check (int check, enum exception_info_kind kind)
   return result;
 }
 
+/* Return true if GNAT_NODE, which is an N_Attribute_Reference, is one of the
+   access attributes.  */
+
+static bool
+access_attribute_p (Node_Id gnat_node)
+{
+  switch (Get_Attribute_Id (Attribute_Name (gnat_node)))
+    {
+    case Attr_Access:
+    case Attr_Unchecked_Access:
+    case Attr_Unrestricted_Access:
+      return true;
+
+    default:
+      return false;
+    }
+
+  gcc_unreachable ();
+}
+
 /* Return a positive value if an lvalue is required for GNAT_NODE, which is
    an N_Attribute_Reference.  */
 
@@ -760,7 +780,6 @@ lvalue_required_for_attribute_p (Node_Id gnat_node)
     case Attr_Range_Length:
     case Attr_Length:
     case Attr_Object_Size:
-    case Attr_Size:
     case Attr_Value_Size:
     case Attr_Component_Size:
     case Attr_Descriptor_Size:
@@ -786,11 +805,14 @@ lvalue_required_for_attribute_p (Node_Id gnat_node)
     case Attr_First_Bit:
     case Attr_Last_Bit:
     case Attr_Bit:
+    case Attr_Size:
     case Attr_Asm_Input:
     case Attr_Asm_Output:
     default:
       return 1;
     }
+
+  gcc_unreachable ();
 }
 
 /* Return a positive value if an lvalue is required for GNAT_NODE.  GNU_TYPE
@@ -8472,7 +8494,7 @@ gnat_to_gnu (Node_Id gnat_node)
 	  return slot optimization in this case.
 
        5. If this is a reference to an unconstrained array which is used either
-	  as the prefix of an attribute reference that requires an lvalue or in
+	  as the prefix of an attribute reference for an access attribute or in
 	  a return statement without storage pool, return the result unmodified
 	  because we want to return the original bounds.
 
@@ -8539,7 +8561,7 @@ gnat_to_gnu (Node_Id gnat_node)
   else if (TREE_CODE (TREE_TYPE (gnu_result)) == UNCONSTRAINED_ARRAY_TYPE
 	   && Present (Parent (gnat_node))
 	   && ((Nkind (Parent (gnat_node)) == N_Attribute_Reference
-	        && lvalue_required_for_attribute_p (Parent (gnat_node)))
+	        && access_attribute_p (Parent (gnat_node)))
 	       || (Nkind (Parent (gnat_node)) == N_Simple_Return_Statement
 		   && No (Storage_Pool (Parent (gnat_node))))))
     ;
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 19/31] ada: Fix crash on aliased constant with packed array type and -g switch
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (16 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 18/31] ada: Fix small inaccuracy for Size attribute applied to objects Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 20/31] ada: Fix assembler error for gigantic library-level object on 64-bit Windows Marc Poulhiès
                   ` (11 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

The problem is that we build a template whose array field is not an array
in the case of an aliased object with nominal unconstrained array subtype.

gcc/ada/

	* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Variable>: For an
	array allocated with its bounds, make sure to have an array type
	to build the template.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/decl.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index ca174bff009..41d5c29a17c 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -939,6 +939,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 	    && !type_annotate_only)
 	  {
 	    tree gnu_array = gnat_to_gnu_type (Base_Type (gnat_type));
+	    /* Make sure to have an array type for the template.  */
+	    if (TYPE_IS_PADDING_P (gnu_type))
+	      gnu_type = TREE_TYPE (TYPE_FIELDS (gnu_type));
 	    gnu_type
 	      = build_unc_object_type_from_ptr (TREE_TYPE (gnu_array),
 						gnu_type,
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 20/31] ada: Fix assembler error for gigantic library-level object on 64-bit Windows
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (17 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 19/31] ada: Fix crash on aliased constant with packed array type and -g switch Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 21/31] ada: Remove unused dependencies from gnatbind object list Marc Poulhiès
                   ` (10 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

Most small 64-bit code models have a limit of 2 GB on the span of binaries,
so we also use the limit for the size of the largest statically allocatable
object by the compiler.  If the limit is topped, the compiler switches over
to a dynamic allocation (if not forbidden) after giving a warning.

gcc/ada/

	* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Variable>: Give a
	warning for a statically allocated object whose size is constant,
	valid but too large.
	(allocatable_size_p): In the static case, return false for a size
	that is constant, valid but too large.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/decl.cc | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index 41d5c29a17c..e16ee6edac5 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -1415,10 +1415,22 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 			     false);
 		  }
 
-		if (TREE_CODE (TYPE_SIZE_UNIT (gnu_alloc_type)) == INTEGER_CST
-		    && !valid_constant_size_p (TYPE_SIZE_UNIT (gnu_alloc_type)))
-		  post_error ("??Storage_Error will be raised at run time!",
-			      gnat_entity);
+		/* Give a warning if the size is constant but too large.  */
+		if (TREE_CODE (TYPE_SIZE_UNIT (gnu_alloc_type)) == INTEGER_CST)
+		  {
+		    if (valid_constant_size_p (TYPE_SIZE_UNIT (gnu_alloc_type)))
+		      {
+			post_error
+			  ("??too large object cannot be allocated statically",
+			   gnat_entity);
+			post_error ("\\?dynamic allocation will be used instead",
+				    gnat_entity);
+		      }
+
+		    else
+		      post_error ("??Storage_Error will be raised at run time!",
+				  gnat_entity);
+		  }
 
 		gnu_expr
 		  = build_allocator (gnu_alloc_type, gnu_expr, gnu_type,
@@ -6822,9 +6834,12 @@ constructor_address_p (tree gnu_expr)
 static bool
 allocatable_size_p (tree gnu_size, bool static_p)
 {
-  /* We can allocate a fixed size if it is a valid for the middle-end.  */
+  /* We can allocate a fixed size if it is a valid for the middle-end but, for
+     a static allocation, we do not allocate more than 2 GB because this would
+     very likely be unintended and problematic for usual code models.  */
   if (TREE_CODE (gnu_size) == INTEGER_CST)
-    return valid_constant_size_p (gnu_size);
+    return valid_constant_size_p (gnu_size)
+	   && (!static_p || tree_to_uhwi (gnu_size) <= INT_MAX);
 
   /* We can allocate a variable size if this isn't a static allocation.  */
   else
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 21/31] ada: Remove unused dependencies from gnatbind object list
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (18 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 20/31] ada: Fix assembler error for gigantic library-level object on 64-bit Windows Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 22/31] ada: Avoid temporary for conditional expression of discriminated record type Marc Poulhiès
                   ` (9 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

From: Piotr Trojanek <trojanek@adacore.com>

The gnatbind executable does not depend on aspects, SCIL, style checks,
etc. Also, these dependencies are not needed to actually build the
executable. Cleanup.

gcc/ada/

	* gcc-interface/Make-lang.in (GNATBIND_OBJS): Remove unused
	dependencies.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/Make-lang.in | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index f6404c0b1eb..4f1b310fb84 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -572,7 +572,6 @@ GNATBIND_OBJS = \
  ada/ali-util.o   \
  ada/ali.o        \
  ada/alloc.o      \
- ada/aspects.o    \
  ada/atree.o      \
  ada/bcheck.o     \
  ada/binde.o      \
@@ -602,12 +601,10 @@ GNATBIND_OBJS = \
  ada/exit.o       \
  ada/final.o      \
  ada/fmap.o       \
- ada/fname-uf.o   \
  ada/fname.o      \
  ada/gnatbind.o   \
  ada/gnatvsn.o    \
  ada/hostparm.o   \
- ada/krunch.o     \
  ada/lib.o        \
  ada/link.o       \
  ada/namet.o      \
@@ -618,7 +615,6 @@ GNATBIND_OBJS = \
  ada/output.o     \
  ada/rident.o     \
  ada/scans.o      \
- ada/scil_ll.o    \
  ada/scng.o       \
  ada/sdefault.o   \
  ada/seinfo.o	  \
@@ -631,7 +627,6 @@ GNATBIND_OBJS = \
  ada/snames.o     \
  ada/stand.o      \
  ada/stringt.o    \
- ada/style.o      \
  ada/styleg.o     \
  ada/stylesw.o    \
  ada/switch-b.o   \
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 22/31] ada: Avoid temporary for conditional expression of discriminated record type
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (19 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 21/31] ada: Remove unused dependencies from gnatbind object list Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 23/31] ada: Follow-up adjustment to earlier fix in Build_Allocate_Deallocate_Proc Marc Poulhiès
                   ` (8 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

This just aligns the definite case (discriminants with default) with the
indefinite case (discriminants without default), the latter case having
been properly handled for long.  In the former case, the maximum size is
used so a temporary can be much larger than the actual data it contains.

gcc/ada/

	* gcc-interface/utils2.cc (build_cond_expr): Use the indirect path
	for all types containing a placeholder.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/utils2.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/gcc-interface/utils2.cc b/gcc/ada/gcc-interface/utils2.cc
index a953b070ed8..fb0ccf59224 100644
--- a/gcc/ada/gcc-interface/utils2.cc
+++ b/gcc/ada/gcc-interface/utils2.cc
@@ -1715,8 +1715,8 @@ build_cond_expr (tree result_type, tree condition_operand,
      then dereference the result.  Likewise if the result type is passed by
      reference, because creating a temporary of this type is not allowed.  */
   if (TREE_CODE (result_type) == UNCONSTRAINED_ARRAY_TYPE
-      || TYPE_IS_BY_REFERENCE_P (result_type)
-      || CONTAINS_PLACEHOLDER_P (TYPE_SIZE (result_type)))
+      || type_contains_placeholder_p (result_type)
+      || TYPE_IS_BY_REFERENCE_P (result_type))
     {
       result_type = build_pointer_type (result_type);
       true_operand = build_unary_op (ADDR_EXPR, result_type, true_operand);
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 23/31] ada: Follow-up adjustment to earlier fix in Build_Allocate_Deallocate_Proc
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (20 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 22/31] ada: Avoid temporary for conditional expression of discriminated record type Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 24/31] ada: Minor typo fix in comment Marc Poulhiès
                   ` (7 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

The deallocation call of the return and secondary stacks no longer matches
the profile built in Exp_Util.Build_Allocate_Deallocate_Proc, so this just
removes the code as unreachable and adds an assertion to that effect.

gcc/ada/

	* gcc-interface/utils2.cc (build_call_alloc_dealloc_proc): Add an
	assertion that this is not a deallocation of the return or secondary
	stack and remove subsequent unreachable code.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/utils2.cc | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/gcc/ada/gcc-interface/utils2.cc b/gcc/ada/gcc-interface/utils2.cc
index fb0ccf59224..64712cb9962 100644
--- a/gcc/ada/gcc-interface/utils2.cc
+++ b/gcc/ada/gcc-interface/utils2.cc
@@ -2187,15 +2187,16 @@ build_call_alloc_dealloc_proc (tree gnu_obj, tree gnu_size, tree gnu_type,
 	= Etype (Next_Formal (First_Formal (gnat_proc)));
       tree gnu_size_type = gnat_to_gnu_type (gnat_size_type);
 
+      /* Deallocation is not supported for return and secondary stacks.  */
+      gcc_assert (!gnu_obj);
+
       gnu_size = convert (gnu_size_type, gnu_size);
       gnu_align = convert (gnu_size_type, gnu_align);
 
       if (DECL_BUILT_IN_CLASS (gnu_proc) == BUILT_IN_FRONTEND
 	  && DECL_FE_FUNCTION_CODE (gnu_proc) == BUILT_IN_RETURN_SLOT)
 	{
-	  /* This must be an allocation of the return stack in a function that
-	     returns by invisible reference.  */
-	  gcc_assert (!gnu_obj);
+	  /* This must be a function that returns by invisible reference.  */
 	  gcc_assert (current_function_decl
 		      && TREE_ADDRESSABLE (TREE_TYPE (current_function_decl)));
 	  tree gnu_ret_size;
@@ -2221,11 +2222,6 @@ build_call_alloc_dealloc_proc (tree gnu_obj, tree gnu_size, tree gnu_type,
 					     N_Raise_Program_Error));
 	}
 
-      /* The first arg is the address of the object, for a deallocator,
-	 then the size.  */
-      else if (gnu_obj)
-	gnu_call = build_call_n_expr (gnu_proc, 2, gnu_obj, gnu_size);
-
       else
 	gnu_call = build_call_n_expr (gnu_proc, 2, gnu_size, gnu_align);
     }
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 24/31] ada: Minor typo fix in comment
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (21 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 23/31] ada: Follow-up adjustment to earlier fix in Build_Allocate_Deallocate_Proc Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 25/31] ada: Fix crash with aliased array and if expression Marc Poulhiès
                   ` (6 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Marc Poulhiès

gcc/ada/

	* gcc-interface/decl.cc: Fix typo in comment.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/decl.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index e16ee6edac5..0987d534e69 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -5629,7 +5629,7 @@ gnat_to_gnu_param (Entity_Id gnat_param, tree gnu_param_type, bool first,
       by_ref = true;
     }
 
-  /* If we were requested or muss pass by reference, do so.
+  /* If we were requested or must pass by reference, do so.
      If we were requested to pass by copy, do so.
      Otherwise, for foreign conventions, pass In Out or Out parameters
      or aggregates by reference.  For COBOL and Fortran, pass all
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 25/31] ada: Fix crash with aliased array and if expression
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (22 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 24/31] ada: Minor typo fix in comment Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 26/31] ada: Fix strict aliasing violation in parameter passing Marc Poulhiès
                   ` (5 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Ronan Desplanques

From: Ronan Desplanques <desplanques@adacore.com>

The way if expressions were translated led the gimplifying phase
to attempt to create a temporary of a variable-sized type in some
cases. This patch fixes this by adding an address indirection layer
in those cases.

gcc/ada/

	* gcc-interface/utils2.cc (build_cond_expr): Also apply an
	indirection when the result type is variable-sized.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/utils2.cc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gcc/ada/gcc-interface/utils2.cc b/gcc/ada/gcc-interface/utils2.cc
index 64712cb9962..161f0f11e5c 100644
--- a/gcc/ada/gcc-interface/utils2.cc
+++ b/gcc/ada/gcc-interface/utils2.cc
@@ -1711,11 +1711,13 @@ build_cond_expr (tree result_type, tree condition_operand,
   true_operand = convert (result_type, true_operand);
   false_operand = convert (result_type, false_operand);
 
-  /* If the result type is unconstrained, take the address of the operands and
-     then dereference the result.  Likewise if the result type is passed by
-     reference, because creating a temporary of this type is not allowed.  */
+  /* If the result type is unconstrained or variable-sized, take the address
+     of the operands and then dereference the result.  Likewise if the result
+     type is passed by reference, because creating a temporary of this type is
+     not allowed.  */
   if (TREE_CODE (result_type) == UNCONSTRAINED_ARRAY_TYPE
       || type_contains_placeholder_p (result_type)
+      || !TREE_CONSTANT (TYPE_SIZE (result_type))
       || TYPE_IS_BY_REFERENCE_P (result_type))
     {
       result_type = build_pointer_type (result_type);
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 26/31] ada: Fix strict aliasing violation in parameter passing
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (23 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 25/31] ada: Fix crash with aliased array and if expression Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 27/31] ada: Make detection of useless copy for return more robust Marc Poulhiès
                   ` (4 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

This fixes a long-standing (implicit) violation of the strict aliasing rules
that occurs when the result of a call to an instance of Unchecked_Conversion
is directly passed as an actual parameter in a call to a subprogram and the
passing mechanism is by reference.  In this case, the reference passed to
the subprogram may be to a type that has nothing to do with the type of the
underlying object, which is the definition of such a violation.

This implements the following two-pronged approach: first, the problematic
cases are detected and a reference to a temporary is passed instead of the
direct reference to the underlying object; second, the implementation of
pragma Universal_Aliasing is enhanced so that it is propagated from the
component type of an array type to the array type itself, or else can be
applied to the array type directly, and may therefore be used to prevent
the violation from occurring in the first place, when the array type is
involved in the Unchecked_Conversion.

gcc/ada/

	* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Array_Type>: Set
	TYPE_TYPELESS_STORAGE on the array types if Universal_Aliasing is
	set on the type or its component type.
	<E_Array_Subtype>: Likewise.
	For other aggregate types, set TYPE_TYPELESS_STORAGE in this case.
	(set_typeless_storage_on_aggregate_type): New function.
	(set_universal_aliasing_on_type): Likewise.
	* gcc-interface/trans.cc (Call_to_gnu): Add const to local variable.
	Adjust comment.  Pass GNAT_NAME in the call to addressable_p and add
	a bypass for atomic types in case it returns false.
	(addressable_p): Add GNAT_EXPR third parameter with default value
	and add a default value to the existing second parameter.
	<VIEW_CONVERT_EXPR:>: Return false if the expression comes from a
	function call and if the alias sets of source and target types are
	both distinct from zero and each other.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/decl.cc  | 40 ++++++++++++++++++++++-
 gcc/ada/gcc-interface/trans.cc | 60 ++++++++++++++++++++++++----------
 2 files changed, 82 insertions(+), 18 deletions(-)

diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index 0987d534e69..ab54d2ccf13 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -205,6 +205,8 @@ static Entity_Id Gigi_Cloned_Subtype (Entity_Id);
 static tree gnu_ext_name_for_subprog (Entity_Id, tree);
 static void set_nonaliased_component_on_array_type (tree);
 static void set_reverse_storage_order_on_array_type (tree);
+static void set_typeless_storage_on_aggregate_type (tree);
+static void set_universal_aliasing_on_type (tree);
 static bool same_discriminant_p (Entity_Id, Entity_Id);
 static bool array_type_has_nonaliased_component (tree, Entity_Id);
 static bool compile_time_known_address_p (Node_Id);
@@ -2385,6 +2387,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 	      set_reverse_storage_order_on_array_type (tem);
 	    if (array_type_has_nonaliased_component (tem, gnat_entity))
 	      set_nonaliased_component_on_array_type (tem);
+	    if (Universal_Aliasing (gnat_entity)
+	        || Universal_Aliasing (Component_Type (gnat_entity)))
+	      set_typeless_storage_on_aggregate_type (tem);
 	  }
 
 	/* If this is a packed type implemented specially, then process the
@@ -2790,6 +2795,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 		set_reverse_storage_order_on_array_type (gnu_type);
 	      if (array_type_has_nonaliased_component (gnu_type, gnat_entity))
 		set_nonaliased_component_on_array_type (gnu_type);
+	      if (Universal_Aliasing (gnat_entity)
+		  || Universal_Aliasing (Component_Type (gnat_entity)))
+		set_typeless_storage_on_aggregate_type (gnu_type);
 
 	      /* Clear the TREE_OVERFLOW flag, if any, for null arrays.  */
 	      if (gnu_null_ranges[index])
@@ -4757,7 +4765,17 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 
 	  /* Record whether a pragma Universal_Aliasing was specified.  */
 	  if (Universal_Aliasing (gnat_entity) && !TYPE_IS_DUMMY_P (gnu_type))
-	    TYPE_UNIVERSAL_ALIASING_P (gnu_type) = 1;
+	    {
+	      /* Set TYPE_TYPELESS_STORAGE if this is an aggregate type and
+		 TYPE_UNIVERSAL_ALIASING_P otherwise, since the former is not
+		 available in the latter case  Both will effectively put alias
+		 set 0 on the type, but the former is more robust because it
+		 will be streamed in LTO mode.  */
+	      if (AGGREGATE_TYPE_P (gnu_type))
+		set_typeless_storage_on_aggregate_type (gnu_type);
+	      else
+		set_universal_aliasing_on_type (gnu_type);
+	    }
 
 	  /* If it is passed by reference, force BLKmode to ensure that
 	     objects of this type will always be put in memory.  */
@@ -6641,6 +6659,26 @@ set_reverse_storage_order_on_array_type (tree type)
     TYPE_REVERSE_STORAGE_ORDER (TYPE_CANONICAL (type)) = 1;
 }
 
+/* Set TYPE_TYPELESS_STORAGE on an aggregate type.  */
+
+static void
+set_typeless_storage_on_aggregate_type (tree type)
+{
+  TYPE_TYPELESS_STORAGE (type) = 1;
+  if (TYPE_CANONICAL (type))
+    TYPE_TYPELESS_STORAGE (TYPE_CANONICAL (type)) = 1;
+}
+
+/* Set TYPE_UNIVERSAL_ALIASING_P on a type.  */
+
+static void
+set_universal_aliasing_on_type (tree type)
+{
+  TYPE_UNIVERSAL_ALIASING_P (type) = 1;
+  if (TYPE_CANONICAL (type))
+    TYPE_UNIVERSAL_ALIASING_P (TYPE_CANONICAL (type)) = 1;
+}
+
 /* Return true if DISCR1 and DISCR2 represent the same discriminant.  */
 
 static bool
diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index 6f761766559..a6b86ec8b51 100644
--- a/gcc/ada/gcc-interface/trans.cc
+++ b/gcc/ada/gcc-interface/trans.cc
@@ -254,7 +254,8 @@ static tree emit_check (tree, tree, int, Node_Id);
 static tree build_unary_op_trapv (enum tree_code, tree, tree, Node_Id);
 static tree build_binary_op_trapv (enum tree_code, tree, tree, tree, Node_Id);
 static tree convert_with_check (Entity_Id, tree, bool, bool, Node_Id);
-static bool addressable_p (tree, tree);
+static bool addressable_p (tree gnu_expr, tree gnu_type = NULL_TREE,
+			   Node_Id gnat_expr = Empty);
 static tree assoc_to_constructor (Entity_Id, Node_Id, tree);
 static tree pos_to_constructor (Node_Id, tree);
 static void validate_unchecked_conversion (Node_Id);
@@ -4845,7 +4846,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
        gnat_formal = Next_Formal_With_Extras (gnat_formal),
        gnat_actual = Next_Actual (gnat_actual))
     {
-      Entity_Id gnat_formal_type = Etype (gnat_formal);
+      const Entity_Id gnat_formal_type = Etype (gnat_formal);
       tree gnu_formal_type = gnat_to_gnu_type (gnat_formal_type);
       tree gnu_formal = present_gnu_tree (gnat_formal)
 			? get_gnu_tree (gnat_formal) : NULL_TREE;
@@ -4861,10 +4862,11 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 	 because we need the real object in this case, either to pass its
 	 address if it's passed by reference or as target of the back copy
 	 done after the call if it uses the copy-in/copy-out mechanism.
-	 We do it in the In case too, except for an unchecked conversion
-	 to an elementary type or a constrained composite type because it
-	 alone can cause the actual to be misaligned and the addressability
-	 test is applied to the real object.  */
+	 We do it in the In case too, except for a formal passed by reference
+	 and an actual which is an unchecked conversion to an elementary type
+	 or constrained composite type because it itself can cause the actual
+	 to be misaligned or the strict aliasing rules to be violated and the
+	 addressability test needs to be applied to the real object.  */
       const bool suppress_type_conversion
 	= ((Nkind (gnat_actual) == N_Unchecked_Type_Conversion
 	    && (!in_param
@@ -4894,7 +4896,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 	 out after the call.  */
       if (is_by_ref_formal_parm
 	  && (gnu_name_type = gnat_to_gnu_type (Etype (gnat_name)))
-	  && !addressable_p (gnu_name, gnu_name_type))
+	  && !addressable_p (gnu_name, gnu_name_type, gnat_name))
 	{
 	  tree gnu_orig = gnu_name, gnu_temp, gnu_stmt;
 
@@ -4903,6 +4905,11 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 	  if (TREE_CODE (remove_conversions (gnu_name, true)) == CONSTRUCTOR)
 	    ;
 
+	  /* Likewise for an atomic type, which is defined to be by-reference
+	     if it is not by-copy but actually behaves more like a scalar.  */
+	  else if (TYPE_ATOMIC (gnu_formal_type))
+	    ;
+
 	  /* If the formal is passed by reference, a copy is not allowed.  */
 	  else if (TYPE_IS_BY_REFERENCE_P (gnu_formal_type)
 		   || Is_Aliased (gnat_formal))
@@ -10061,7 +10068,8 @@ convert_with_check (Entity_Id gnat_type, tree gnu_expr, bool overflow_p,
    unless it is an expression involving computation or if it involves a
    reference to a bitfield or to an object not sufficiently aligned for
    its type.  If GNU_TYPE is non-null, return true only if GNU_EXPR can
-   be directly addressed as an object of this type.
+   be directly addressed as an object of this type.  GNAT_EXPR is the
+   GNAT expression that has been translated into GNU_EXPR.
 
    *** Notes on addressability issues in the Ada compiler ***
 
@@ -10118,7 +10126,7 @@ convert_with_check (Entity_Id gnat_type, tree gnu_expr, bool overflow_p,
    generated to connect everything together.  */
 
 static bool
-addressable_p (tree gnu_expr, tree gnu_type)
+addressable_p (tree gnu_expr, tree gnu_type, Node_Id gnat_expr)
 {
   /* For an integral type, the size of the actual type of the object may not
      be greater than that of the expected type, otherwise an indirect access
@@ -10184,8 +10192,8 @@ addressable_p (tree gnu_expr, tree gnu_type)
     case COND_EXPR:
       /* We accept &COND_EXPR as soon as both operands are addressable and
 	 expect the outcome to be the address of the selected operand.  */
-      return (addressable_p (TREE_OPERAND (gnu_expr, 1), NULL_TREE)
-	      && addressable_p (TREE_OPERAND (gnu_expr, 2), NULL_TREE));
+      return (addressable_p (TREE_OPERAND (gnu_expr, 1))
+	      && addressable_p (TREE_OPERAND (gnu_expr, 2)));
 
     case COMPONENT_REF:
       return (((!DECL_BIT_FIELD (TREE_OPERAND (gnu_expr, 1))
@@ -10200,22 +10208,40 @@ addressable_p (tree gnu_expr, tree gnu_type)
 		       >= TYPE_ALIGN (TREE_TYPE (gnu_expr))))
 	       /* The field of a padding record is always addressable.  */
 	       || TYPE_IS_PADDING_P (TREE_TYPE (TREE_OPERAND (gnu_expr, 0))))
-	      && addressable_p (TREE_OPERAND (gnu_expr, 0), NULL_TREE));
+	      && addressable_p (TREE_OPERAND (gnu_expr, 0)));
 
     case ARRAY_REF:  case ARRAY_RANGE_REF:
     case REALPART_EXPR:  case IMAGPART_EXPR:
     case NOP_EXPR:
-      return addressable_p (TREE_OPERAND (gnu_expr, 0), NULL_TREE);
+      return addressable_p (TREE_OPERAND (gnu_expr, 0));
 
     case CONVERT_EXPR:
       return (AGGREGATE_TYPE_P (TREE_TYPE (gnu_expr))
-	      && addressable_p (TREE_OPERAND (gnu_expr, 0), NULL_TREE));
+	      && addressable_p (TREE_OPERAND (gnu_expr, 0)));
 
     case VIEW_CONVERT_EXPR:
       {
-	/* This is addressable if we can avoid a copy.  */
-	tree type = TREE_TYPE (gnu_expr);
 	tree inner_type = TREE_TYPE (TREE_OPERAND (gnu_expr, 0));
+	tree type = TREE_TYPE (gnu_expr);
+	alias_set_type inner_set, set;
+
+	/* Taking the address of a VIEW_CONVERT_EXPR of an expression violates
+	   strict aliasing rules if the source and target types are unrelated.
+	   This would happen in an Ada program that itself does *not* contain
+	   such a violation, through type punning done by means of an instance
+	   of Unchecked_Conversion.  Detect this case and force a temporary to
+	   prevent the violation from occurring, which is always allowed by
+	   the semantics of function calls in Ada, unless the source type or
+	   the target type have alias set 0, i.e. may alias anything.  */
+	if (Present (gnat_expr)
+	    && Nkind (gnat_expr) == N_Unchecked_Type_Conversion
+	    && Nkind (Original_Node (gnat_expr)) == N_Function_Call
+	    && (inner_set = get_alias_set (inner_type)) != 0
+	    && (set = get_alias_set (type)) != 0
+	    && inner_set != set)
+	  return false;
+
+	/* Otherwise this is addressable if we can avoid a copy.  */
 	return (((TYPE_MODE (type) == TYPE_MODE (inner_type)
 		  && (!STRICT_ALIGNMENT
 		      || TYPE_ALIGN (type) <= TYPE_ALIGN (inner_type)
@@ -10227,7 +10253,7 @@ addressable_p (tree gnu_expr, tree gnu_type)
 			 || TYPE_ALIGN (inner_type) >= BIGGEST_ALIGNMENT
 			 || TYPE_ALIGN_OK (type)
 			 || TYPE_ALIGN_OK (inner_type))))
-		&& addressable_p (TREE_OPERAND (gnu_expr, 0), NULL_TREE));
+		&& addressable_p (TREE_OPERAND (gnu_expr, 0)));
       }
 
     default:
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 27/31] ada: Make detection of useless copy for return more robust
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (24 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 26/31] ada: Fix strict aliasing violation in parameter passing Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 28/31] ada: Fix strict aliasing violation in parameter passing (continued) Marc Poulhiès
                   ` (3 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

In the return-by-invisible-reference case, the return object of an extended
return statement is allocated directly on the return stack and, therefore,
the copy operation on return is useless.  The code detecting this was not
robust enough and missed some complex cases.

gcc/ada/

	* gcc-interface/trans.cc (gnat_to_gnu) <N_Simple_Return_Statement>:
	In the return-by-invisible-reference case, remove conversions before
	looking for a dereference in the return values and building the test
	protecting against a useless copy operation.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/trans.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index a6b86ec8b51..4ae599b8b4c 100644
--- a/gcc/ada/gcc-interface/trans.cc
+++ b/gcc/ada/gcc-interface/trans.cc
@@ -7767,11 +7767,12 @@ gnat_to_gnu (Node_Id gnat_node)
 		gnu_result = build2 (INIT_EXPR, void_type_node,
 				     gnu_ret_deref, gnu_ret_val);
 		/* Avoid a useless copy with __builtin_return_slot.  */
-		if (INDIRECT_REF_P (gnu_ret_val))
+		tree gnu_inner_val = remove_conversions (gnu_ret_val, false);
+		if (INDIRECT_REF_P (gnu_inner_val))
 		  gnu_result
 		    = build3 (COND_EXPR, void_type_node,
 			      fold_build2 (NE_EXPR, boolean_type_node,
-					   TREE_OPERAND (gnu_ret_val, 0),
+					   TREE_OPERAND (gnu_inner_val, 0),
 					   gnu_ret_obj),
 			      gnu_result, NULL_TREE);
 		add_stmt_with_node (gnu_result, gnat_node);
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 28/31] ada: Fix strict aliasing violation in parameter passing (continued)
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (25 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 27/31] ada: Make detection of useless copy for return more robust Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 29/31] ada: Fix internal error on discriminated record with Atomic aspect in Ada 2022 Marc Poulhiès
                   ` (2 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

This fixes another long-standing (implicit) violation of the strict aliasing
rules that occurs when the result of a value conversion is directly passed
as an actual parameter in a call to a subprogram and the passing mechanism
is by reference.  In this case, the reference passed to the subprogram may
be to a type that is too different from the type of the underlying object,
which is the definition of such a violation.

The change reworks and strengthens the previous fix as follows: first, the
detection of these violations is moved into a dedicated predicate; second,
an assertion is added to check that none of them has been missed, which is
triggered by either -fchecking or -fstrict-aliasing, as the closely related
assertion that is present in relate_alias_sets.

The assertion uncovered two internal sources of violations: implementation
types for packed array types with peculiar index types and interface types,
which are fixed by propagating alias sets in the first case and resorting to
universal aliasing in the second case.

Finally, an unconditional warning is implemented to inform the user that the
temporary is created and to suggest a possible solution to prevent that.

gcc/ada/

	* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Array_Type>: For a
	packed type implemented specially, temporarily save the XUA type as
	equivalent to the entity before processing the implementation type.
	For this implementation type, if its component type is the same as
	that of the original type, copy the alias set from the latter.
	<types>: Resort to universal aliasing for all interface types.
	* gcc-interface/trans.cc (Call_to_gnu): Add GNU_ACTUAL_TYPE local
	variable and rename existing one to GNU_UNPADDED_ACTUAL_TYPE.
	If the formal is passed by reference and the actual is a conversion,
	call aliasable_p to detect aliasing violations, issue a warning upon
	finding one and create the temporary in the target type.
	Add an assertion that no such violation has been missed above.
	(addressable_p): Revert latest changes.
	(aliasable_p): New predicate.
	* gcc-interface/utils2.cc (build_binary_op) <ARRAY_RANGE_REF>: When
	creating a new array type on the fly, preserve the alias set of the
	operation type.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/decl.cc   |  48 ++++++---
 gcc/ada/gcc-interface/trans.cc  | 167 +++++++++++++++++++++++---------
 gcc/ada/gcc-interface/utils2.cc |   6 +-
 3 files changed, 159 insertions(+), 62 deletions(-)

diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index ab54d2ccf13..6e40a157734 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -2119,6 +2119,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 
     case E_Array_Type:
       {
+	const Entity_Id OAT = Original_Array_Type (gnat_entity);
 	const Entity_Id PAT = Packed_Array_Impl_Type (gnat_entity);
 	const bool convention_fortran_p
 	  = (Convention (gnat_entity) == Convention_Fortran);
@@ -2392,14 +2393,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 	      set_typeless_storage_on_aggregate_type (tem);
 	  }
 
-	/* If this is a packed type implemented specially, then process the
-	   implementation type so it is elaborated in the proper scope.  */
-	if (Present (PAT))
-	  gnat_to_gnu_entity (PAT, NULL_TREE, false);
-
-	/* Otherwise, if an alignment is specified, use it if valid and, if
-	   the alignment was requested with an explicit clause, state so.  */
-	else if (Known_Alignment (gnat_entity))
+	/* If an alignment is specified for an array that is not a packed type
+	   implemented specially, use the alignment if it is valid and, if it
+	   was requested with an explicit clause, preserve the information.  */
+	if (Known_Alignment (gnat_entity) && No (PAT))
 	  {
 	    SET_TYPE_ALIGN (tem,
 			    validate_alignment (Alignment (gnat_entity),
@@ -2418,7 +2415,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 
 	TYPE_BIT_PACKED_ARRAY_TYPE_P (tem)
 	  = (Is_Packed_Array_Impl_Type (gnat_entity)
-	     ? Is_Bit_Packed_Array (Original_Array_Type (gnat_entity))
+	     ? Is_Bit_Packed_Array (OAT)
 	     : Is_Bit_Packed_Array (gnat_entity));
 
 	if (Treat_As_Volatile (gnat_entity))
@@ -2447,8 +2444,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 	  TYPE_ARRAY_MAX_SIZE (tem) = gnu_max_size;
 
 	/* See the above description for the rationale.  */
-	create_type_decl (create_concat_name (gnat_entity, "XUA"), tem,
-			  artificial_p, debug_info_p, gnat_entity);
+	tree gnu_tmp_decl
+	  = create_type_decl (create_concat_name (gnat_entity, "XUA"), tem,
+			      artificial_p, debug_info_p, gnat_entity);
 	TYPE_CONTEXT (tem) = gnu_fat_type;
 	TYPE_CONTEXT (TYPE_POINTER_TO (tem)) = gnu_fat_type;
 
@@ -2475,6 +2473,25 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 	TYPE_REFERENCE_TO (gnu_type) = gnu_fat_type;
 	SET_TYPE_MODE (gnu_type, BLKmode);
 	SET_TYPE_ALIGN (gnu_type, TYPE_ALIGN (tem));
+
+	/* If this is a packed type implemented specially, then process the
+	   implementation type so it is elaborated in the proper scope.  */
+	if (Present (PAT))
+	  {
+	    /* Save the XUA type as our equivalent temporarily for the call
+	       to gnat_to_gnu_type on the OAT below.  */
+	    save_gnu_tree (gnat_entity, gnu_tmp_decl, false);
+	    gnat_to_gnu_entity (PAT, NULL_TREE, false);
+	    save_gnu_tree (gnat_entity, NULL_TREE, false);
+	  }
+
+	/* If this is precisely the implementation type and it has the same
+	   component as the original type (which happens for peculiar index
+	   types), copy the alias set from the latter; this ensures that all
+	   implementation types built on the fly have the same alias set.  */
+        if (Is_Packed_Array_Impl_Type (gnat_entity)
+	    && Component_Type (gnat_entity) == Component_Type (OAT))
+	  relate_alias_sets (gnu_type, gnat_to_gnu_type (OAT), ALIAS_SET_COPY);
       }
       break;
 
@@ -4763,8 +4780,13 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 		  && align_clause))
 	    TYPE_USER_ALIGN (gnu_type) = 1;
 
-	  /* Record whether a pragma Universal_Aliasing was specified.  */
-	  if (Universal_Aliasing (gnat_entity) && !TYPE_IS_DUMMY_P (gnu_type))
+	  /* Record whether a pragma Universal_Aliasing was specified.  Also
+	     consider that it is always present on interface types because,
+	     while they are abstract tagged types and thus no object of these
+	     types exists anywhere, they are used to access objects of types
+	     that implement them.  */
+	  if ((Universal_Aliasing (gnat_entity) || Is_Interface (gnat_entity))
+	      && !TYPE_IS_DUMMY_P (gnu_type))
 	    {
 	      /* Set TYPE_TYPELESS_STORAGE if this is an aggregate type and
 		 TYPE_UNIVERSAL_ALIASING_P otherwise, since the former is not
diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index 4ae599b8b4c..93978c0f0ba 100644
--- a/gcc/ada/gcc-interface/trans.cc
+++ b/gcc/ada/gcc-interface/trans.cc
@@ -254,8 +254,8 @@ static tree emit_check (tree, tree, int, Node_Id);
 static tree build_unary_op_trapv (enum tree_code, tree, tree, Node_Id);
 static tree build_binary_op_trapv (enum tree_code, tree, tree, tree, Node_Id);
 static tree convert_with_check (Entity_Id, tree, bool, bool, Node_Id);
-static bool addressable_p (tree gnu_expr, tree gnu_type = NULL_TREE,
-			   Node_Id gnat_expr = Empty);
+static bool addressable_p (tree, tree);
+static bool aliasable_p (tree, tree);
 static tree assoc_to_constructor (Entity_Id, Node_Id, tree);
 static tree pos_to_constructor (Node_Id, tree);
 static void validate_unchecked_conversion (Node_Id);
@@ -4850,6 +4850,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
       tree gnu_formal_type = gnat_to_gnu_type (gnat_formal_type);
       tree gnu_formal = present_gnu_tree (gnat_formal)
 			? get_gnu_tree (gnat_formal) : NULL_TREE;
+      tree gnu_actual_type = gnat_to_gnu_type (Etype (gnat_actual));
       const bool in_param = (Ekind (gnat_formal) == E_In_Parameter);
       const bool is_true_formal_parm
 	= gnu_formal && TREE_CODE (gnu_formal) == PARM_DECL;
@@ -4865,8 +4866,8 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 	 We do it in the In case too, except for a formal passed by reference
 	 and an actual which is an unchecked conversion to an elementary type
 	 or constrained composite type because it itself can cause the actual
-	 to be misaligned or the strict aliasing rules to be violated and the
-	 addressability test needs to be applied to the real object.  */
+	 to be misaligned and the addressability test needs to be applied to
+	 the real object.  */
       const bool suppress_type_conversion
 	= ((Nkind (gnat_actual) == N_Unchecked_Type_Conversion
 	    && (!in_param
@@ -4878,6 +4879,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
       Node_Id gnat_name = suppress_type_conversion
 			  ? Expression (gnat_actual) : gnat_actual;
       tree gnu_name = gnat_to_gnu (gnat_name), gnu_name_type;
+      bool aliasing = false;
 
       /* If it's possible we may need to use this expression twice, make sure
 	 that any side-effects are handled via SAVE_EXPRs; likewise if we need
@@ -4893,10 +4895,14 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 
       /* If we are passing a non-addressable parameter by reference, pass the
 	 address of a copy.  In the In Out or Out case, set up to copy back
-	 out after the call.  */
+	 out after the call.  Moreover, in the case of a conversion, if we
+	 are passing a non-aliasable parameter, also pass the address of a
+	 copy to avoid breaking strict aliasing rules.  */
       if (is_by_ref_formal_parm
 	  && (gnu_name_type = gnat_to_gnu_type (Etype (gnat_name)))
-	  && !addressable_p (gnu_name, gnu_name_type, gnat_name))
+	  && (!addressable_p (gnu_name, gnu_name_type)
+	      || (node_is_type_conversion (gnat_actual)
+		  && (aliasing = !aliasable_p (gnu_name, gnu_actual_type)))))
 	{
 	  tree gnu_orig = gnu_name, gnu_temp, gnu_stmt;
 
@@ -4922,6 +4928,37 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 	    post_error ("misaligned actual cannot be passed by reference??",
 			gnat_actual);
 
+	  /* If the copy needs to be made because of aliasing considerations,
+	     issue a warning because this was historically not necessary.  */
+	  else if (aliasing)
+	    {
+	      if (Nkind (gnat_actual) == N_Unchecked_Type_Conversion)
+		{
+		  post_error
+		    ("unchecked conversion implemented by copy??",
+		     gnat_actual);
+		  post_error
+		    ("\\?use pragma Universal_Aliasing on either type",
+		     gnat_actual);
+		  post_error
+		    ("\\?to enable RM 13.9(12) implementation permission",
+		     gnat_actual);
+		}
+
+	      else
+		{
+		  post_error
+		    ("value conversion implemented by copy??",
+		     gnat_actual);
+		  post_error
+		    ("\\?use pair of types with same root type",
+		     gnat_actual);
+		  post_error
+		    ("\\?to avoid new object in RM 4.6(58.5/5)",
+		     gnat_actual);
+		}
+	    }
+
 	  /* If the actual type of the object is already the nominal type,
 	     we have nothing to do, except if the size is self-referential
 	     in which case we'll remove the unpadding below.  */
@@ -4952,6 +4989,17 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 					       TREE_TYPE (gnu_name))))
 	    gnu_name = convert (gnu_name_type, gnu_name);
 
+	  /* If the temporary is created  because of aliasing considerations,
+	     it must be in the target type of the (unchecked) conversion.  */
+	  if (aliasing)
+	    {
+	      if (Nkind (gnat_actual) == N_Unchecked_Type_Conversion)
+		gnu_name = unchecked_convert (gnu_actual_type, gnu_name,
+					      No_Truncation (gnat_actual));
+	      else
+		gnu_name = convert (gnu_actual_type, gnu_name);
+	    }
+
 	  /* If this is an In Out or Out parameter and we're returning a value,
 	     we need to create a temporary for the return value because we must
 	     preserve it before copying back at the very end.  */
@@ -5011,6 +5059,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 	}
 
       /* Start from the real object and build the actual.  */
+      tree gnu_unpadded_actual_type = get_unpadded_type (Etype (gnat_actual));
       tree gnu_actual = gnu_name;
 
       /* If atomic access is required for an In or In Out actual parameter,
@@ -5025,8 +5074,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 	 So do it here for the part we will use as an input, if any.  */
       if (Ekind (gnat_formal) != E_Out_Parameter
 	  && TYPE_IS_PADDING_P (TREE_TYPE (gnu_actual)))
-	gnu_actual
-	  = convert (get_unpadded_type (Etype (gnat_actual)), gnu_actual);
+	gnu_actual = convert (gnu_unpadded_actual_type, gnu_actual);
 
       /* Put back the conversion we suppressed above in the computation of the
 	 real object.  And even if we didn't suppress any conversion there, we
@@ -5036,12 +5084,11 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 	 pointer to it, but that's OK when the formal is passed by reference.
 	 We also do not put back a conversion between an actual and a formal
 	 that are unconstrained array types to avoid creating local bounds.  */
-      tree gnu_actual_type = get_unpadded_type (Etype (gnat_actual));
-      if (TYPE_IS_DUMMY_P (gnu_actual_type))
+      if (TYPE_IS_DUMMY_P (gnu_unpadded_actual_type))
 	gcc_assert (is_true_formal_parm && DECL_BY_REF_P (gnu_formal));
       else if (suppress_type_conversion
 	       && Nkind (gnat_actual) == N_Unchecked_Type_Conversion)
-	gnu_actual = unchecked_convert (gnu_actual_type, gnu_actual,
+	gnu_actual = unchecked_convert (gnu_unpadded_actual_type, gnu_actual,
 				        No_Truncation (gnat_actual));
       else if ((TREE_CODE (TREE_TYPE (gnu_actual)) == UNCONSTRAINED_ARRAY_TYPE
 		|| (TREE_CODE (TREE_TYPE (gnu_actual)) == RECORD_TYPE
@@ -5049,7 +5096,16 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 	       && TREE_CODE (gnu_formal_type) == UNCONSTRAINED_ARRAY_TYPE)
 	;
       else
-	gnu_actual = convert (gnu_actual_type, gnu_actual);
+	gnu_actual = convert (gnu_unpadded_actual_type, gnu_actual);
+
+      /* If the formal parameter is passed by reference, check that building
+	 the address of the actual parameter below will not end up violating
+	 strict aliasing rules; that's the case for a VIEW_CONVERT_EXPR when
+	 the source and target types may not alias each other.  */
+      if (is_by_ref_formal_parm
+	  && TREE_CODE (gnu_actual) == VIEW_CONVERT_EXPR
+	  && (flag_checking || flag_strict_aliasing))
+	gcc_assert (aliasable_p (gnu_actual, gnu_actual_type));
 
       gigi_checking_assert (!Do_Range_Check (gnat_actual));
 
@@ -5065,8 +5121,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 
 	      /* If we have a padded type, be sure we've removed padding.  */
 	      if (TYPE_IS_PADDING_P (TREE_TYPE (gnu_actual)))
-		gnu_actual = convert (get_unpadded_type (Etype (gnat_actual)),
-				      gnu_actual);
+		gnu_actual = convert (gnu_unpadded_actual_type, gnu_actual);
 
 	      /* If it is the constructed subtype of an array allocated with
 		 its bounds, the type of the actual includes the template,
@@ -5076,7 +5131,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 	      if (TREE_CODE (TREE_TYPE (gnu_actual)) == RECORD_TYPE
 		  && TYPE_CONTAINS_TEMPLATE_P (TREE_TYPE (gnu_actual))
 		  && Is_Constr_Array_Subt_With_Bounds (Etype (gnat_actual)))
-		gnu_actual = convert (gnu_actual_type, gnu_actual);
+		gnu_actual = convert (gnu_unpadded_actual_type, gnu_actual);
 	    }
 
 	  /* There is no need to convert the actual to the formal's type before
@@ -5087,7 +5142,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
 	      /* Put back the conversion we suppressed above for In Out or Out
 		 parameters, since it may set the bounds of the actual.  */
 	      if (!in_param && suppress_type_conversion)
-		gnu_actual = convert (gnu_actual_type, gnu_actual);
+		gnu_actual = convert (gnu_unpadded_actual_type, gnu_actual);
 	      gnu_actual = convert (gnu_formal_type, gnu_actual);
 	    }
 
@@ -10065,12 +10120,11 @@ convert_with_check (Entity_Id gnat_type, tree gnu_expr, bool overflow_p,
   return convert (gnu_type, gnu_result);
 }
 
-/* Return true if GNU_EXPR can be directly addressed.  This is the case
+/* Return true if GNU_EXPR may be directly addressed.  This is the case
    unless it is an expression involving computation or if it involves a
    reference to a bitfield or to an object not sufficiently aligned for
    its type.  If GNU_TYPE is non-null, return true only if GNU_EXPR can
-   be directly addressed as an object of this type.  GNAT_EXPR is the
-   GNAT expression that has been translated into GNU_EXPR.
+   be directly addressed as an object of this type.
 
    *** Notes on addressability issues in the Ada compiler ***
 
@@ -10127,7 +10181,7 @@ convert_with_check (Entity_Id gnat_type, tree gnu_expr, bool overflow_p,
    generated to connect everything together.  */
 
 static bool
-addressable_p (tree gnu_expr, tree gnu_type, Node_Id gnat_expr)
+addressable_p (tree gnu_expr, tree gnu_type)
 {
   /* For an integral type, the size of the actual type of the object may not
      be greater than that of the expected type, otherwise an indirect access
@@ -10193,8 +10247,8 @@ addressable_p (tree gnu_expr, tree gnu_type, Node_Id gnat_expr)
     case COND_EXPR:
       /* We accept &COND_EXPR as soon as both operands are addressable and
 	 expect the outcome to be the address of the selected operand.  */
-      return (addressable_p (TREE_OPERAND (gnu_expr, 1))
-	      && addressable_p (TREE_OPERAND (gnu_expr, 2)));
+      return (addressable_p (TREE_OPERAND (gnu_expr, 1), NULL_TREE)
+	      && addressable_p (TREE_OPERAND (gnu_expr, 2), NULL_TREE));
 
     case COMPONENT_REF:
       return (((!DECL_BIT_FIELD (TREE_OPERAND (gnu_expr, 1))
@@ -10209,40 +10263,22 @@ addressable_p (tree gnu_expr, tree gnu_type, Node_Id gnat_expr)
 		       >= TYPE_ALIGN (TREE_TYPE (gnu_expr))))
 	       /* The field of a padding record is always addressable.  */
 	       || TYPE_IS_PADDING_P (TREE_TYPE (TREE_OPERAND (gnu_expr, 0))))
-	      && addressable_p (TREE_OPERAND (gnu_expr, 0)));
+	      && addressable_p (TREE_OPERAND (gnu_expr, 0), NULL_TREE));
 
     case ARRAY_REF:  case ARRAY_RANGE_REF:
     case REALPART_EXPR:  case IMAGPART_EXPR:
     case NOP_EXPR:
-      return addressable_p (TREE_OPERAND (gnu_expr, 0));
+      return addressable_p (TREE_OPERAND (gnu_expr, 0), NULL_TREE);
 
     case CONVERT_EXPR:
       return (AGGREGATE_TYPE_P (TREE_TYPE (gnu_expr))
-	      && addressable_p (TREE_OPERAND (gnu_expr, 0)));
+	      && addressable_p (TREE_OPERAND (gnu_expr, 0), NULL_TREE));
 
     case VIEW_CONVERT_EXPR:
       {
-	tree inner_type = TREE_TYPE (TREE_OPERAND (gnu_expr, 0));
+	/* This is addressable only if a copy need not be made downstream.  */
 	tree type = TREE_TYPE (gnu_expr);
-	alias_set_type inner_set, set;
-
-	/* Taking the address of a VIEW_CONVERT_EXPR of an expression violates
-	   strict aliasing rules if the source and target types are unrelated.
-	   This would happen in an Ada program that itself does *not* contain
-	   such a violation, through type punning done by means of an instance
-	   of Unchecked_Conversion.  Detect this case and force a temporary to
-	   prevent the violation from occurring, which is always allowed by
-	   the semantics of function calls in Ada, unless the source type or
-	   the target type have alias set 0, i.e. may alias anything.  */
-	if (Present (gnat_expr)
-	    && Nkind (gnat_expr) == N_Unchecked_Type_Conversion
-	    && Nkind (Original_Node (gnat_expr)) == N_Function_Call
-	    && (inner_set = get_alias_set (inner_type)) != 0
-	    && (set = get_alias_set (type)) != 0
-	    && inner_set != set)
-	  return false;
-
-	/* Otherwise this is addressable if we can avoid a copy.  */
+	tree inner_type = TREE_TYPE (TREE_OPERAND (gnu_expr, 0));
 	return (((TYPE_MODE (type) == TYPE_MODE (inner_type)
 		  && (!STRICT_ALIGNMENT
 		      || TYPE_ALIGN (type) <= TYPE_ALIGN (inner_type)
@@ -10254,7 +10290,7 @@ addressable_p (tree gnu_expr, tree gnu_type, Node_Id gnat_expr)
 			 || TYPE_ALIGN (inner_type) >= BIGGEST_ALIGNMENT
 			 || TYPE_ALIGN_OK (type)
 			 || TYPE_ALIGN_OK (inner_type))))
-		&& addressable_p (TREE_OPERAND (gnu_expr, 0)));
+		&& addressable_p (TREE_OPERAND (gnu_expr, 0), NULL_TREE));
       }
 
     default:
@@ -10262,6 +10298,45 @@ addressable_p (tree gnu_expr, tree gnu_type, Node_Id gnat_expr)
     }
 }
 
+/* Return true if GNU_EXPR may be aliased by an object of GNU_TYPE in the
+   context of by-reference parameter passing.  This is the case when the
+   object (ultimately) referenced through GNU_EXPR has a type whose alias
+   set is either effectively 0, or equal to, or a subset of the alias set
+   of GNU_TYPE.
+
+   When the predicate returns true, it is possible to take the address of
+   GNU_EXPR without violating strict aliasing rules.  When it does not, no
+   such guarantee holds, so a temporary with GNU_TYPE needs to be created
+   and its address passed instead (provided that this be legal of course).  */
+
+static bool
+aliasable_p (tree gnu_expr, tree gnu_type)
+{
+  /* This is the source of the possible violation: taking the address of an
+     object in a type that does not correspond to its declared type.  */
+  if (TREE_CODE (gnu_expr) == VIEW_CONVERT_EXPR)
+    gnu_expr = TREE_OPERAND (gnu_expr, 0);
+
+  /* Work around get_deref_alias_set and alias_set_subset_of being disabled
+     when flag_strict_aliasing is 0.  */
+  const bool saved_flag_strict_aliasing = flag_strict_aliasing;
+
+  flag_strict_aliasing = 1;
+
+  /* Call get_deref_alias_set to catch ref-all and void* pointers.  */
+  const alias_set_type set1
+    = TREE_CODE (gnu_expr) == INDIRECT_REF
+      ? get_deref_alias_set (TREE_OPERAND (gnu_expr, 0))
+      : get_alias_set (TREE_TYPE (gnu_expr));
+  const alias_set_type set2 = get_alias_set (gnu_type);
+
+  bool ret = set1 == 0 || set1 == set2 || alias_set_subset_of (set1, set2);
+
+  flag_strict_aliasing = saved_flag_strict_aliasing;
+
+  return ret;
+}
+
 /* Do the processing for the declaration of a GNAT_ENTITY, a type or subtype.
    If a Freeze node exists for the entity, delay the bulk of the processing.
    Otherwise make a GCC type for GNAT_ENTITY and set up the correspondence.  */
diff --git a/gcc/ada/gcc-interface/utils2.cc b/gcc/ada/gcc-interface/utils2.cc
index 161f0f11e5c..c1346cfadeb 100644
--- a/gcc/ada/gcc-interface/utils2.cc
+++ b/gcc/ada/gcc-interface/utils2.cc
@@ -1036,9 +1036,9 @@ build_binary_op (enum tree_code op_code, tree result_type,
       if (op_code == ARRAY_RANGE_REF
 	  && TREE_TYPE (operation_type) != TREE_TYPE (left_type))
 	{
-	  operation_type
-	    = build_nonshared_array_type (TREE_TYPE (left_type),
-					  TYPE_DOMAIN (operation_type));
+          operation_type = copy_type (operation_type);
+          TREE_TYPE (operation_type) = TREE_TYPE (left_type);
+
 	  /* Declare it now since it will never be declared otherwise.  This
 	     is necessary to ensure that its subtrees are properly marked.  */
 	  create_type_decl (TYPE_NAME (operation_type), operation_type, true,
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 29/31] ada: Fix internal error on discriminated record with Atomic aspect in Ada 2022
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (26 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 28/31] ada: Fix strict aliasing violation in parameter passing (continued) Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 30/31] ada: Simplify test for propagation of attributes to subtypes Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 31/31] ada: Streamline implementation of simple nonbinary modular operations Marc Poulhiès
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

It occurs in build_load_modify_store where the pattern matching logic cannot
find the atomic load that is present in the tree because it has been wrapped
in a SAVE_EXPR by gnat_protect_expr, which is unnecessary.

gcc/ada/

	* gcc-interface/utils2.cc (gnat_protect_expr): Deal specifically
	with atomic loads. Document the relationship with gnat_save_expr.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/utils2.cc | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/gcc-interface/utils2.cc b/gcc/ada/gcc-interface/utils2.cc
index c1346cfadeb..8fb86ab29e3 100644
--- a/gcc/ada/gcc-interface/utils2.cc
+++ b/gcc/ada/gcc-interface/utils2.cc
@@ -2887,7 +2887,11 @@ gnat_save_expr (tree exp)
 
 /* Protect EXP for immediate reuse.  This is a variant of gnat_save_expr that
    is optimized under the assumption that EXP's value doesn't change before
-   its subsequent reuse(s) except through its potential reevaluation.  */
+   its subsequent reuse(s) except potentially through its reevaluation.
+
+   gnat_protect_expr guarantees that multiple evaluations of the expression
+   will not generate multiple side effects, whereas gnat_save_expr further
+   guarantees that all evaluations will yield the same result.  */
 
 tree
 gnat_protect_expr (tree exp)
@@ -2932,6 +2936,13 @@ gnat_protect_expr (tree exp)
     return build3 (code, type, gnat_protect_expr (TREE_OPERAND (exp, 0)),
 		   TREE_OPERAND (exp, 1), NULL_TREE);
 
+  /* An atomic load is an INDIRECT_REF of its first argument, so apply the
+     same transformation as in the INDIRECT_REF case above.  */
+  if (code == CALL_EXPR && call_is_atomic_load (exp))
+    return build_call_expr (TREE_OPERAND (CALL_EXPR_FN (exp), 0), 2,
+			    gnat_protect_expr (CALL_EXPR_ARG (exp, 0)),
+			    CALL_EXPR_ARG (exp, 1));
+
   /* If this is a COMPONENT_REF of a fat pointer, save the entire fat pointer.
      This may be more efficient, but will also allow us to more easily find
      the match for the PLACEHOLDER_EXPR.  */
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 30/31] ada: Simplify test for propagation of attributes to subtypes
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (27 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 29/31] ada: Fix internal error on discriminated record with Atomic aspect in Ada 2022 Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  2024-05-21  7:30 ` [COMMITTED 31/31] ada: Streamline implementation of simple nonbinary modular operations Marc Poulhiès
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

This changes the test to use the Is_Base_Type predicate and also removes the
superfluous call to Base_Type before First_Subtype.  No functional changes.

gcc/ada/

	* gcc-interface/decl.cc (gnat_to_gnu_entity): Use the Is_Base_Type
	predicate and remove superfluous calls to Base_Type.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/decl.cc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index 6e40a157734..f6a4c0631b6 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -506,11 +506,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
       /* Machine_Attributes on types are expected to be propagated to
 	 subtypes.  The corresponding Gigi_Rep_Items are only attached
 	 to the first subtype though, so we handle the propagation here.  */
-      if (Base_Type (gnat_entity) != gnat_entity
+      if (!Is_Base_Type (gnat_entity)
 	  && !Is_First_Subtype (gnat_entity)
-	  && Has_Gigi_Rep_Item (First_Subtype (Base_Type (gnat_entity))))
-	prepend_attributes (&attr_list,
-			    First_Subtype (Base_Type (gnat_entity)));
+	  && Has_Gigi_Rep_Item (First_Subtype (gnat_entity)))
+	prepend_attributes (&attr_list, First_Subtype (gnat_entity));
 
       /* Compute a default value for the size of an elementary type.  */
       if (Known_Esize (gnat_entity) && Is_Elementary_Type (gnat_entity))
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

* [COMMITTED 31/31] ada: Streamline implementation of simple nonbinary modular operations
  2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
                   ` (28 preceding siblings ...)
  2024-05-21  7:30 ` [COMMITTED 30/31] ada: Simplify test for propagation of attributes to subtypes Marc Poulhiès
@ 2024-05-21  7:30 ` Marc Poulhiès
  29 siblings, 0 replies; 31+ messages in thread
From: Marc Poulhiès @ 2024-05-21  7:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

From: Eric Botcazou <ebotcazou@adacore.com>

They are implemented by the nonbinary_modular_operation routine, which is
complex and, in particular, creates signed types and types with a partial
precision each time a subtraction or a multiplication resp. is generated.
Both are unnecessary and a simple approach even generates better code for
the subtraction on architectures with conditional moves.

gcc/ada/

	* gcc-interface/utils2.cc (nonbinary_modular_operation): Rewrite.
	Do not create signed types for subtraction, do not create types with
	partial precision, call fold_convert instead of convert throughout.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/utils2.cc | 91 ++++++++++-----------------------
 1 file changed, 28 insertions(+), 63 deletions(-)

diff --git a/gcc/ada/gcc-interface/utils2.cc b/gcc/ada/gcc-interface/utils2.cc
index 8fb86ab29e3..4b7e2739f6a 100644
--- a/gcc/ada/gcc-interface/utils2.cc
+++ b/gcc/ada/gcc-interface/utils2.cc
@@ -535,85 +535,50 @@ compare_fat_pointers (location_t loc, tree result_type, tree p1, tree p2)
 }
 
 /* Compute the result of applying OP_CODE to LHS and RHS, where both are of
-   type TYPE.  We know that TYPE is a modular type with a nonbinary
-   modulus.  */
+   TYPE.  We know that TYPE is a modular type with a nonbinary modulus.  */
 
 static tree
 nonbinary_modular_operation (enum tree_code op_code, tree type, tree lhs,
                              tree rhs)
 {
   tree modulus = TYPE_MODULUS (type);
-  unsigned int needed_precision = tree_floor_log2 (modulus) + 1;
-  unsigned int precision;
-  bool unsignedp = true;
-  tree op_type = type;
-  tree result;
+  unsigned precision = tree_floor_log2 (modulus) + 1;
+  tree op_type, result;
 
-  /* If this is an addition of a constant, convert it to a subtraction
-     of a constant since we can do that faster.  */
-  if (op_code == PLUS_EXPR && TREE_CODE (rhs) == INTEGER_CST)
-    {
-      rhs = fold_build2 (MINUS_EXPR, type, modulus, rhs);
-      op_code = MINUS_EXPR;
-    }
-
-  /* For the logical operations, we only need PRECISION bits.  For
-     addition and subtraction, we need one more and for multiplication we
-     need twice as many.  But we never want to make a size smaller than
-     our size. */
+  /* For the logical operations, we only need PRECISION bits.  For addition and
+     subtraction, we need one more, and for multiplication twice as many.  */
   if (op_code == PLUS_EXPR || op_code == MINUS_EXPR)
-    needed_precision += 1;
+    precision += 1;
   else if (op_code == MULT_EXPR)
-    needed_precision *= 2;
-
-  precision = MAX (needed_precision, TYPE_PRECISION (op_type));
+    precision *= 2;
 
-  /* Unsigned will do for everything but subtraction.  */
-  if (op_code == MINUS_EXPR)
-    unsignedp = false;
-
-  /* If our type is the wrong signedness or isn't wide enough, make a new
-     type and convert both our operands to it.  */
-  if (TYPE_PRECISION (op_type) < precision
-      || TYPE_UNSIGNED (op_type) != unsignedp)
+  /* If the type is not wide enough, make a new type of the needed precision
+     and convert modulus and operands to it.  Use a type with full precision
+     for its mode since operations are ultimately performed in the mode.  */
+  if (TYPE_PRECISION (type) < precision)
     {
-      /* Copy the type so we ensure it can be modified to make it modular.  */
-      op_type = copy_type (gnat_type_for_size (precision, unsignedp));
-      modulus = convert (op_type, modulus);
-      SET_TYPE_MODULUS (op_type, modulus);
-      TYPE_MODULAR_P (op_type) = 1;
-      lhs = convert (op_type, lhs);
-      rhs = convert (op_type, rhs);
+      const scalar_int_mode m = smallest_int_mode_for_size (precision);
+      op_type = gnat_type_for_mode (m, 1);
+      modulus = fold_convert (op_type, modulus);
+      lhs = fold_convert (op_type, lhs);
+      rhs = fold_convert (op_type, rhs);
     }
+  else
+    op_type = type;
 
   /* Do the operation, then we'll fix it up.  */
   result = fold_build2 (op_code, op_type, lhs, rhs);
 
-  /* For multiplication, we have no choice but to do a full modulus
-     operation.  However, we want to do this in the narrowest
-     possible size.  */
-  if (op_code == MULT_EXPR)
-    {
-      /* Copy the type so we ensure it can be modified to make it modular.  */
-      tree div_type = copy_type (gnat_type_for_size (needed_precision, 1));
-      modulus = convert (div_type, modulus);
-      SET_TYPE_MODULUS (div_type, modulus);
-      TYPE_MODULAR_P (div_type) = 1;
-      result = convert (op_type,
-			fold_build2 (TRUNC_MOD_EXPR, div_type,
-				     convert (div_type, result), modulus));
-    }
+  /* Unconditionally add the modulus to the result for a subtraction, this gets
+     rid of all its peculiarities by cancelling out the addition of the binary
+     modulus in the case where the subtraction wraps around in OP_TYPE, and may
+     even generate better code on architectures with conditional moves.  */
+  if (op_code == MINUS_EXPR)
+    result = fold_build2 (PLUS_EXPR, op_type, result, modulus);
 
-  /* For subtraction, add the modulus back if we are negative.  */
-  else if (op_code == MINUS_EXPR)
-    {
-      result = gnat_protect_expr (result);
-      result = fold_build3 (COND_EXPR, op_type,
-			    fold_build2 (LT_EXPR, boolean_type_node, result,
-					 build_int_cst (op_type, 0)),
-			    fold_build2 (PLUS_EXPR, op_type, result, modulus),
-			    result);
-    }
+  /* For a multiplication, we have no choice but to use a modulo operation.  */
+  if (op_code == MULT_EXPR)
+    result = fold_build2 (TRUNC_MOD_EXPR, op_type, result, modulus);
 
   /* For the other operations, subtract the modulus if we are >= it.  */
   else
@@ -627,7 +592,7 @@ nonbinary_modular_operation (enum tree_code op_code, tree type, tree lhs,
 			    result);
     }
 
-  return convert (type, result);
+  return fold_convert (type, result);
 }
 
 /* This page contains routines that implement the Ada semantics with regard
-- 
2.43.2


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2024-05-21  7:31 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-21  7:30 [COMMITTED 01/31] ada: Add new Mingw task priority mapping Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 02/31] ada: Follow-up fix to previous change for Text_Ptr Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 03/31] ada: Remove trailing NUL in minimal expansion of Put_Image attribute Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 04/31] ada: Remove conversion from String_Id to String and back to String_Id Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 05/31] ada: Do not leak tagged type names when Discard_Names is enabled Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 06/31] ada: Update documentation of warning messages Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 07/31] ada: Fix index entry for an implemented AI feature Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 08/31] ada: Sort list of implemented Ada 2012 features Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 09/31] ada: Fix formatting in " Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 10/31] ada: Remove some explicit yields in tasking run-time Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 11/31] ada: Simplify management of scopes while inlining Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 12/31] ada: Add elaboration switch tags to info messages Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 13/31] ada: Remove useless trampolines caused by Unchecked_Conversion Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 14/31] ada: Remove duplicate statement Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 15/31] ada: Fix layout in a list of aspects Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 16/31] ada: Missing constraint check for initial value of object with address clause Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 17/31] ada: Fix oversight in previous change Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 18/31] ada: Fix small inaccuracy for Size attribute applied to objects Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 19/31] ada: Fix crash on aliased constant with packed array type and -g switch Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 20/31] ada: Fix assembler error for gigantic library-level object on 64-bit Windows Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 21/31] ada: Remove unused dependencies from gnatbind object list Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 22/31] ada: Avoid temporary for conditional expression of discriminated record type Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 23/31] ada: Follow-up adjustment to earlier fix in Build_Allocate_Deallocate_Proc Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 24/31] ada: Minor typo fix in comment Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 25/31] ada: Fix crash with aliased array and if expression Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 26/31] ada: Fix strict aliasing violation in parameter passing Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 27/31] ada: Make detection of useless copy for return more robust Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 28/31] ada: Fix strict aliasing violation in parameter passing (continued) Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 29/31] ada: Fix internal error on discriminated record with Atomic aspect in Ada 2022 Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 30/31] ada: Simplify test for propagation of attributes to subtypes Marc Poulhiès
2024-05-21  7:30 ` [COMMITTED 31/31] ada: Streamline implementation of simple nonbinary modular operations Marc Poulhiès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).