anchor.diff:              integer(int_64), intent(in) :: array_size
               integer, intent(in) :: ierr
   
  -            if (ierr /= 0) then
  +            if (array_size < 0 .or. array_size > MAX_INT .or. ierr /= 0) then
                   ! Error in allocating array.
                   if (nprocs > 1) then
                       write (6,'(1X,a25,1X,a,1X,a9,1X,'//int_fmt(array_size,1)//',a12,'//int_fmt(iproc,1)//')') &
  
positive.code:                         'Error in allocating array',trim(array_name),'with size',array_size
                  end if
                  write (6,*) 'ierr',ierr
                  call stop_all('check_allocate','Allocation error')
              end if
  
          end subroutine check_allocate_int_32
  
negative.code:             integer(int_32), intent(in) :: array_size
              integer, intent(in) :: ierr
  
              if (array_size < 0 .or. ierr /= 0) then
                  ! Error in allocating array.
                  if (nprocs > 1) then
                      write (6,'(1X,a25,1X,a,1X,a9,1X,'//int_fmt(array_size,1)//',a12,'//int_fmt(iproc,1)//')') &
  