From patchwork Mon Sep 25 15:51:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 144475 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp1310332vqu; Mon, 25 Sep 2023 08:51:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEX/KYYh1T9fytmCPdswm24TlRxtC7QmZekLjPW84Glu0FzYIJ/yJsOoSLg/K6CEKokKtrX X-Received: by 2002:a17:906:5302:b0:9ae:621b:b41e with SMTP id h2-20020a170906530200b009ae621bb41emr6151259ejo.66.1695657113668; Mon, 25 Sep 2023 08:51:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695657113; cv=none; d=google.com; s=arc-20160816; b=aQYzmCKRtJiugBwt4slPzK/jnSLBo0YZvsP3cc4kcwxmYFKJ0O9MkHOUmWuqCvXcJU 57JTHpWX37qVYWfb+QOAJjgbkMEWdgwst/L3ec+Ar7p2QIrlKsQH1flk1WB5KmKLEf2V 8hNVh1gPC9eu/3DBlzitD8mvqL4e67yGsXubQTVY7BFhEJvw3ERMu7KYqsOZIsTE1vjA afg/Z6mIdcOM3T8XPyC5va2wxWAsyuJXOBSBBZ/xzKsP5JR3kk1tOmdkoe0jK1SaPaUu 6MIjwq1tMdE+thC3e5Qv0TB9hr8PTJT1Y4pBuUjFPW9xVLhg0E4iGP33xNrISbpUxOOJ IEMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :dmarc-filter:delivered-to; bh=kMoS1HZ3FhHr5iXTYvivySrmkOarx3gJiBOuI+16Iqo=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=MqHT+yg7Nrm4flEL5IVxEAHpxS/Vzp9LMQxmJlbpbVpCBtHURTzsjKHN5Hi2tus8x/ mFs/31/5z5JwRiR1raVYcKJMmQjNGxF3CxQBSEfRJL9JyXJ2wjZRf0aEDiDYfFDmmTNV yzpFef0yLPgxtiUFbEDCCGvXFhGn36Brx2R5Y94W2Ha/akz7BXzwG6KTTJLAh2jYi5YM U8FY4l8wdjLd2k7RmV/eX+r00vOL37iGnnYb3hd+WbRWSoJwX1lvslvxDoWg0+VOInlj 4zT1ngngUk3UBf5hkF3qxVIwqXYa39DrOse0DDgSS3Af6hjiI/NPANai1JrnfosBZNE4 EXVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b="CyUCxi/B"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id x7-20020a1709065ac700b00992a0f83dfcsi9047985ejs.471.2023.09.25.08.51.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 08:51:53 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b="CyUCxi/B"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2DDC63856DF8 for ; Mon, 25 Sep 2023 15:51:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id E80B63858CDA for ; Mon, 25 Sep 2023 15:51:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E80B63858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40572aeb6d0so31688745e9.1 for ; Mon, 25 Sep 2023 08:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1695657072; x=1696261872; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=kMoS1HZ3FhHr5iXTYvivySrmkOarx3gJiBOuI+16Iqo=; b=CyUCxi/B/0lQIjdUZD1mGYsvI/ZyJ7kJqXDdowXBwtbUb777X9AtN095FNIaVODXfQ XXQJakv4T2WM1kUu9VGhbsOYFEkYSPyLS3SjKgupPAeeZturtkq+VF/PeHwscdOI8dNo 3t2nrx3XspdU0Wmh8hk5NoU5WwYTp9idQ/yT2w8rknPXp6JLl+BtAxYulsiPsWXk7m+k 9/aTAdEYNenoy+JcGPv0TTPNx60rx7EXiAuiTEFEdoUginqhpR79qwhE80dW7DUKSj/T urxswq5yOWHL/Vch6Zf9JYczH21/vQqF5j7NnUxap+ejU//O/YI+244BIHi1Puxy3B6I 8cEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695657072; x=1696261872; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kMoS1HZ3FhHr5iXTYvivySrmkOarx3gJiBOuI+16Iqo=; b=q04SNWn/jlpT0UgrnU1yfh/FzfIBzDMJbcaFKd41Ocmdt36y35bpOu2SvA0TSnNiJD vX0atf0WRZW7rqo4WTnmB8vgiKrXXBg4iNScFLuYOJSRSO5hbSc838Bn6gX09jNTRNi6 THqP7FjuUL/9iidr6z4IfxWTBNfk4eOpO47YINVNu5I/KQpUl28x07V8Mmt+r47HtRmc PzfaozVShJ0+lWwFE3g4t5GoqePm79bZoftjUvm80UQRvnx6tGNjHiW90tGwABx9Yl4q IjrJrPsSIsIFtWYV2AxpvTDPbFV90NUPsVMnYR+hUxxQjew79a/ZGtbsZBwEuqMfKNps IqFg== X-Gm-Message-State: AOJu0Yx/LTlu5Zuv2hxcsCiHwMJkdA29EoK9OWrxE4cwg8WX66HEGQjt jwQ/M/n90IxAoEwKfapXmim/NkXglFb4EQQtRg54Ig== X-Received: by 2002:a05:600c:219:b0:3fe:f726:4a94 with SMTP id 25-20020a05600c021900b003fef7264a94mr5948404wmi.14.1695657072287; Mon, 25 Sep 2023 08:51:12 -0700 (PDT) Received: from fomalhaut.localnet ([2a01:e0a:8d5:d990:e654:e8ff:fe8f:2ce6]) by smtp.gmail.com with ESMTPSA id u23-20020a05600c211700b004042dbb8925sm15407023wml.38.2023.09.25.08.51.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 08:51:11 -0700 (PDT) From: Eric Botcazou X-Google-Original-From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [PATCH] Add missing return in gori_compute::logical_combine Date: Mon, 25 Sep 2023 17:51:11 +0200 Message-ID: <1963524.usQuhbGJ8B@fomalhaut> MIME-Version: 1.0 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778025353612514805 X-GMAIL-MSGID: 1778025353612514805 Hi, the varying case currently falls through to the 1/true case. Tested on x86_64-suse-linux, OK for mainline, 13 and 12 branches? 2023-09-25 Eric Botcazou * gimple-range-gori.cc (gori_compute::logical_combine): Add missing return statement in the varying case. 2023-09-25 Eric Botcazou * gnat.dg/opt102.adb:New test. * gnat.dg/opt102_pkg.adb, gnat.dg/opt102_pkg.ads: New helper. diff --git a/gcc/gimple-range-gori.cc b/gcc/gimple-range-gori.cc index 51fb542a19c..2694e551d73 100644 --- a/gcc/gimple-range-gori.cc +++ b/gcc/gimple-range-gori.cc @@ -876,6 +876,7 @@ gori_compute::logical_combine (vrange &r, enum tree_code code, r.dump (dump_file); fputc ('\n', dump_file); } + return res; } switch (code)