aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-block.h
diff options
context:
space:
mode:
authorTomasz Kamiński <tkaminsk@redhat.com>2025-04-25 20:10:52 +0200
committerTomasz Kamiński <tkaminsk@redhat.com>2025-04-30 06:13:11 +0200
commit2ca5725e104d432317a44ad45183a4f555da3b82 (patch)
treee75e3574c56e237ed34993d1890c64964a9f60d1 /gcc/rust/backend/rust-compile-block.h
parent55b01e17c793688a2878fa43a76df1266153b438 (diff)
downloadgcc-2ca5725e104d432317a44ad45183a4f555da3b82.zip
gcc-2ca5725e104d432317a44ad45183a4f555da3b82.tar.gz
gcc-2ca5725e104d432317a44ad45183a4f555da3b82.tar.bz2
libstdc++: Fix _Padding_sink in case when predicted width is between padwidth and maxwidth [PR109162]
The _Padding_sink was behaving incorrectly, when the predicted width (based on code units count) was higher than _M_maxwidth, but lower than _M_padwidth. In this case _M_update() returned without calling _M_force_update() and computing field width for Unicode encoding, because _M_buffering() returned 'true'. As a consequence we switched to _M_ignoring() mode, while storing a sequence with more code units but smaller field width than _M_maxwidth. We now call _M_force_update() if predicted width is greater or equal to either _M_padwidth or _M_maxwidth. This happened for existing test case on 32bit architecture. PR libstdc++/109162 libstdc++-v3/ChangeLog: * include/std/format (_Padding_sink::_M_update): Fixed condition for calling _M_force_update. * testsuite/std/format/debug.cc: Add test that reproduces this issue on 64bit architecture. * testsuite/std/format/ranges/sequence.cc: Another edge value test.
Diffstat (limited to 'gcc/rust/backend/rust-compile-block.h')
0 files changed, 0 insertions, 0 deletions