PR target/84336
[official-gcc.git] / gcc / testsuite / gnat.dg / array4.adb
blob048698a54e1d4131ce70b96cbf1a378ce87fca16
1 -- { dg-do run }
3 procedure Array4 is
5 type A is array (1..5) of Integer;
6 f : constant A := (1, 2, 3, 4, 5);
8 i1 : integer renames f(1);
9 i2 : integer renames f(2);
10 i3 : integer renames f(3);
11 i4 : integer renames f(4);
12 i5 : integer renames f(5);
14 procedure Link_Failure;
15 pragma Import (C, Link_Failure);
17 begin
18 if i1 /= 1 then
19 Link_Failure;
20 end if;
22 if i2 /= 2 then
23 Link_Failure;
24 end if;
26 if i3 /= 3 then
27 Link_Failure;
28 end if;
30 if i4 /= 4 then
31 Link_Failure;
32 end if;
34 if i5 /= 5 then
35 Link_Failure;
36 end if;
37 end;