2 ! Test the patch for PR29992. The standard requires that a
3 ! module procedure be contained in the same scope as the
4 ! interface or is use associated to it(12.3.2.1).
6 ! Contributed by Daniel Franke <franke.daniel@gmail.com>
13 SUBROUTINE bar_init_set_int(this
, value
)
14 TYPE(foo
), INTENT(out
) :: this
15 integer, intent(in
) :: value
21 USE class_foo_type
, ONLY
: foo
, bar_init_set_int
24 MODULE PROCEDURE foo_init_default
! { dg-error "is not a module procedure" }
28 MODULE PROCEDURE bar_init_default
, bar_init_set_int
! These are OK
32 SUBROUTINE foo_init_default(this
)
33 USE class_foo_type
, ONLY
: foo
34 TYPE(foo
), INTENT(out
) :: this
39 SUBROUTINE bar_init_default(this
)
40 TYPE(foo
), INTENT(out
) :: this