program ex3
   implicit none
   type t
      real,allocatable :: a(:)
   end type t
   type(t) :: z[*]
   integer :: image, me
   me = this_image()
   allocate(z%a(me))
   z%a = 1.2
   write(*,*) 'On image', me, ' z%a=', z%a
   sync all
   if (this_image()==1) then
      do image = 1, num_images()
         write(*,*) 'Altering z%a on image', image
         z[image]%a = 1.3
      end do
   end if
   sync all
   write(*,*) 'z=',z%a,' on image',me
   deallocate(z%a)
end
      
