1! { dg-do compile }
2! { dg-options "-fcoarray=single" }
3!
4!
5  type t
6  end type t
7  type t2
8  end type t2
9contains
10elemental subroutine foo0(v) ! OK
11  class(t), intent(in) :: v
12end subroutine
13
14elemental subroutine foo1(w) ! { dg-error "Argument 'w' of elemental procedure at .1. cannot have the ALLOCATABLE attribute" }
15  class(t), allocatable, intent(in) :: w
16end subroutine
17
18elemental subroutine foo2(x) ! { dg-error "Argument 'x' of elemental procedure at .1. cannot have the POINTER attribute" }
19  class(t), pointer, intent(in) :: x
20end subroutine
21
22elemental subroutine foo3(y) ! { dg-error "Coarray dummy argument 'y' at .1. to elemental procedure" }
23  class(t2), intent(in) :: y[*]
24end subroutine
25
26elemental subroutine foo4(z) ! { dg-error "Argument 'z' of elemental procedure at .1. must be scalar" }
27  class(t), intent(in) :: z(:)
28end subroutine
29
30end
31