1! { dg-do compile }
2!
3! PR 41733: Proc-pointer conformance checks: Elemental-proc-ptr => non-elemental-procedure
4!
5! Contributed by James Van Buskirk
6
7  implicit none
8  procedure(my_dcos), pointer :: f ! { dg-error "Procedure pointer 'f' at .1. shall not be elemental" }
9  f => my_dcos           ! { dg-error "Nonintrinsic elemental procedure 'my_dcos' is invalid in procedure pointer assignment" }
10contains
11  real elemental function my_dcos(x)
12    real, intent(in) :: x
13    my_dcos = cos(x)
14  end function
15end
16