diff --git a/src/stdlib_hashmap_chaining.f90 b/src/stdlib_hashmap_chaining.f90 index 5d028e143..a559ce442 100644 --- a/src/stdlib_hashmap_chaining.f90 +++ b/src/stdlib_hashmap_chaining.f90 @@ -812,7 +812,7 @@ module subroutine set_other_chaining_data( map, key, other, exists ) ! associate( target => map % inverse(inmap) % target ) ! target % other = other !map % inverse(inmap) % target % other = other - if allocated( map % inverse(inmap) % target % other ) then + if ( allocated( map % inverse(inmap) % target % other ) ) then deallocate( map % inverse(inmap) % target % other ) endif allocate( map % inverse(inmap) % target % other, source=other)