c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / gnat.dg / prot7.adb
blob5f4ec1ee97a87f1a344cb470aab8aabbf608f4c9
1 -- { dg-do compile }
2 -- { dg-skip-if "not lock free" { hppa-*-* } }
3 -- { dg-options "-gnatwa -gnatVa" }
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;
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;