summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/atomic4.ads
blob: a0e95bbff467885707425865a56091e935eef037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
with Ada.Containers.Vectors;

package Atomic4 is

   type String is limited null record;
   type String_Access is access all String;
   pragma Atomic (String_Access);

   type Reference is record
      Text : String_Access;
   end record;

   package Reference_Vectors is
     new Ada.Containers.Vectors (Natural, Reference);

   type Reader is tagged limited record
      Current_Reference : Reference;
      Reference_Stack   : Reference_Vectors.Vector;
   end record;

   procedure Next (Self : in out Reader'Class);

end Atomic4;