Skip to content

Commit

Permalink
fix: set type of mask_val
Browse files Browse the repository at this point in the history
this change ensures the type of `mask_val` is correctly set; otherwise,
we risk transfering a 4-byte value to arrays of 4-byte elements with a
size of 2 (i.e., `i4tmp(2)` and `r4tmp(2)`)
  • Loading branch information
inaki-amatria committed Sep 5, 2024
1 parent d13c129 commit fa8df1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mpp/include/mpp_chksum_int.fh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function MPP_CHKSUM_INT_RMASK_( var, pelist, mask_val )
integer(KIND=i8_kind) :: MPP_CHKSUM_INT_RMASK_
MPP_TYPE_, intent(in) :: var MPP_RANK_
integer, optional :: pelist(:)
real, intent(in) :: mask_val
real(KIND=r8_kind), intent(in) :: mask_val
integer(KIND(var))::imask_val
integer(KIND=i4_kind)::i4tmp(2)=0
real(KIND=r4_kind)::r4tmp(2)=0
Expand Down

0 comments on commit fa8df1e

Please sign in to comment.