aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2023-04-24 13:39:54 -0400
committerPatrick Palka <ppalka@redhat.com>2023-04-24 13:39:54 -0400
commit83470a5cd4c3d233e1d55b5e5553e1b9c553bf28 (patch)
treea49d6b2ed234bd9695168943c220707ffa22d933 /gcc
parentf1f5cbaa3f716fcb472dee52b8a159ccd5576828 (diff)
downloadgcc-83470a5cd4c3d233e1d55b5e5553e1b9c553bf28.zip
gcc-83470a5cd4c3d233e1d55b5e5553e1b9c553bf28.tar.gz
gcc-83470a5cd4c3d233e1d55b5e5553e1b9c553bf28.tar.bz2
libstdc++: Fix __max_diff_type::operator>>= for negative values
This patch fixes sign bit propagation when right-shifting a negative __max_diff_type value by more than one, a bug that our existing test coverage didn't expose until r14-159-g03cebd304955a6 fixed the front end's 'signed typedef-name' handling that the test relies on (which is a non-standard extension to the language grammar). libstdc++-v3/ChangeLog: * include/bits/max_size_type.h (__max_diff_type::operator>>=): Fix propagation of sign bit. * testsuite/std/ranges/iota/max_size_type.cc: Avoid using the non-standard 'signed typedef-name'. Add some compile-time tests for right-shifting a negative __max_diff_type value by more than one.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions