Debian Codegraph @

gcc/testsuite/gnat.dg/prot7.adb

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