PR middle-end/77674
[official-gcc.git] / gcc / testsuite / gfortran.dg / generic_8.f90
blobc84396be8ac295bf4cc4fbe81cee0455864cdf9c
1 ! { dg-do compile }
2 ! Tests the fix for PR29837, in which the following valid code
3 ! would emit an error because of mistaken INTENT; the wrong
4 ! specific interface would be used for the comparison.
6 ! Contributed by
8 MODULE M
9 IMPLICIT NONE
10 INTERFACE A
11 MODULE PROCEDURE A1,A2
12 END INTERFACE
13 CONTAINS
15 SUBROUTINE A2(X)
16 INTEGER, INTENT(INOUT) :: X
17 END SUBROUTINE A2
19 SUBROUTINE A1(X,Y)
20 INTEGER, INTENT(IN) :: X
21 INTEGER, INTENT(OUT) :: Y
22 Y=X
23 END SUBROUTINE A1
25 SUBROUTINE T(X)
26 INTEGER, INTENT(IN) :: X(:)
27 INTEGER Y
28 CALL A(MAXVAL(X),Y)
29 END SUBROUTINE T
30 END MODULE M