@@ -559,11 +559,10 @@ module subroutine map_open_entry(map, key, other, conflict)
559559
560560 subroutine allocate_open_map_entry (map , bucket )
561561! allocates a hash bucket
562- type (open_hashmap_type), intent (inout ) :: map
563-
564- type (open_map_entry_type), pointer , intent (out ) :: bucket
562+ type (open_hashmap_type), intent (inout ) :: map type (open_map_entry_type), pointer , intent (out ) :: bucket
565563 type (open_map_entry_list), pointer :: free_list
566564 type (open_map_entry_pool), pointer :: pool
565+ character (* ), parameter :: procedure_name = " ALLOCATE_MAP_ENTRY"
567566
568567 pool = > map % cache
569568 map % num_entries = map % num_entries + 1
@@ -574,7 +573,9 @@ subroutine allocate_open_map_entry(map, bucket)
574573 map % free_list = > free_list % next
575574 free_list % target = > null ()
576575 free_list % next = > null ()
577- if (bucket % inmap == 0 ) stop " bucket % inmap == 0"
576+ if (bucket % inmap <= 0 ) &
577+ error stop submodule_name // " % " // procedure_name // &
578+ " : Failed consistency check: BUCKET % INMAP <= 0"
578579 map % num_free = map % num_free - 1
579580 else
580581! Get hash bucket from pool
@@ -589,7 +590,9 @@ subroutine allocate_open_map_entry(map, bucket)
589590 size ( map % inverse, kind= int_index ) ) then
590591 call expand_inverse( map )
591592 end if
592- if ( map % num_entries == 0 ) stop " MAP % NUM_ENTRIES == 0."
593+ if ( map % num_entries <= 0 ) &
594+ error stop submodule_name // " % " // procedure_name // &
595+ " : Failed consistency check: MAP % NUM_ENTRIES <= 0."
593596 bucket % inmap = map % num_entries
594597 end if
595598
0 commit comments