This patch adds SPARK annotations to subprograms from
System.Address_To_Access_Conversions. To_Pointer is considered to have
no global items, if the returned value has no aliases. To_Address is
forbidden in SPARK because addresses are not handled.
gcc/ada/
* libgnat/s-atacco.ads (To_Pointer): Add Global => null.
(To_Address): Add SPARK_Mode => Off.
-- optimizations that may cause unexpected results based on the assumption
-- of no strict aliasing.
- function To_Pointer (Value : Address) return Object_Pointer;
- function To_Address (Value : Object_Pointer) return Address;
+ function To_Pointer (Value : Address) return Object_Pointer with
+ Global => null;
+ function To_Address (Value : Object_Pointer) return Address with
+ SPARK_Mode => Off;
pragma Import (Intrinsic, To_Pointer);
pragma Import (Intrinsic, To_Address);