2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / operator_c1202.f90
blobc53079ac5d84aa211874d81abd88f5d6f08052ba
1 ! { dg-do compile }
2 module op
4 implicit none
6 type a
7 integer i
8 end type a
10 type b
11 real i
12 end type b
14 interface operator(==)
15 module procedure f1
16 end interface operator(.eq.)
17 interface operator(.eq.)
18 module procedure f2
19 end interface operator(==)
21 interface operator(/=)
22 module procedure f1
23 end interface operator(.ne.)
24 interface operator(.ne.)
25 module procedure f2
26 end interface operator(/=)
28 interface operator(<=)
29 module procedure f1
30 end interface operator(.le.)
31 interface operator(.le.)
32 module procedure f2
33 end interface operator(<=)
35 interface operator(<)
36 module procedure f1
37 end interface operator(.lt.)
38 interface operator(.lt.)
39 module procedure f2
40 end interface operator(<)
42 interface operator(>=)
43 module procedure f1
44 end interface operator(.ge.)
45 interface operator(.ge.)
46 module procedure f2
47 end interface operator(>=)
49 interface operator(>)
50 module procedure f1
51 end interface operator(.gt.)
52 interface operator(.gt.)
53 module procedure f2
54 end interface operator(>)
56 contains
58 function f2(x,y)
59 logical f2
60 type(a), intent(in) :: x, y
61 end function f2
63 function f1(x,y)
64 logical f1
65 type(b), intent(in) :: x, y
66 end function f1
68 end module op