1! { dg-do compile } 2! 3! PR 47978: [OOP] Invalid INTENT in overriding TBP not detected 4! 5! Contributed by Salvatore Filippone <sfilippone@uniroma2.it> 6 7module foo_mod 8 type foo 9 contains 10 procedure, pass(f) :: bar => base_bar 11 end type foo 12contains 13 subroutine base_bar(f,j) 14 class(foo), intent(inout) :: f 15 integer, intent(in) :: j 16 end subroutine base_bar 17end module foo_mod 18 19module extfoo_mod 20 use foo_mod 21 type, extends(foo) :: extfoo 22 contains 23 procedure, pass(f) :: bar => ext_bar ! { dg-error "INTENT mismatch in argument" } 24 end type extfoo 25contains 26 subroutine ext_bar(f,j) 27 class(extfoo), intent(inout) :: f 28 integer, intent(inout) :: j 29 end subroutine ext_bar 30end module extfoo_mod 31