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
)) STOP 1
165 (/ .false
.,.true
.,.true
., .true
., .false
.,.false
. /) )) STOP 1
166 end subroutine checkt
172 logical :: r1(6), r2(6)
175 r1
= (/ a
== b
, a
/= b
, a
< b
, a
<= b
, a
> b
, a
>= b
/)
176 r2
= (/ a
.eq
.b
, a
.ne
.b
, a
.lt
.b
, a
.le
.b
, a
.gt
.b
, a
.ge
.b
/)
177 if (any (r1
.neqv
.r2
)) STOP 2
179 (/ .false
.,.true
.,.true
., .true
., .false
.,.false
. /) )) STOP 2
180 end subroutine checku