From c4c768ddedd306d53d4b32166816c974c14e0f61 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 15 May 2012 11:34:10 +0200 Subject: [PATCH] [multiple changes] 2012-05-15 Geert Bosch * sem_ch9.adb (Allows_Lock_Free_Implementation): out or in out parameters can be access types as well, not just scalar types, so relax the test to Is_Elementary_Type. 2012-05-15 Bob Duff * s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body with pragma No_Body. (Xyz): Remove Xyz, which is apparently unnecessary. 2012-05-15 Tristan Gingold * a-calend-vms.adb: Complete previous change. 2012-05-15 Bob Duff * s-win32.ads: Minor comment fix. * s-osprim-mingw.adb: Minor editing. From-SVN: r187508 --- gcc/ada/ChangeLog | 21 +++++++++++++++++++++ gcc/ada/a-calend-vms.adb | 15 +++++++++++++-- gcc/ada/s-atacco.adb | 12 +++++------- gcc/ada/s-atacco.ads | 14 +------------- gcc/ada/s-osprim-mingw.adb | 14 ++++++-------- gcc/ada/s-win32.ads | 4 ++-- gcc/ada/sem_ch9.adb | 4 ++-- 7 files changed, 50 insertions(+), 34 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7091154a823..33d66c63018 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,24 @@ +2012-05-15 Geert Bosch + + * sem_ch9.adb (Allows_Lock_Free_Implementation): out or in out + parameters can be access types as well, not just scalar types, + so relax the test to Is_Elementary_Type. + +2012-05-15 Bob Duff + + * s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body + with pragma No_Body. + (Xyz): Remove Xyz, which is apparently unnecessary. + +2012-05-15 Tristan Gingold + + * a-calend-vms.adb: Complete previous change. + +2012-05-15 Bob Duff + + * s-win32.ads: Minor comment fix. + * s-osprim-mingw.adb: Minor editing. + 2012-05-15 Robert Dewar * exp_ch9.adb, sem_ch9.adb, sem_ch13.adb: Minor reformatting. diff --git a/gcc/ada/a-calend-vms.adb b/gcc/ada/a-calend-vms.adb index bb8faaf9790..dc7c23e7532 100644 --- a/gcc/ada/a-calend-vms.adb +++ b/gcc/ada/a-calend-vms.adb @@ -915,8 +915,19 @@ package body Ada.Calendar is -- Step 1: Split the input time Formatting_Operations.Split - (T, Year, Month, tm_day, Day_Secs, - tm_hour, tm_min, Second, Sub_Sec, Leap_Sec, True, 0); + (Date => T, + Year => Year, + Month => Month, + Day => tm_day, + Day_Secs => Day_Secs, + Hour => tm_hour, + Minute => tm_min, + Second => Second, + Sub_Sec => Sub_Sec, + Leap_Sec => Leap_Sec, + Use_TZ => True, + Is_Historic => False, + Time_Zone => 0); -- Step 2: Correct the year and month diff --git a/gcc/ada/s-atacco.adb b/gcc/ada/s-atacco.adb index ccd5ffd5a47..f1998fa71f8 100644 --- a/gcc/ada/s-atacco.adb +++ b/gcc/ada/s-atacco.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2009 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -29,10 +29,8 @@ -- -- ------------------------------------------------------------------------------ --- This is a dummy version of this package that is needed to solve bootstrap --- problems when compiling a library that doesn't require s-atacco.adb from --- a compiler that contains one. +-- This package does not require a body, since it is a package renaming. We +-- provide a dummy file containing a No_Body pragma so that previous versions +-- of the body (which did exist) will not interfere. -package body System.Address_To_Access_Conversions is - -end System.Address_To_Access_Conversions; +pragma No_Body; diff --git a/gcc/ada/s-atacco.ads b/gcc/ada/s-atacco.ads index 031240ed8a3..fb6232d14ae 100644 --- a/gcc/ada/s-atacco.ads +++ b/gcc/ada/s-atacco.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2012, Free Software Foundation, 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,24 +38,12 @@ generic package System.Address_To_Access_Conversions is pragma Preelaborate; - pragma Elaborate_Body; - -- This pragma Elaborate_Body is there to ensure the requirement of what is - -- at the moment a dummy null body. The reason this null body is there is - -- that we used to have a real body, and it causes bootstrap problems with - -- old compilers if we try to remove the corresponding file. pragma Compile_Time_Warning (Object'Unconstrained_Array, "Object is unconstrained array type" & ASCII.LF & "To_Pointer results may not have bounds"); - -- Capture constrained status, suppressing warnings, since this is - -- an obsolescent feature to use Constrained in this way (RM J.4). - - pragma Warnings (Off); - Xyz : Boolean := Object'Constrained; - pragma Warnings (On); - type Object_Pointer is access all Object; for Object_Pointer'Size use Standard'Address_Size; diff --git a/gcc/ada/s-osprim-mingw.adb b/gcc/ada/s-osprim-mingw.adb index 6c05b524fb5..a658f71f318 100644 --- a/gcc/ada/s-osprim-mingw.adb +++ b/gcc/ada/s-osprim-mingw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2012, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -50,9 +50,6 @@ package body System.OS_Primitives is -- libgnarl.dll. The indirection level introduced here has no measurable -- penalties. - -- Note that access variables below must not be declared as constant - -- otherwise the compiler optimization will remove this indirect access. - type DA is access all Duration; -- Use to have indirect access to multi-word variables @@ -129,9 +126,9 @@ package body System.OS_Primitives is Long_Long_Float (TFA.all)); -- If we have a shift of more than Max_Shift seconds we resynchronize - -- the Clock. This is probably due to a manual Clock adjustment, an - -- DST adjustment or an NTP synchronisation. And we want to adjust the - -- time for this system (non-monotonic) clock. + -- the Clock. This is probably due to a manual Clock adjustment, a DST + -- adjustment or an NTP synchronisation. And we want to adjust the time + -- for this system (non-monotonic) clock. if abs (Elap_Secs_Sys - Elap_Secs_Tick) > Max_Shift then Get_Base_Time; @@ -179,7 +176,7 @@ package body System.OS_Primitives is -- a performance counter which has a better precision than the Win32 -- time API. - -- Try at most 10th times to reach the best synchronisation (below 1 + -- Try at most 10 times to reach the best synchronisation (below 1 -- millisecond) otherwise the runtime will use the best value reached -- during the runs. @@ -239,6 +236,7 @@ package body System.OS_Primitives is function Monotonic_Clock return Duration is Current_Ticks : aliased LARGE_INTEGER; Elap_Secs_Tick : Duration; + begin if QueryPerformanceCounter (Current_Ticks'Access) = Win32.FALSE then return 0.0; diff --git a/gcc/ada/s-win32.ads b/gcc/ada/s-win32.ads index 37a6f3d6042..d3343252f16 100644 --- a/gcc/ada/s-win32.ads +++ b/gcc/ada/s-win32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2008-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2012, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -46,7 +46,7 @@ package System.Win32 is -- The LARGE_INTEGER type is actually a fixed point type -- that only can represent integers. The reason for this is -- easier conversion to Duration or other fixed point types. - -- (See Operations.Clock) + -- (See System.OS_Primitives.Clock, mingw and rtx versions.) type LARGE_INTEGER is delta 1.0 range -2.0**63 .. 2.0**63 - 1.0; diff --git a/gcc/ada/sem_ch9.adb b/gcc/ada/sem_ch9.adb index 7ce20b5f85c..76db08c5e4f 100644 --- a/gcc/ada/sem_ch9.adb +++ b/gcc/ada/sem_ch9.adb @@ -82,7 +82,7 @@ package body Sem_Ch9 is -- May reference only one protected component -- May not reference non-constant entities outside the protected -- subprogram scope. - -- May not reference non-scalar out parameters + -- May not reference non-elementary out parameters -- May not contain loop statements or procedure calls -- Function calls and attribute references must be static -- @@ -306,7 +306,7 @@ package body Sem_Ch9 is elsif Ekind_In (Id, E_Out_Parameter, E_In_Out_Parameter) - and then not Is_Scalar_Type (Etype (Id)) + and then not Is_Elementary_Type (Etype (Id)) and then Scope_Within_Or_Same (Scope (Id), Sub_Id) then return Abandon; -- 2.30.2