OSDN Git Service

b5111875924781c01f53b2b03b110e7813d85290
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gnat.dg / vect2.ads
1 with Vect2_Pkg;
2
3 package Vect2 is
4
5    -- Unconstrained array types are vectorizable, possibly with special
6    -- help for the programmer
7    type Varray is array (Positive range <>) of Long_Float;
8    for Varray'Alignment use 16;
9
10    function "+" (X, Y : Varray) return Varray;
11    procedure Add (X, Y : not null access Varray; R : not null access Varray);
12
13
14    -- Constrained array types are vectorizable
15    type Sarray is array (Positive(1) .. Positive(4)) of Long_Float;
16    for Sarray'Alignment use 16;
17
18    function "+" (X, Y : Sarray) return Sarray;
19    procedure Add (X, Y : not null access Sarray; R : not null access Sarray);
20
21
22    type Darray1 is array (Positive(1) .. Vect2_Pkg.N) of Long_Float;
23    for Darray1'Alignment use 16;
24
25    function "+" (X, Y : Darray1) return Darray1;
26    procedure Add (X, Y : not null access Darray1; R : not null access Darray1);
27
28
29    type Darray2 is array (Vect2_Pkg.K .. Positive(4)) of Long_Float;
30    for Darray2'Alignment use 16;
31
32    function "+" (X, Y : Darray2) return Darray2;
33    procedure Add (X, Y : not null access Darray2; R : not null access Darray2);
34
35
36    type Darray3 is array (Vect2_Pkg.K .. Vect2_Pkg.N) of Long_Float;
37    for Darray3'Alignment use 16;
38
39    function "+" (X, Y : Darray3) return Darray3;
40    procedure Add (X, Y : not null access Darray3; R : not null access Darray3);
41
42 end Vect2;