]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Use of Suppress_Initialization with pragma Thread_Local_Storage
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Nov 2018 11:42:05 +0000 (11:42 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Nov 2018 11:42:05 +0000 (11:42 +0000)
commit149a4b48882d701f5947bcad565b443f7dc862a6
tree6cde88a9fef0bb3fc1d1642579f857289fc5d019
parentcb57c12b8267f046a803ac62259ac163a2950e6b
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266129 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/freeze.adb