OSDN Git Service

* gcc-interface/trans.c (Call_to_gnu): Robustify test for function case
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gnat.dg / atomic3.adb
1 -- { dg-do compile }
2
3 procedure 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
22 begin
23    X := Get_Array;
24 end;