! File: acos_test.f90 ! Public domain 2005 James Van Buskirk ! gfortran doesn't like the characteristics of acos in ! this example; lf95 5.70f & CVF 6.6C3 do. module funcs implicit none contains function f(x,g) real, intent(in) :: x!(:) interface elemental function g(x) implicit none real, intent(in) :: x real g end function g end interface real f!(size(x)) f = g(x) end function f end module funcs program acos_test use funcs implicit none real x!(5) intrinsic acos x = 0 write(*,*) f(x,acos) end program acos_test