2 ! PR fortran/65454 - accept both old and new-style relational operators
10 interface operator (==)
11 module procedure
:: my_cmp
13 interface operator (/=)
14 module procedure
:: my_cmp
16 interface operator (<=)
17 module procedure
:: my_cmp
19 interface operator (<)
20 module procedure
:: my_cmp
22 interface operator (>=)
23 module procedure
:: my_cmp
25 interface operator (>)
26 module procedure
:: my_cmp
29 elemental
function my_cmp (a
, b
) result (c
)
30 type(t1
), intent(in
) :: a
, b
42 interface operator (.eq
.)
43 module procedure
:: my_cmp
45 interface operator (.ne
.)
46 module procedure
:: my_cmp
48 interface operator (.le
.)
49 module procedure
:: my_cmp
51 interface operator (.lt
.)
52 module procedure
:: my_cmp
54 interface operator (.ge
.)
55 module procedure
:: my_cmp
57 interface operator (.gt
.)
58 module procedure
:: my_cmp
61 elemental
function my_cmp (a
, b
) result (c
)
62 type(t2
), intent(in
) :: a
, b
70 use m
, only
: operator(==), operator(/=)
71 use m
, only
: operator(<=), operator(<)
72 use m
, only
: operator(>=), operator(>)
77 use m_os
, only
: operator(==), operator(/=)
78 use m_os
, only
: operator(<=), operator(<)
79 use m_os
, only
: operator(>=), operator(>)
84 use m
, only
: operator(.eq
.), operator(.ne
.)
85 use m
, only
: operator(.le
.), operator(.lt
.)
86 use m
, only
: operator(.ge
.), operator(.gt
.)
91 use m_os
, only
: operator(.eq
.), operator(.ne
.)
92 use m_os
, only
: operator(.le
.), operator(.lt
.)
93 use m_os
, only
: operator(.ge
.), operator(.gt
.)
98 use m
, only
: operator(.eq
.), operator(.ne
.), operator(==), operator(/=)
99 use m
, only
: operator(.le
.), operator(.lt
.), operator(<=), operator(<)
100 use m
, only
: operator(.ge
.), operator(.gt
.), operator(>=), operator(>)
105 use m_os
, only
: operator(.eq
.), operator(.ne
.), operator(==), operator(/=)
106 use m_os
, only
: operator(.le
.), operator(.lt
.), operator(<=), operator(<)
107 use m_os
, only
: operator(.ge
.), operator(.gt
.), operator(>=), operator(>)
112 use m
, only
: operator(.eq
.), operator(.ne
.), operator(==), operator(/=)
113 use m
, only
: operator(.le
.), operator(.lt
.), operator(<=), operator(<)
114 use m
, only
: operator(.ge
.), operator(.gt
.), operator(>=), operator(>)
115 use m_os
, only
: operator(.eq
.), operator(.ne
.), operator(==), operator(/=)
116 use m_os
, only
: operator(.le
.), operator(.lt
.), operator(<=), operator(<)
117 use m_os
, only
: operator(.ge
.), operator(.gt
.), operator(>=), operator(>)
126 interface operator (==)
127 module procedure
:: my_cmp
130 elemental
function my_cmp (a
, b
) result (c
)
131 type(t3
), intent(in
) :: a
, b
138 use m_eq
, only
: operator(==), operator(.eq
.)
139 use m_eq
, only
: operator(/=) ! { dg-error "operator ./=. referenced" }
140 use m_eq
, only
: operator(.ne
.) ! { dg-error "operator .\.ne\.. referenced" }