anchor.diff:              ! Deallocate hash table and set scalar attributes to 0.
   
               ! In/Out:
  -            !    ht: hash table.  On output all array attributes are deallocated
  +            !    ht: hash table.  On output all array attributes are deallocated/
               !        and all scalar attributes are set to 0.
   
               use checking, only: check_deallocate
  
positive.code: 
  !--- Allocation/deallocation ---
  
          subroutine alloc_hash_table(nslots, nentries, data_len, payload_len, max_free_reqd, seed, ht)
  
              ! Allocate hash table and initialise storage.
  
              ! In:
              !    nslots, nentries, data_len, payload_len, max_free_reqd, seed: see
              !        descriptions in hash_table_t.
              ! Out:
              !    ht: hash table.  On output all array attributes are allocated
              !        and all scalar attributes are set to their corresponding
  
negative.code: 
              allocate(ht%table(ht%nentries,ht%nslots), stat=ierr)
              call check_allocate('ht%table', size(ht%table), ierr)
              if (present(data_label)) then
                  ht%data_label => data_label
                  ht%extern_data_label = .true.
              else
                  allocate(ht%data_label(ht%data_len,ht%nentries*ht%nslots))
                  call check_allocate('ht%data_label', size(ht%data_label), ierr)
              end if
              if (present(payload)) then
                  ht%payload => payload
                  ht%extern_payload = .true.
              else
                  allocate(ht%payload(ht%payload_len,ht%nentries*ht%nslots), stat=ierr)
                  call check_allocate('ht%payload', size(ht%payload), ierr)
              end if
              allocate(ht%free_entries(ht%max_free_reqd), stat=ierr)
              call check_allocate('ht%free_entries', size(ht%free_entries), ierr)
  
  