[Ada] Use of Suppress_Initialization with pragma Thread_Local_Storage
authorHristian Kirtchev <kirtchev@adacore.com>
Wed, 14 Nov 2018 11:42:05 +0000 (11:42 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 14 Nov 2018 11:42:05 +0000 (11:42 +0000)
commitb6eb7548cf927d541477146a195e2bdd25900012
tree6cde88a9fef0bb3fc1d1642579f857289fc5d019
parent1fc75ecf626b05733544bf9f67fb59fcd7322395
[Ada] Use of Suppress_Initialization with pragma Thread_Local_Storage

This patch allows for aspect/pragma Suppress_Initialization to be an
acceptable form of missing initialization with respect to the semantics
of pragma Thread_Local_Storage.

------------
-- Source --
------------

--  gnat.adc

pragma Initialize_Scalars;

--  pack.ads

with System;

package Pack is
   Addr : System.Address
      with Thread_Local_Storage, Suppress_Initialization;
end Pack;

-----------------
-- Compilation --
-----------------

$ gcc -c pack.ads

2018-11-14  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

* freeze.adb (Check_Pragma_Thread_Local_Storage): New routine. A
variable with suppressed initialization has no initialization
for purposes of the pragma.
(Freeze_Object_Declaration): Remove variable
Has_Default_Initialization as it is no longer used. Use routine
Check_Pragma_Thread_Local_Storage to verify the semantics of
pragma Thread_Local_Storage.

From-SVN: r266129
gcc/ada/ChangeLog
gcc/ada/freeze.adb