1-- { dg-do compile }
2
3procedure Atomic3 is
4
5   type Unsigned_32_T is mod 2 ** 32;
6   for Unsigned_32_T'Size use 32;
7
8   type Id_T is (One, Two, Three);
9
10   type Array_T is array (Id_T) of Unsigned_32_T;
11   pragma Atomic_Components (Array_T);
12
13   A : Array_T := (others => 0);
14
15   function Get_Array return Array_T is
16   begin
17      return A;
18   end;
19
20   X : Array_T;
21
22begin
23   X := Get_Array;
24end;
25