1! { dg-do compile } 2! Test the fix for PR42481, in which 'sub' was not recognised as 3! a generic interface. 4! 5! Contributed by William Mitchell < william.mitchell@nist.gov> 6! 7module mod1 8contains 9 subroutine sub(x, chr) 10 real x 11 character(8) chr 12 if (trim (chr) .ne. "real") call abort 13 if (int (x) .ne. 1) call abort 14 end subroutine sub 15end module mod1 16 17module mod2 18 use mod1 19 interface sub 20 module procedure sub, sub_int 21 end interface sub 22contains 23 subroutine sub_int(i, chr) 24 character(8) chr 25 integer i 26 if (trim (chr) .ne. "integer") call abort 27 if (i .ne. 1) call abort 28 end subroutine sub_int 29end module mod2 30 31program prog 32 use mod1 33 use mod2 34 call sub(1, "integer ") 35 call sub(1.0, "real ") 36end program prog 37