aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorRoger Sayle <roger@nextmovesoftware.com>2021-09-06 22:48:53 +0100
committerRoger Sayle <roger@nextmovesoftware.com>2021-09-06 22:50:45 +0100
commit74cb45e67d14624c3e2fafa99a8920d1866a5f0c (patch)
tree977fe2d0546db1f1fffd59e03f7b3db70f09a6af /libgomp
parent1bc66017c118229a101f0a2c097a9c209f777883 (diff)
downloadgcc-74cb45e67d14624c3e2fafa99a8920d1866a5f0c.zip
gcc-74cb45e67d14624c3e2fafa99a8920d1866a5f0c.tar.gz
gcc-74cb45e67d14624c3e2fafa99a8920d1866a5f0c.tar.bz2
Correct implementation of wi::clz
As diagnosed with Jakub and Richard in the analysis of PR 102134, the current implementation of wi::clz has incorrect/inconsistent behaviour. As mentioned by Richard in comment #7, clz should (always) return zero for negative values, but the current implementation can only return 0 when precision is a multiple of HOST_BITS_PER_WIDE_INT. The fix is simply to reorder/shuffle the existing tests. 2021-09-06 Roger Sayle <roger@nextmovesoftware.com> gcc/ChangeLog * wide-int.cc (wi::clz): Reorder tests to ensure the result is zero for all negative values.
Diffstat (limited to 'libgomp')
0 files changed, 0 insertions, 0 deletions