1! { dg-do compile }
2! { dg-options "-O -ftree-vectorize" }
3! { dg-additional-options "-mvsx" { target powerpc*-*-* } }
4integer, parameter :: a=3
5  integer , dimension(a,a) :: b
6  logical, dimension(a,a) :: c
7  do i=0,1
8     b = ltoi(c)
9     do j=0,if
10        if (anymatmul(b) /= 0) then
11        end if
12     end do
13  end do
14contains
15  elemental function ltoi(d)
16    logical, intent(in) :: d
17    if (d) then
18       ltoi = 1
19    else
20       ltoi = 0
21    end if
22  end
23end
24