@@ -559,11 +559,10 @@ module subroutine map_open_entry(map, key, other, conflict)
559
559
560
560
subroutine allocate_open_map_entry (map , bucket )
561
561
! 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
565
563
type (open_map_entry_list), pointer :: free_list
566
564
type (open_map_entry_pool), pointer :: pool
565
+ character (* ), parameter :: procedure_name = " ALLOCATE_MAP_ENTRY"
567
566
568
567
pool = > map % cache
569
568
map % num_entries = map % num_entries + 1
@@ -574,7 +573,9 @@ subroutine allocate_open_map_entry(map, bucket)
574
573
map % free_list = > free_list % next
575
574
free_list % target = > null ()
576
575
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"
578
579
map % num_free = map % num_free - 1
579
580
else
580
581
! Get hash bucket from pool
@@ -589,7 +590,9 @@ subroutine allocate_open_map_entry(map, bucket)
589
590
size ( map % inverse, kind= int_index ) ) then
590
591
call expand_inverse( map )
591
592
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."
593
596
bucket % inmap = map % num_entries
594
597
end if
595
598
0 commit comments