1! { dg-do run } 2! Tests the fix for the interface bit of PR29975, in which the 3! interfaces bl_copy were rejected as ambiguous, even though 4! they import different specific interfaces. 5! 6! Contributed by Joost VandeVondele <jv244@cam.ac.uk> and 7! simplified by Tobias Burnus <burnus@gcc.gnu.org> 8! 9SUBROUTINE RECOPY(N, c) 10 real, INTENT(IN) :: N 11 character(6) :: c 12 c = "recopy" 13END SUBROUTINE RECOPY 14 15MODULE f77_blas_extra 16PUBLIC :: BL_COPY 17INTERFACE BL_COPY 18 MODULE PROCEDURE SDCOPY 19END INTERFACE BL_COPY 20CONTAINS 21 SUBROUTINE SDCOPY(N, c) 22 INTEGER, INTENT(IN) :: N 23 character(6) :: c 24 c = "sdcopy" 25 END SUBROUTINE SDCOPY 26END MODULE f77_blas_extra 27 28MODULE f77_blas_generic 29INTERFACE BL_COPY 30 SUBROUTINE RECOPY(N, c) 31 real, INTENT(IN) :: N 32 character(6) :: c 33 END SUBROUTINE RECOPY 34END INTERFACE BL_COPY 35END MODULE f77_blas_generic 36 37program main 38 USE f77_blas_extra 39 USE f77_blas_generic 40 character(6) :: chr 41 call bl_copy(1, chr) 42 if (chr /= "sdcopy") STOP 1 43 call bl_copy(1.0, chr) 44 if (chr /= "recopy") STOP 2 45end program main 46