1--  { dg-do compile }
2--  { dg-options "-gnatwa -gnatVa" }
3
4package body Prot7 is
5   protected body Default_Slice is
6      function Get return Instance_Pointer is
7      begin
8         return Default;
9      end Get;
10
11      procedure Set (
12        Discard : in out Boolean;
13        Slice   : in     Instance_Pointer
14      ) is
15      begin
16         Discard := Default /= null;
17         if not Discard then
18            Default := Slice;
19         end if;
20      end Set;
21   end Default_Slice;
22end Prot7;
23