Merge from mainline.
[official-gcc.git] / gcc / testsuite / gfortran.dg / interface_2.f90
blob4a813d084823e33c1388ee7a07fef5f8a7c85bdc
1 ! { dg-do compile }
2 ! PR fortran/24545
3 MODULE Compare_Float_Numbers
5 IMPLICIT NONE
7 INTERFACE Compare_Float
8 MODULE PROCEDURE Compare_Float_Single
9 END INTERFACE Compare_Float
11 INTERFACE OPERATOR (.EqualTo.)
12 MODULE PROCEDURE Is_Equal_To_Single
13 END INTERFACE OPERATOR (.EqualTo.)
15 CONTAINS
17 FUNCTION Is_Equal_To_Single(x, y) RESULT(Equal_To)
18 REAL(4), INTENT(IN) :: x, y
19 LOGICAL :: Equal_To
20 Equal_To = .true.
21 END FUNCTION Is_Equal_To_Single
23 FUNCTION Compare_Float_Single(x, y) RESULT(Compare)
24 REAL(4), INTENT(IN) :: x, y
25 LOGICAL :: Compare
26 Compare = .true.
27 END FUNCTION Compare_Float_Single
29 END MODULE Compare_Float_Numbers
31 ! { dg-final { cleanup-modules "Compare_Float_Numbers" } }