From patchwork Thu Oct 20 19:43:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 6366 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp291965wrr; Thu, 20 Oct 2022 12:44:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7fpsk9UHB2lQfsaJ2JukEXqSCpAUMBFsvd5juNHkaRz7UGx0NMsiotOXC0cFNuIdygwNVx X-Received: by 2002:aa7:df16:0:b0:45b:f51f:ab73 with SMTP id c22-20020aa7df16000000b0045bf51fab73mr13750637edy.366.1666295089386; Thu, 20 Oct 2022 12:44:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666295089; cv=none; d=google.com; s=arc-20160816; b=WCE1uG2GFy0DfDhu8zIojwcDGHaSx+6t2wLjFjFXskSYuCxGiDcw6OFR+9VHsveXKW 3n2d4rbrCfwYnPtTGcTD0D87bo+CSZPrmqFaX2iGdRV23tL470Y7TROuuyEuX7Ru/CzB 30J0Cih7xydvz7elO58VABVyC7zSWchPj8A6LaKi/v4iFY1e6+nGSw++1S8XDIROIug/ xtDlOuR6RuoAQQIORlDi30SJ+K9doxy+ogB8f5XqfDOPwJ90z+vpRNTpRUl69vmRbJfa ghqmZxwaCicSDFVet9owgwesWQHdidFi3j+9AS228I1Skt3KXf3tTYB3Tn9GTZtLfLQO wYCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=UxEgHqrLP+hclzHGFqFTQAYmmAFYyidJ6uyepUeQy2w=; b=ZdNyHjstaZoS2TvNIpcT/NG0cJLjO/b3zAxU5oLvtObd3x6bh0LRDfGEeUrF6eBBS3 JtE3WGhymglKRSHGyW9WCWnGRstnx9Dw5U6GzaJsd46wouMddUDUOPZ/aLndio6SQQIT armWChU7ntm0PU9JHAqASer05OD8sCvRHMFbs0PXyau+FWQjSjAvhRBCGKy87ri+ZxX7 mYLvaJG9Rb7cPUc/9vQ+JAP1vAwcBYbQ7fuBazHdblkEdhj24qvfHNHs+lLxIBs5uoIp 5YBJYm7awkEstrUxbYah/VyvN8WsBIaJA4vdCcx4Tys1eDHrHL7GQCkPMUzneCHE0yaW kdkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=hVypN83h; 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=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id hh14-20020a170906a94e00b0077ef3eece57si16792814ejb.144.2022.10.20.12.44.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 12:44:49 -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=@gcc.gnu.org header.s=default header.b=hVypN83h; 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=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 319A5384C003 for ; Thu, 20 Oct 2022 19:44:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 319A5384C003 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666295088; bh=UxEgHqrLP+hclzHGFqFTQAYmmAFYyidJ6uyepUeQy2w=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=hVypN83hGvFBF8JJLaz5vF8drNTxMuY/bFVwfJv7ns0JQXYhikVFqJtM7b8KnQx64 120J+NB639h9cibmXOJeakUAdbqaIzaGU0r3AXI0Ev3KiKnRbN0MzXC/rICBjiieLi ZbIHValz8aGngWRAOeaOSYrEzj/YJ9gT65mZ+T0Q= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id DEB633865C28 for ; Thu, 20 Oct 2022 19:43:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DEB633865C28 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-52-drI0-mApMcOfzGeXuyaF5g-1; Thu, 20 Oct 2022 15:43:53 -0400 X-MC-Unique: drI0-mApMcOfzGeXuyaF5g-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 503701C068D5 for ; Thu, 20 Oct 2022 19:43:38 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.192.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A634E4B3FC6; Thu, 20 Oct 2022 19:43:31 +0000 (UTC) Received: from abulafia.quesejoda.com (localhost [127.0.0.1]) by abulafia.quesejoda.com (8.17.1/8.17.1) with ESMTPS id 29KJhSF2260168 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 20 Oct 2022 21:43:28 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 29KJhSgP260167; Thu, 20 Oct 2022 21:43:28 +0200 To: GCC patches Subject: [COMMITTED] [PR c++/106654] Handle non-irange ranges in get_range_global for default defs. Date: Thu, 20 Oct 2022 21:43:26 +0200 Message-Id: <20221020194326.260151-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Aldy Hernandez via Gcc-patches From: Aldy Hernandez Reply-To: Aldy Hernandez Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747237039678980589?= X-GMAIL-MSGID: =?utf-8?q?1747237039678980589?= With the upcoming [[assume]] work, Andrew has pointed out that non-irange ranges are not handled in get_range_global for SSA_NAME_IS_DEFAULT_DEF. This patch fixes the oversight. PR c++/106654 gcc/ChangeLog: * value-query.cc (get_range_global): Handle non integer ranges for default def SSA names. --- gcc/value-query.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/value-query.cc b/gcc/value-query.cc index 296784be31d..e8988ed67e0 100644 --- a/gcc/value-query.cc +++ b/gcc/value-query.cc @@ -343,7 +343,7 @@ get_range_global (vrange &r, tree name) && ((cfun && nonnull_arg_p (sym)) || get_ssa_name_ptr_info_nonnull (name))) r.set_nonzero (type); - else if (INTEGRAL_TYPE_P (type)) + else if (!POINTER_TYPE_P (type)) { get_ssa_name_range_info (r, name); if (r.undefined_p ())