2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gnat.dg / nested_proc2.adb
blobb5349563a9955fc92154008440b60ffda12d4e69
1 -- { dg-do compile }
2 -- { dg-options "-gnatws" }
4 procedure Nested_Proc2 is
6 type Arr is array(1..2) of Integer;
8 type Rec is record
9 Data : Arr;
10 end record;
12 From : Rec;
13 Index : Integer;
15 function F (X : Arr) return Integer is
16 begin
17 return 0;
18 end;
20 procedure Test is
21 begin
22 Index := F (From.Data);
23 If Index /= 0 then
24 raise Program_Error;
25 end if;
26 end;
28 begin
29 Test;
30 end;