[Ada] Suppress Initialize_Scalars for Persistent_BSS
authorBob Duff <duff@adacore.com>
Tue, 20 Aug 2019 09:49:51 +0000 (09:49 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 20 Aug 2019 09:49:51 +0000 (09:49 +0000)
commit9740c2446478d5d1e85015f3d40402b8ca1b061a
treecacf682c71c78586d181e9209a1988913459fa0d
parente0ea5d16a80b1216387ba00c27ee2ea0e808ac42
[Ada] Suppress Initialize_Scalars for Persistent_BSS

If a variable has pragma Persistent_BSS, the compiler now automatically
suppresses implicit initializations caused by Initialize_Scalars and
Normalize_Scalars. Variables with Persistent_BSS cannot be initialized,
and previously a pragma Suppress_Initialization was required before the
pragma Persistent_BSS.

2019-08-20  Bob Duff  <duff@adacore.com>

gcc/ada/

* sem_prag.adb (Persistent_BSS): If an initialization is present
because of Initialize_Scalars or Normalize_Scalars, generate an
implicit pragma Suppress_Initialization to remove that, because
initialization is not allowed for these variables. Other
initializations remain illegal.

From-SVN: r274732
gcc/ada/ChangeLog
gcc/ada/sem_prag.adb