Skip to content

Commit 2ae0d6d

Browse files
committed
Update set_other again
Revert back to inline allocation.
1 parent bf3c90d commit 2ae0d6d

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/stdlib_hashmap_chaining.f90

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -809,14 +809,9 @@ module subroutine set_other_chaining_data( map, key, other, exists )
809809
invalid_inmap
810810
end if
811811
else if ( associated( map % inverse(inmap) % target ) ) then
812-
! Explicit deallocation and allocation used to avoid issue
813-
! seen with 32 bit version of Gfortran.
814-
if ( allocated( map % inverse(inmap) % target % other ) ) then
815-
deallocate( map % inverse(inmap) % target % other )
816-
endif
817-
allocate( map % inverse(inmap) % target % other, source=other)
818-
if ( present(exists) ) exists = .true.
819-
return
812+
map % inverse(inmap) % target % other = other
813+
if ( present(exists) ) exists = .true.
814+
return
820815
else
821816
error stop submodule_name // ' % ' // procedure // ': ' // &
822817
invalid_inmap

src/stdlib_hashmap_open.f90

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -839,12 +839,7 @@ module subroutine set_other_open_data( map, key, other, exists )
839839
invalid_inmap
840840
end if
841841
else if ( associated( map % inverse(inmap) % target ) ) then
842-
! Explicit deallocation and allocation used to avoid issue
843-
! seen with 32 bit version of Gfortran.
844-
if ( allocated( map % inverse(inmap) % target % other ) ) then
845-
deallocate( map % inverse(inmap) % target % other )
846-
endif
847-
allocate( map % inverse(inmap) % target % other, source=other)
842+
map % inverse(inmap) % target % other = other
848843
if ( present(exists) ) exists = .true.
849844
return
850845
else

0 commit comments

Comments
 (0)