type Object (<>) is limited private;
type Name is access Object;
-procedure Ada.Unchecked_Deallocation (X : in out Name);
+procedure Ada.Unchecked_Deallocation (X : in out Name) with
+ Depends => (X => null, -- X on exit does not depend on its input value
+ null => X), -- X's input value has no effect
+ Post => X = null; -- X's output value is null
pragma Preelaborate (Unchecked_Deallocation);
pragma Import (Intrinsic, Ada.Unchecked_Deallocation);
Check_Restriction (No_Local_Allocators, N);
end if;
- if SPARK_Mode = On
- and then Comes_From_Source (N)
- and then not Is_OK_Volatile_Context (Context => Parent (N),
- Obj_Ref => N,
- Check_Actuals => False)
- then
- Error_Msg_N
- ("allocator cannot appear in this context (SPARK RM 7.1.3(10))", N);
- end if;
-
if Serious_Errors_Detected > Sav_Errs then
Set_Error_Posted (N);
Set_Etype (N, Any_Type);
begin
case Nkind (N) is
- when N_Allocator =>
- if not Is_OK_Volatile_Context (Context => Parent (N),
- Obj_Ref => N,
- Check_Actuals => True)
- then
- Error_Msg_N
- ("allocator cannot appear in this context"
- & " (SPARK RM 7.1.3(10))", N);
- end if;
-
- return Skip;
-
-- Do not consider nested function calls because they have
-- already been processed during their own resolution.