2 ! tests that operator overloading works correctly for operators with
9 interface operator (==)
13 interface operator (/=)
17 interface operator (>)
21 interface operator (>=)
25 interface operator (<)
29 interface operator (<=)
37 interface operator (.eq
.)
41 interface operator (.ne
.)
45 interface operator (.gt
.)
49 interface operator (.ge
.)
53 interface operator (.lt
.)
57 interface operator (.le
.)
64 type (t
), intent (in
) :: a
, b
71 type (t
), intent (in
) :: a
, b
78 type (t
), intent (in
) :: a
, b
85 type (t
), intent (in
) :: a
, b
92 type (t
), intent (in
) :: a
, b
99 type (t
), intent (in
) :: a
, b
106 type (u
), intent (in
) :: a
, b
113 type (u
), intent (in
) :: a
, b
120 type (u
), intent (in
) :: a
, b
127 type (u
), intent (in
) :: a
, b
134 type (u
), intent (in
) :: a
, b
141 type (u
), intent (in
) :: a
, b
158 logical :: r1(6), r2(6)
161 r1
= (/ a
== b
, a
/= b
, a
< b
, a
<= b
, a
> b
, a
>= b
/)
162 r2
= (/ a
.eq
.b
, a
.ne
.b
, a
.lt
.b
, a
.le
.b
, a
.gt
.b
, a
.ge
.b
/)
163 if (any (r1
.neqv
.r2
)) call abort
165 (/ .false
.,.true
.,.true
., .true
., .false
.,.false
. /) )) call&
167 end subroutine checkt
173 logical :: r1(6), r2(6)
176 r1
= (/ a
== b
, a
/= b
, a
< b
, a
<= b
, a
> b
, a
>= b
/)
177 r2
= (/ a
.eq
.b
, a
.ne
.b
, a
.lt
.b
, a
.le
.b
, a
.gt
.b
, a
.ge
.b
/)
178 if (any (r1
.neqv
.r2
)) call abort
180 (/ .false
.,.true
.,.true
., .true
., .false
.,.false
. /) )) call&
182 end subroutine checku