1! { dg-require-effective-target vect_double }
2
3PROGRAM test
4  REAL(8) :: f,dist(2)
5  dist = [1.0_8, 0.5_8]
6  if( f(1.0_8, dist) /= MINVAL(dist)) then
7    STOP 1
8  endif
9END PROGRAM test
10
11FUNCTION f( x, dist ) RESULT(s)
12  REAL(8) :: dist(2), x, s
13  s = MINVAL(dist)
14  IF( x < 0 ) s = -s
15END FUNCTION f
16
17