3 ! Tests corrections to implementation of pointer function assignments.
5 ! Contributed by Mikael Morin <mikael.morin@sfr.fr>
13 generic :: assignment(=) => assign_dt
16 subroutine assign_dt(too, from)
17 class(dt), intent(out) :: too
18 type(dt), intent(in) :: from
19 too%data = from%data + 1
25 integer, parameter :: b = 3
26 integer, target :: a = 2
27 type(dt), target :: tdt
28 type(dt) :: sdt = dt(1)
30 func (arg=b) = 1 ! This was rejected as an unclassifiable statement
31 if (a /= 1) call abort
34 if (a /= -1) call abort
36 dtfunc () = sdt ! Check that defined assignment is resolved
37 if (tdt%data /= 2) call abort
39 function func(arg) result(r)
48 function dtfunc() result (r)
49 type(dt), pointer :: r