! See copyright notice in the COPYRIGHT file.
program test_copyOperator
  implicit none
  
  type variable
    integer, allocatable :: val(:) 
  end type variable

  type dyn_variable
    type(variable), allocatable :: var(:)
  end type dyn_variable

  type(variable) :: var1
  type(dyn_variable) :: dynVar

  allocate(dynVar%var(1))
  allocate(dynVar%var(1)%val(1))
  dynVar%var(1)%val = (/ 1 /)
  write(*,*) 'PASSED 1', ' dynVar%var1 size ', size(dynVar%var(1)%val), &
    &        ' allocated ', allocated(dynVar%var(1)%val)
  allocate(var1%val(1))
  var1 = dynVar%var(1)
  write(*,*) 'PASSED 2', ' var1 size ', size(var1%val), &
    &        ' allocated ', allocated(var1%val)

end program test_copyOperator
