From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666295034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UxEgHqrLP+hclzHGFqFTQAYmmAFYyidJ6uyepUeQy2w=; b=ChweaV0yuVT9KhsXPa0APkad/nQ0CjbKEYn6Nir4IW7sDViEK0G9QM9lbN62Bkb/FL//pU 2pfa1jDdISW+J+p8U1woPN7ttWnJMeaBKJo8O6TdrCjaYuA9AEYLNg9qphOLxETRb86wIg noZkw9tkS9JST1OUAUbEAzyKog3sMYQ= 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 From: Aldy Hernandez To: GCC patches Cc: Andrew MacLeod , Aldy Hernandez 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 List-Id: 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 ()) -- 2.37.3