From patchwork Wed Jan 6 11:14:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 1422896 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=adacore-com.20150623.gappssmtp.com header.i=@adacore-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=MetFKJsw; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D9mw408Tfz9sRR for ; Wed, 6 Jan 2021 22:14:10 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AB3A13945C20; Wed, 6 Jan 2021 11:14:07 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 724A838618F6 for ; Wed, 6 Jan 2021 11:14:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 724A838618F6 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=botcazou@adacore.com Received: by mail-wr1-x436.google.com with SMTP id i9so2078250wrc.4 for ; Wed, 06 Jan 2021 03:14:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=MhY6vH0FbmWY0O7OVeHSqB3USiBJ1bgKM0SmJdifzhM=; b=MetFKJswNqIBw0/8N+IJf7bIq11cOv/usfddgw5yTNgTWLzgfVAjF8nM0bll2QZvv2 epZIq/4oO7ZhEAO3WXeDuMYr2UsPQ1KkbjQ25wTZuXOyG06w1plSH+//n5vNNnm+Tfhm 4ltYBvsQm7KHc9fvR1aqrg/r7x4g2w5hzoq4X595nxpVMXCiDXc6Nz3mnoPbfE2XwuOX RYjxx/ANVHWSywoJrexqRe/afezoAmbKz9Y/IlYNAoi/bGrsu+UmVYU8XEaL4Kx2A8Hi 6KYlnZ3QpT6zzU7Qd5eyc9U95H8HKhyin5xHFi4AiQMgyPt5YNIIV2AGpxP/EZjAQ7IC wT2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=MhY6vH0FbmWY0O7OVeHSqB3USiBJ1bgKM0SmJdifzhM=; b=eVeRWbzYYsuWqn2sQ28LWy9ezmtZFUB6DPx0uBEN+lOKkBhYzWM8TxlihBL4UlXYzY n7Va4EvED5TWm3omx4FGO9UPxzoruakv7mdHlttMdIDTk2hy2WlGe77uEkH665GEoluG VDoLwne98QGrK+q9F+bjqbjMC8SdL4qCSu17Qxac9oLZ8zjUUha/X2DGAS9YhBviIGri Bbg2iOkQfSNZTTAOtUen4ZHlXFlT52RNGalKUBHeOHk3pKXoT1PRvBJNfhmUWePdY3+G Ie53fPES1gyqz3IgPbBK1Y1ofDMW7voXf+uiYwq3RlVD7T8oxLr2CvdbxZPclbbN+7Nk ABUg== X-Gm-Message-State: AOAM533TgwpsH0BBe5S2/Kq3k8H5ZsfwWVcO5CGhk0p6aUlFK/+Qmp4B zR/szDTOc1ddv3yN/fGaxPR4JrabFfgGc93T X-Google-Smtp-Source: ABdhPJxcwG3+TeZZ4lzy5S5XEybk3rzECBYhm7K6+eenh8ZsywxVJdmuqIRc9UfwyNJ9Wx8Uq809OA== X-Received: by 2002:adf:d201:: with SMTP id j1mr3846694wrh.212.1609931642803; Wed, 06 Jan 2021 03:14:02 -0800 (PST) Received: from fomalhaut.localnet ([2a01:e0a:41b:84f0:cf71:f5e0:b050:bede]) by smtp.gmail.com with ESMTPSA id c10sm2811810wrb.92.2021.01.06.03.14.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Jan 2021 03:14:02 -0800 (PST) From: Eric Botcazou X-Google-Original-From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Fix PR testsuite/90806 on the 9 branch Date: Wed, 06 Jan 2021 12:14:01 +0100 Message-ID: <2897833.uCpS0FXm7W@fomalhaut> MIME-Version: 1.0 X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" The underlying bug was fixed by Marc in July 2019: 2019-07-10 Marc Glisse * 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 PR testsuite/90806 Backport from mainline 2019-07-10 Marc Glisse * wide-int.h (wi::lshift): Reject negative values for the fastpath. 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;