3 ! Contributed by Gerhard Steinmetz <gscfq@t-online.de>
11 generic :: operator(*) => op
12 generic :: assignment(=) => assign
16 class(t), allocatable :: op
17 class(t), intent(in) :: x
19 allocate (op, source = t (x%r * y))
21 subroutine assign (z, x)
22 type(t), intent(in) :: x
23 class(t), intent(out) :: z
29 class(t), allocatable :: x
31 allocate (x, source = t (2.0))
33 if (int (x%r) .ne. 4) stop 1
34 if (allocated (x)) deallocate (x)