1-- { dg-do compile } 2-- { dg-options "-w" } 3 4package body Vect10 is 5 6 procedure Add_Mul (X : in out Unit; Y, Z : in Unit) is 7 begin 8 X := X + Y * Z; 9 end; 10 pragma Inline_Always (Add_Mul); 11 12 procedure Proc 13 (F : in Rec_Vector; 14 First_Index : in Natural; 15 Last_Index : in Natural; 16 Result : out Unit) 17 is 18 begin 19 Result := (others => 0.0); 20 21 for I in First_Index + 1 .. Last_Index loop 22 declare 23 Local : Rec renames F (I); 24 begin 25 Add_Mul (Result, Local.Val, Local.Val); 26 end; 27 end loop; 28 end; 29 30end Vect10; 31