2 ! Tests the fix for pr31214, in which the typespec for the entry would be lost,
3 ! thereby causing the function to be disallowed, since the function and entry
6 ! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
21 interface assignment(=)
22 module procedure equals
23 end interface assignment(=)
25 interface operator(//)
26 module procedure a_op_b, b_op_a
27 end interface operator(//)
29 interface operator(==)
30 module procedure a_po_b, b_po_a
31 end interface operator(==)
34 subroutine equals(x,y)
35 type(z), intent(in) :: y
36 type(z), intent(out) :: x
42 type(x), intent(in) :: a
43 type(y), intent(in) :: b
53 type(x), intent(in) :: a
54 type(y), intent(in) :: b
65 type(x) :: x1 = x(19.0_4)
66 type(y) :: y1 = y(7.0_4)
70 if (abs(z1%x - (19.0_4 + 7.0_4)) > epsilon(x1%x)) call abort ()
72 if (abs(z1%x - (19.0_4 - 7.0_4)) > epsilon(x1%x)) call abort ()
75 if (abs(z1%x - 19.0_4/7.0_4) > epsilon(x1%x)) call abort ()
77 if (abs(z1%x - 19.0_4/7.0_4) > epsilon(x1%x)) call abort ()
79 ! { dg-final { cleanup-modules "type_mod" } }