PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_32.f90
blob9b1ed582bd16544910be42bc375d7527f07e5f35
1 ! { dg-do compile }
3 ! PR 41733: Proc-pointer conformance checks: Elemental-proc-ptr => non-elemental-procedure
5 ! Contributed by James Van Buskirk
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" }
10 contains
11 real elemental function my_dcos(x)
12 real, intent(in) :: x
13 my_dcos = cos(x)
14 end function
15 end