1! RUN: %python %S/test_errors.py %s %flang_fc1
2subroutine foo(A, B, P)
3  interface
4    real elemental function foo_elemental(x)
5      real, intent(in) :: x
6    end function
7    pure real function foo_pure(x)
8      real, intent(in) :: x
9    end function
10    real function foo_nonelemental(x)
11      real, intent(in) :: x
12    end function
13  end interface
14  real :: A(:), B(:)
15  procedure(sqrt), pointer :: P
16  !ERROR: Rank of dummy argument is 0, but actual argument has rank 1
17  A = P(B)
18  !ERROR: Procedure pointer 'p' associated with incompatible procedure designator 'foo_elemental': incompatible procedure attributes: Elemental
19  P => foo_elemental
20  P => foo_pure ! ok
21  !ERROR: PURE procedure pointer 'p' may not be associated with non-PURE procedure designator 'foo_nonelemental'
22  P => foo_nonelemental
23end subroutine
24