2 ! Checks the fix for PR34008, in which INTENT(INOUT) was disallowed
3 ! for the first argument of assign_m, whereas both INOUT and OUT
6 ! Contributed by Harald Anlauf <anlauf@gmx.de>
11 logical :: alloc
= .false
.
14 type(t_mi
) :: i
! meta data
15 real, pointer :: ptr (:,:,:,:) => NULL ()
18 interface assignment (=)
19 module procedure assign_m
22 elemental
subroutine assign_m (y
, x
)
23 !---------------------------------------
24 ! overwrite intrinsic assignment routine
25 !---------------------------------------
26 type (t_m
), intent(inout
) :: y
27 type (t_m
), intent(in
) :: x
29 if (y
% i
% alloc
) y
% ptr
= x
% ptr
30 end subroutine assign_m
34 use mo_memory
, only
: t_m
, assignment (=)
40 subroutine assign_atm_to_atm (y
, x
)
41 type (t_atm
), intent(inout
) :: y
42 type (t_atm
), intent(in
) :: x
44 ! do i=1,42; y% m(i) = x% m(i); end do ! Works
46 end subroutine assign_atm_to_atm