3 ! Check whether MODULE PROCEDUREs are properly treated
4 ! They need to be contained in a procedure, i.e. an
5 ! interface in another procedure is invalid; they may, however,
6 ! come from a use-associated procedure.
7 ! (The PROCEDURE statement allows also for non-module procedures
8 ! if there is an explicit interface.)
21 end interface gen_incl
38 module procedure ok1
, ok2_a
41 subroutine ok2_a(a
,b
,c
)
49 module procedure gen_incl
! { dg-error "Cannot change attributes" }
50 end interface gen_wrong_0
56 module procedure wrong1
! { dg-error "is not a module procedure" }
57 end interface gen_wrong_1
63 module procedure wrong2
! { dg-error "Cannot change attributes" }
64 end interface gen_wrong_2
70 module procedure wrong3
! { dg-error "Cannot change attributes" }
71 end interface gen_wrong_3
79 end subroutine wrong_a
82 module procedure wrong_a
! { dg-error "is not a module procedure" }
83 end interface gen_wrong_4
88 external wrong_b
! { dg-error "has no explicit interface" }
90 module procedure wrong_b
! wrong, see above
91 end interface gen_wrong_5
96 external wrong_c
! { dg-error "has no explicit interface" }
99 module procedure wrong_c
! wrong, see above
100 end interface gen_wrong_6
105 ! { dg-final { cleanup-modules "a inclmod" } }