1 ! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
3 ! Check the analyzed form of a defined operator or assignment.
5 ! Type-bound defined assignment
10 procedure
, pass(y
) :: b2
=> s2
11 generic
:: assignment(=) => b1
, b2
15 class(t
), intent(out
) :: x
16 integer, intent(in
), value
:: y
19 real, intent(out
) :: x
20 class(t
), intent(in
) :: y
26 !CHECK: CALL s1(x,1_4)
30 x
= j
! no parentheses due to VALUE
31 !CHECK: CALL s2(a,(x))
37 !CHECK: CALL x%b1(1_4)
39 !CHECK: CALL (x)%b2(a)
48 procedure
, pass(x2
) :: b2
=> f
49 generic
:: operator(+) => b2
52 integer pure
function f(x1
, x2
)
53 class(t2
), intent(in
) :: x1
54 class(t2
), intent(in
) :: x2
56 subroutine test2(x
, y
)
66 ! Non-type-bound assignment and operator
70 interface assignment(=)
73 class(t
), intent(out
) :: x
74 integer, intent(in
) :: y
77 real, intent(out
) :: x
78 class(*), intent(in
) :: y
81 integer, intent(out
) :: x
82 class(*), intent(in
), value
:: y
86 integer function f(x
, y
)
88 class(t
), intent(in
) :: x
, y
92 subroutine test(x
, y
, z
)
94 class(*), intent(in
) :: z
96 !CHECK: CALL s1(x,2_4)
100 !CHECK: CALL s2(a,(z))