aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-06-10 14:08:16 +0100
committerJonathan Wakely <jwakely@redhat.com>2024-06-12 15:06:47 +0100
commitbd3a312728fbf8c35a09239b9180269f938f872e (patch)
treed2775de3e5d07ffe67332d96f53d225997c4fa1a /gcc
parent3f2f9059c7f76ff888e9d0e8f10dec6f48e346c9 (diff)
downloadgcc-bd3a312728fbf8c35a09239b9180269f938f872e.zip
gcc-bd3a312728fbf8c35a09239b9180269f938f872e.tar.gz
gcc-bd3a312728fbf8c35a09239b9180269f938f872e.tar.bz2
libstdc++: Fix std::tr2::dynamic_bitset shift operations [PR115399]
The shift operations for dynamic_bitset fail to zero out words where the non-zero bits were shifted to a completely different word. For a right shift we don't need to sanitize the unused bits in the high word, because we know they were already clear and a right shift doesn't change that. libstdc++-v3/ChangeLog: PR libstdc++/115399 * include/tr2/dynamic_bitset (operator>>=): Remove redundant call to _M_do_sanitize. * include/tr2/dynamic_bitset.tcc (_M_do_left_shift): Zero out low bits in words that should no longer be populated. (_M_do_right_shift): Likewise for high bits. * testsuite/tr2/dynamic_bitset/pr115399.cc: New test.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions