1-- { dg-do compile } 2-- { dg-options "-gnatws" } 3 4procedure Nested_Proc2 is 5 6 type Arr is array(1..2) of Integer; 7 8 type Rec is record 9 Data : Arr; 10 end record; 11 12 From : Rec; 13 Index : Integer; 14 15 function F (X : Arr) return Integer is 16 begin 17 return 0; 18 end; 19 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; 27 28begin 29 Test; 30end; 31