2 ! This tests various error messages for PROCEDURE declarations.
3 ! Contributed by Janus Weil <jaydub66@gmail.com>
10 subroutine sub2() bind(c
)
14 procedure(), public
, private
:: a
! { dg-error "was already specified" }
15 procedure(sub
),bind(C
) :: a2
! { dg-error "requires an interface with BIND.C." }
16 procedure(sub2
), public
, bind(c
, name
="myEF") :: e
, f
! { dg-error "Multiple identifiers provided with single NAME= specifier" }
17 procedure(sub2
), bind(C
, name
=""), pointer :: g
! { dg-error "may not have POINTER attribute" }
20 procedure(),public
:: h
! { dg-error "was already specified" }
35 procedure(z
) :: bar
! { dg-error "may not be generic" }
37 procedure(), allocatable
:: b
! { dg-error "PROCEDURE attribute conflicts with ALLOCATABLE attribute" }
38 procedure(), save:: c
! { dg-error "PROCEDURE attribute conflicts with SAVE attribute" }
40 procedure(dcos
) :: my1
41 procedure(amax0
) :: my2
! { dg-error "not allowed in PROCEDURE statement" }
43 procedure(),pointer:: ptr
! { dg-error "not yet implemented" }
46 procedure(),pointer:: p
! { dg-error "not yet implemented" }
53 procedure(f
) :: q
! { dg-error "may not be a statement function" }
54 procedure(oo
) :: p
! { dg-error "must be explicit" }
60 subroutine b() bind(C
)
63 procedure(b
), bind(c
,name
="hjj") :: a
! { dg-error "may not have BIND.C. attribute with NAME" }
64 procedure(c
),intent(in
):: c
! { dg-error "PROCEDURE attribute conflicts with INTENT attribute" }
74 entry abc2(x
) ! { dg-error "PROCEDURE attribute conflicts with ENTRY attribute" }