diff options
author | Kushal Pal <kushalpal109@gmail.com> | 2024-07-26 07:51:43 +0000 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-19 15:32:01 +0100 |
commit | 86d5412d85b907fd63b5c86817e35e506ea3f7f0 (patch) | |
tree | b5f615e8011712faa1e875950c03fb040d7e1640 /gcc | |
parent | 724aad6009fbb850d18e2f99484b10a2fbfe75ed (diff) | |
download | gcc-86d5412d85b907fd63b5c86817e35e506ea3f7f0.zip gcc-86d5412d85b907fd63b5c86817e35e506ea3f7f0.tar.gz gcc-86d5412d85b907fd63b5c86817e35e506ea3f7f0.tar.bz2 |
gccrs: Fixed bitwise operation in `extract_stmt`
gcc/rust/ChangeLog:
* checks/errors/borrowck/polonius/rust-polonius.h (struct FullPoint):
This is the correct way of extracting the required bits.
Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/checks/errors/borrowck/polonius/rust-polonius.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/checks/errors/borrowck/polonius/rust-polonius.h b/gcc/rust/checks/errors/borrowck/polonius/rust-polonius.h index b013a93..4447ad5 100644 --- a/gcc/rust/checks/errors/borrowck/polonius/rust-polonius.h +++ b/gcc/rust/checks/errors/borrowck/polonius/rust-polonius.h @@ -45,7 +45,7 @@ struct FullPoint static uint32_t extract_bb (Point point) { return point >> 16; } static uint32_t extract_stmt (Point point) { - return (point & ~(1 << 16)) >> 1; + return (point >> 1) & ((1 << 15) - 1); } static bool extract_mid (Point point) { return point & 1; } |