The processing of pragma Preelaborate_05 might cause inconsistent compiler behaviour when a given unit having the pragma appears in the dependencies of both an Ada 95 and and Ada 2005 unit in the same closure. This is addressed by making runtime units Preelaborate in all cases.
Tested on x86_64-pc-linux-gnu, committed on trunk 2014-06-11 Thomas Quinot <qui...@adacore.com> * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads, a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads, a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas Preelaborate_05 to just Preelaborate in runtime units, and similarly change Pure_05 to just Pure.
Index: a-astaco.ads =================================================================== --- a-astaco.ads (revision 211445) +++ a-astaco.ads (working copy) @@ -27,7 +27,7 @@ with Ada.Task_Identification; package Ada.Asynchronous_Task_Control is - pragma Preelaborate_05; + pragma Preelaborate; -- In accordance with Ada 2005 AI-362 pragma Unimplemented_Unit; Index: a-tags.ads =================================================================== --- a-tags.ads (revision 211445) +++ a-tags.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -37,7 +37,7 @@ with System.Storage_Elements; package Ada.Tags is - pragma Preelaborate_05; + pragma Preelaborate; -- In accordance with Ada 2005 AI-362 type Tag is private; Index: s-excdeb.ads =================================================================== --- s-excdeb.ads (revision 211445) +++ s-excdeb.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2006-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -39,7 +39,7 @@ package System.Exceptions_Debug is - pragma Preelaborate_05; + pragma Preelaborate; -- To let Ada.Exceptions "with" us and let us "with" Standard_Library package SSL renames System.Standard_Library; Index: a-tgdico.ads =================================================================== --- a-tgdico.ads (revision 211445) +++ a-tgdico.ads (working copy) @@ -25,7 +25,7 @@ function Ada.Tags.Generic_Dispatching_Constructor (The_Tag : Tag; Params : not null access Parameters) return T'Class; -pragma Preelaborate_05 (Generic_Dispatching_Constructor); +pragma Preelaborate (Generic_Dispatching_Constructor); pragma Import (Intrinsic, Generic_Dispatching_Constructor); -- Note: the reason that we use Preelaborate_05 here is so that this will -- compile fine during the normal build procedures. In Ada 2005 mode (which Index: a-stmaco.ads =================================================================== --- a-stmaco.ads (revision 211445) +++ a-stmaco.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -36,8 +36,7 @@ with Ada.Characters.Latin_1; package Ada.Strings.Maps.Constants is - pragma Preelaborate; - pragma Pure_05; + pragma Pure; -- In accordance with Ada 2005 AI-362 Control_Set : constant Character_Set; Index: a-except-2005.ads =================================================================== --- a-except-2005.ads (revision 211445) +++ a-except-2005.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -51,7 +51,7 @@ with System.Traceback_Entries; package Ada.Exceptions is - pragma Preelaborate_05; + pragma Preelaborate; -- In accordance with Ada 2005 AI-362. type Exception_Id is private; Index: s-except.ads =================================================================== --- s-except.ads (revision 211445) +++ s-except.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2006-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -33,7 +33,7 @@ package System.Exceptions is - pragma Preelaborate_05; + pragma Preelaborate; -- To let Ada.Exceptions "with" us and let us "with" Standard_Library ZCX_By_Default : constant Boolean; Index: a-taside.ads =================================================================== --- a-taside.ads (revision 211445) +++ a-taside.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -37,7 +37,7 @@ with System.Tasking; package Ada.Task_Identification is - pragma Preelaborate_05; + pragma Preelaborate; -- In accordance with Ada 2005 AI-362 type Task_Id is private; Index: a-dynpri.ads =================================================================== --- a-dynpri.ads (revision 211445) +++ a-dynpri.ads (working copy) @@ -17,7 +17,7 @@ with Ada.Task_Identification; package Ada.Dynamic_Priorities is - pragma Preelaborate_05; + pragma Preelaborate; -- In accordance with Ada 2005 AI-362 procedure Set_Priority Index: a-chahan.ads =================================================================== --- a-chahan.ads (revision 211445) +++ a-chahan.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -34,8 +34,7 @@ ------------------------------------------------------------------------------ package Ada.Characters.Handling is - pragma Preelaborate; - pragma Pure_05; + pragma Pure; -- In accordance with Ada 2005 AI-362 ---------------------------------------- Index: a-sytaco.ads =================================================================== --- a-sytaco.ads (revision 211445) +++ a-sytaco.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -38,7 +38,7 @@ with Ada.Finalization; package Ada.Synchronous_Task_Control is - pragma Preelaborate_05; + pragma Preelaborate; -- In accordance with Ada 2005 AI-362 type Suspension_Object is limited private; Index: s-stalib.ads =================================================================== --- s-stalib.ads (revision 211445) +++ s-stalib.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -54,7 +54,7 @@ package System.Standard_Library is pragma Warnings (Off); - pragma Preelaborate_05; + pragma Preelaborate; pragma Warnings (On); subtype Big_String is String (1 .. Positive'Last); Index: a-strmap.ads =================================================================== --- a-strmap.ads (revision 211445) +++ a-strmap.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -36,8 +36,7 @@ with Ada.Characters.Latin_1; package Ada.Strings.Maps is - pragma Preelaborate; - pragma Pure_05; + pragma Pure; -- In accordance with Ada 2005 AI-362 --------------------------------