1! { dg-do compile } 2! 3! PR fortran/63744 4! duplicate use rename used to be rejected when the target name 5! was that of the current program unit 6! 7! Original testcase from Roger Ferrer Ibanez <roger.ferrer@bsc.es> 8 9MODULE MOO 10 INTEGER :: A, B, C, D, E, F, G, H, I 11END MODULE MOO 12 13SUBROUTINE S 14 USE MOO, ONLY: X => A, X => A 15END SUBROUTINE S 16 17SUBROUTINE T 18 USE MOO, ONLY: X => B 19 USE MOO, ONLY: X => B 20END SUBROUTINE T 21 22SUBROUTINE C 23 USE MOO, ONLY: C ! { dg-error "is also the name of the current program unit" } 24END SUBROUTINE C 25 26SUBROUTINE D 27 USE MOO, ONLY: X => D 28END SUBROUTINE D 29 30SUBROUTINE E 31 USE MOO, ONLY: X => E, X => E 32END SUBROUTINE E 33 34SUBROUTINE F 35 USE MOO, ONLY: X => F 36 USE MOO, ONLY: X => F 37END SUBROUTINE F 38 39SUBROUTINE X 40 USE MOO, ONLY: X => G ! { dg-error "is also the name of the current program unit" } 41END SUBROUTINE X 42 43SUBROUTINE Y 44 USE MOO, ONLY: Y => H ! { dg-error "is also the name of the current program unit" } 45END SUBROUTINE Y 46 47SUBROUTINE Z 48 USE MOO, ONLY: Z => I, Z => I ! { dg-error "is also the name of the current program unit" } 49END SUBROUTINE Z 50 51