[gcc r9-9154] Fix PR testsuite/90806 on the 9 branch
Eric Botcazou
ebotcazou@gcc.gnu.org
Wed Jan 6 11:13:18 GMT 2021
https://gcc.gnu.org/g:9c7a3bf73df4581c8ea9a4db507c290524e91cd5
commit r9-9154-g9c7a3bf73df4581c8ea9a4db507c290524e91cd5
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Wed Jan 6 12:06:41 2021 +0100
Fix PR testsuite/90806 on the 9 branch
gcc/ChangeLog:
PR testsuite/90806
Backport from mainline
2019-07-10 Marc Glisse <marc.glisse@inria.fr>
* wide-int.h (wi::lshift): Reject negative values for the fast path.
Diff:
---
gcc/wide-int.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gcc/wide-int.h b/gcc/wide-int.h
index 25ea0545439..77aa01f2c98 100644
--- a/gcc/wide-int.h
+++ b/gcc/wide-int.h
@@ -3032,8 +3032,7 @@ wi::lshift (const T1 &x, const T2 &y)
if (STATIC_CONSTANT_P (xi.precision > HOST_BITS_PER_WIDE_INT)
? (STATIC_CONSTANT_P (shift < HOST_BITS_PER_WIDE_INT - 1)
&& xi.len == 1
- && xi.val[0] <= (HOST_WIDE_INT) ((unsigned HOST_WIDE_INT)
- HOST_WIDE_INT_MAX >> shift))
+ && IN_RANGE (xi.val[0], 0, HOST_WIDE_INT_MAX >> shift))
: precision <= HOST_BITS_PER_WIDE_INT)
{
val[0] = xi.ulow () << shift;
More information about the Gcc-cvs
mailing list