anchor.diff:          type(alias_table_data_four_ind_t), intent(inout) :: alias_data
           integer, intent(in) :: len_one, len_two, len_three, len_four
           integer :: ierr
  +        integer(int_64) :: len_tot
  +
  +        len_tot=((int(len_one,int_64)*len_two)*len_three)*len_four
   
           allocate(alias_data%weights(len_four, len_three, len_two, len_one), stat=ierr)
  -        call check_allocate('alias_data%weights', (len_one*len_two*len_three*len_four), ierr)
  +        call check_allocate('alias_data%weights', len_tot, ierr)
           allocate(alias_data%aliasU(len_four, len_three, len_two, len_one), stat=ierr)
  -        call check_allocate('alias_data%aliasU', (len_one*len_two*len_three*len_four), ierr)
  +        call check_allocate('alias_data%aliasU', len_tot, ierr)
           allocate(alias_data%aliasK(len_four, len_three, len_two, len_one), stat=ierr)
  -        call check_allocate('alias_data%aliasK', (len_one*len_two*len_three*len_four), ierr)
  +        call check_allocate('alias_data%aliasK', len_tot, ierr)
           allocate(alias_data%weights_tot(len_three, len_two, len_one), stat=ierr)
           call check_allocate('alias_data%weights_tot', (len_one*len_two*len_three), ierr)
   
  
positive.code:         type(alias_table_data_three_ind_t), intent(inout) :: alias_data
          integer, intent(in) :: len_one, array_two(2), len_three
          integer :: ierr, len_two
  
          len_two = array_two(2) - array_two(1) + 1
  
          allocate(alias_data%weights(len_three, array_two(1):array_two(2), len_one), stat=ierr)
          call check_allocate('alias_data%weights', (len_one*len_two*len_three), ierr)
          allocate(alias_data%aliasU(len_three, array_two(1):array_two(2), len_one), stat=ierr)
          call check_allocate('alias_data%aliasU', (len_one*len_two*len_three), ierr)
          allocate(alias_data%aliasK(len_three, array_two(1):array_two(2), len_one), stat=ierr)
          call check_allocate('alias_data%aliasK', (len_one*len_two*len_three), ierr)
          allocate(alias_data%weights_tot(array_two(1):array_two(2), len_one), stat=ierr)
          call check_allocate('alias_data%weights_tot', (len_one*len_two), ierr)
  
  
negative.code:         type(alias_table_data_two_ind_t), intent(inout) :: alias_data
          integer, intent(in) :: len_one, len_two
          integer :: ierr
          integer(int_64) :: len_tot
          len_tot=int(len_one,int_64)*len_two
  
          allocate(alias_data%weights(len_two, len_one), stat=ierr)
          call check_allocate('alias_data%weights', (len_tot), ierr)
          allocate(alias_data%aliasU(len_two, len_one), stat=ierr)
          call check_allocate('alias_data%aliasU', (len_tot), ierr)
          allocate(alias_data%aliasK(len_two, len_one), stat=ierr)
          call check_allocate('alias_data%aliasK', (len_tot), ierr)
          allocate(alias_data%weights_tot(len_one), stat=ierr)
          call check_allocate('alias_data%weights_tot', len_one, ierr)
  
  