PR debug/66535
[official-gcc.git] / gcc / testsuite / gnat.dg / vect10.adb
blob62b9424eec1bd7d2cac0854e174f9129e8bdf10f
1 -- { dg-do compile }
2 -- { dg-options "-w" }
4 package body Vect10 is
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);
12 procedure Proc
13 (F : in Rec_Vector;
14 First_Index : in Natural;
15 Last_Index : in Natural;
16 Result : out Unit)
18 begin
19 Result := (others => 0.0);
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;
30 end Vect10;