28899, "psath", "_qio_channel_write_bits_cached_realign can break when both tmp_bits and nbits are 64", "2026-05-28T14:46:47Z"
opened 02:46PM - 28 May 26 UTC
https://github.com/chapel-lang/chapel/blame/657c51090180871a277ebe6575ce39633255… d722/runtime/src/qio/qio.c#L4262
I'm running Chapel 2.8 built with
```
CHPL_LOCALE_MODEL=flat
CHPL_HOST_COMPILER=gnu
CHPL_TARGET_COMPILER=gnu
CHPL_LLVM=system
```
System is Ubuntu 24.04, GCC 13.3.0, LLVM 18.1.3
<img width="635" height="541" alt="Image" src="https://github.com/user-attachments/assets/a2924e2d-333a-4ec7-a64a-0e16c04f3543" />
GDB (correct) and the actual compiled code (wrong) disagree about what the value of `part_one_bits` is. The compiled code seems to ignore the `(v >> 64)` and gives the result of `(tmp_bits << part_one) | (v)`
I'm running Chapel 2.8 built with
CHPL_LOCALE_MODEL=flat
CHPL_HOST_COMPILER=gnu
CHPL_TARGET_COMPILER=gnu
CHPL_LLVM=system
System is Ubuntu 24.04, GCC 13.3.0, LLVM 18.1.3
GDB (correct) and the actual compiled code (wrong) disagree about what the value of part_one_bits is. The compiled code seems to ignore the (v >> 64) and gives the result of (tmp_bits << part_one) | (v)