summaryrefslogtreecommitdiffstats
path: root/mpi/mpi-types.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-13 19:08:22 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-13 19:08:22 -0700
commit53a2e32d75890f33bd25a5e376672dd787d242e1 (patch)
treedb1c37636d8341d68c455f73e5a64b5edf58a98b /mpi/mpi-types.h
parent9f441fab52d7cd135d444ecc93beab8c1ee67f31 (diff)
downloadtxr-53a2e32d75890f33bd25a5e376672dd787d242e1.tar.gz
txr-53a2e32d75890f33bd25a5e376672dd787d242e1.tar.bz2
txr-53a2e32d75890f33bd25a5e376672dd787d242e1.zip
ffi: fix buggy bitfield allocation.
* ffi.c (make_ffi_type_struct): When there is no room in the current bitfield, two mistakes are made. When bit_offs is reset to zero in this case, the dependent variable bits_alloc that was calculated from it (bits allocated to current unit) must also be reset. The subsequent shift depends on it. Secondly, when we establish the memb[i].offs field, that must come from offs, not from unit_offs, because unit_offs is always the base offset of the existing cell (which doesn't have room for the new bitfield in this case); the main offset variable offs is what gets gets adjusted to the cell which has room for the new bitfield.
Diffstat (limited to 'mpi/mpi-types.h')
0 files changed, 0 insertions, 0 deletions