blob: 4a813d084823e33c1388ee7a07fef5f8a7c85bdc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
! { dg-do compile }
! PR fortran/24545
MODULE Compare_Float_Numbers
IMPLICIT NONE
INTERFACE Compare_Float
MODULE PROCEDURE Compare_Float_Single
END INTERFACE Compare_Float
INTERFACE OPERATOR (.EqualTo.)
MODULE PROCEDURE Is_Equal_To_Single
END INTERFACE OPERATOR (.EqualTo.)
CONTAINS
FUNCTION Is_Equal_To_Single(x, y) RESULT(Equal_To)
REAL(4), INTENT(IN) :: x, y
LOGICAL :: Equal_To
Equal_To = .true.
END FUNCTION Is_Equal_To_Single
FUNCTION Compare_Float_Single(x, y) RESULT(Compare)
REAL(4), INTENT(IN) :: x, y
LOGICAL :: Compare
Compare = .true.
END FUNCTION Compare_Float_Single
END MODULE Compare_Float_Numbers
! { dg-final { cleanup-modules "Compare_Float_Numbers" } }
|