* Fix PR testsuite/90806 on the 9 branch
@ 2021-01-06 11:14 Eric Botcazou
0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2021-01-06 11:14 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 515 bytes --]
The underlying bug was fixed by Marc in July 2019:
2019-07-10 Marc Glisse <marc.glisse@inria.fr>
* wide-int.h (wi::lshift): Reject negative values for the fastpath.
and Richard B. agreed to the backport onto the 9 branch.
Bootstrapped/regtested and applied on the 9 branch.
2021-01-06 Eric Botcazou <ebotcazou@adacore.com>
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 fastpath.
--
Eric Botcazou
[-- Attachment #2: p.diff --]
[-- Type: text/x-patch, Size: 588 bytes --]
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-06 11:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06 11:14 Fix PR testsuite/90806 on the 9 branch Eric Botcazou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).