PR testsuite/41878
[official-gcc.git] / gcc / testsuite / gfortran.dg / vect / vect-5.f90
blob25eb88e2cabb8e2bdc2ed12a108381139932ad4b
1 ! { dg-require-effective-target vect_int }
3 Subroutine foo (N, M)
4 Integer N
5 Integer M
6 integer A(8,16)
7 integer B(8)
9 B = (/ 2, 3, 5, 7, 11, 13, 17, 23 /)
11 ! Unknown loop bound. J depends on I.
13 do I = 1, N
14 do J = I, M
15 A(J,2) = B(J)
16 end do
17 end do
19 do I = 1, N
20 do J = I, M
21 if (A(J,2) /= B(J)) then
22 call abort ()
23 endif
24 end do
25 end do
27 Return
28 end
31 program main
33 Call foo (16, 8)
35 stop
36 end
38 ! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
39 ! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align || {! vect_hw_misalign } } || {! vector_alignment_reachable} } } } }
40 ! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } }
41 ! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align } } } }
42 ! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } }
43 ! { dg-final { cleanup-tree-dump "vect" } }