3 ! Tests the fix for PR109948
5 ! Contributed by Rimvydas Jasinskas <rimvydas.jas@gmail.com>
10 module procedure eq_1_2
11 end interface operator(==)
14 logical function eq_1_2 (x
, y
)
15 integer, intent(in
) :: x(:)
16 real, intent(in
) :: y(:,:)
25 integer, allocatable
:: z(:)
31 call comment0
! Original problem
33 call comment3 ([5,4,3,2,1])
35 call comment11 ([5,4,3,2,1])
39 integer :: x_out(3) =[0.0,0.0,0.0]
42 if (any (x_out
.ne
. [0, -2, 0])) stop 1
44 if (any (x_out
.ne
. [1, -2, 3])) stop 2
45 end subroutine comment0
52 where ( z
< 0 ) x(:) = z(:)
54 where ( z
> 0 ) x(:) = z(:)
69 end subroutine comment1
71 subroutine comment3(k_2d
)
80 end subroutine comment3
82 subroutine comment11(k_2d
)
87 if ((m
== r
) .neqv
. .true
.) stop 5
89 if ((k
== r
) .neqv
. .true
.) stop 6 ! failed to find user defined operator
91 associate (k
=>k_2d(:))
92 if ((k
== r
) .neqv
. .true
.) stop 7
94 end subroutine comment11
101 z(1)%u
= [tlap([1,2,3]),tlap([4,5,6])]
102 z(2)%u
= [tlap([7,8,9]),tlap([10,11,12])]
103 associate (k
=>z(2)%u(1)%z
)
108 associate (k
=>z(1)%u(2)%z
)
109 if ((k
== r
) .neqv
. .true
.) stop 9
110 if (any (k
.ne
. [4,5,6])) stop 10
112 end subroutine comment10