1-- { dg-do compile { target i?86-*-* x86_64-*-* } } 2-- { dg-options "-O3 -msse2 -fdump-tree-optimized" } 3 4package body Vect11 is 5 6 function "+" (X, Y : Sarray) return Sarray is 7 R : Sarray; 8 begin 9 for I in Sarray'Range loop 10 R(I) := X(I) + Y(I); 11 end loop; 12 return R; 13 end; 14 15 procedure Add (X, Y : Sarray; R : out Sarray) is 16 begin 17 for I in Sarray'Range loop 18 R(I) := X(I) + Y(I); 19 end loop; 20 end; 21 22 procedure Add (X, Y : not null access Sarray; R : not null access Sarray) is 23 begin 24 for I in Sarray'Range loop 25 pragma Loop_Optimize (Ivdep); 26 R(I) := X(I) + Y(I); 27 end loop; 28 end; 29 30end Vect11; 31 32-- { dg-final { scan-tree-dump-not "goto" "optimized" } } 33