+2019-08-12 Gary Dismukes <dismukes@adacore.com>
+
+ * sem_prag.adb (Analyze_Pragma, Pragma_Suppress_Initialization):
+ For private types, set the Suppress_Initialization flag on the
+ Full_View of the entity rather than the entity's base type.
+
2019-08-12 Yannick Moy <moy@adacore.com>
* aspects.adb, aspects.ads (Aspect_No_Caching): New aspect.
Error_Pragma_Arg
("argument of pragma% cannot be an incomplete type", Arg1);
else
- Set_Suppress_Initialization (Full_View (Base_Type (E)));
+ Set_Suppress_Initialization (Full_View (E));
end if;
-- For first subtype, set flag on base type
+2019-08-12 Gary Dismukes <dismukes@adacore.com>
+
+ * gnat.dg/suppress_initialization2.adb,
+ gnat.dg/suppress_initialization2.ads: New testcase.
+
2019-08-12 Yannick Moy <moy@adacore.com>
* gnat.dg/no_caching.adb, gnat.dg/no_caching.ads: New testcase.
--- /dev/null
+package body Suppress_Initialization2 is
+
+ procedure Dummy is null;
+
+end Suppress_Initialization2;
--- /dev/null
+pragma Initialize_Scalars;
+
+with System;
+
+package Suppress_Initialization2 is
+
+ subtype Sub_Addr is System.Address with Suppress_Initialization;
+
+ O : Sub_Addr with Thread_Local_Storage; -- OK: no error should be reported
+
+ procedure Dummy;
+
+end Suppress_Initialization2;