Message ID | 20220826154638.1156062-1-aldyh@redhat.com |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ecc5:0:0:0:0:0 with SMTP id s5csp293147wro; Fri, 26 Aug 2022 08:47:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR4xgjkyW/K/xnl1ATfO6vJ3ezeNY7zT/wq9xRBGjpD+Dxx28+DKEC7tUXy5VVYCA8MVNrBv X-Received: by 2002:a17:907:8a0c:b0:73d:becd:b35c with SMTP id sc12-20020a1709078a0c00b0073dbecdb35cmr5906969ejc.204.1661528850412; Fri, 26 Aug 2022 08:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661528850; cv=none; d=google.com; s=arc-20160816; b=Uzx4FG1dUyWRl6j++MFV4iBvXUeXKl6rGM6qbR0NcDDIxYr/lZV+u+SHfd65H4kKsO b/BaEmsoRYE4H3s0E0acdV2WJ85N99AFuFUnfesTm/1QyEltlIPODZ5UTcX8L11fv94i gp5j8reMKbfNaaGJIp+svkybk6GxiwP1/CGcdXGKBmE661A7W6tOthxaSsHbme7ZTnwf PvJAnbCgVI57RxYENjBhxELPc/cXjpfqgN3jFtDXqTTYoL6htPpKik8QVWKOyUFFayAa CNEo3mKgDYUzXVY3HCYJh9tiBmegLrLiJOl1Qn21UK7e72hsnT5Wlkz0yQSA3XYkhJhj iQWA== 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=IOZowF68SZG9ZTT5xonVZvejCy6z/ET2dPQFS82hH14=; b=BOhtYx4PGuelcQ7PJnYicTIBIEmNlPLdv7TYOM8iwpMPpVhANFzk0Cse8P2O259gYZ 65tybPI2ZHcdE9N0GTaA8ALpZ/6+H/nEMLSVLwhsvTntmitqt604GlBZ1qrma4WcpGBX Aa5g3X99oemhbwADtI331K7Fm24wDvDjqBtIWKtkBO/Xw+wRXTzqbsJf3KxZMoezhJE2 W4UH9WaxloaXH0VLLBfjngzUWozXa0UtbwZAX3buKXOsiJZG+EA9JhY+4SIeB+ut4+jI 41Bgu5Zer9bAuv9n1wrKhObJGq6qt/vcmFBacJDJx1/FrkMj6PrVwcyijeMYZ2romZYb SXnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=JZhabWI5; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id xc12-20020a170907074c00b00730e4be74b6si277862ejb.26.2022.08.26.08.47.30 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Aug 2022 08:47:30 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=JZhabWI5; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 A21BA385142A for <ouuuleilei@gmail.com>; Fri, 26 Aug 2022 15:47:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A21BA385142A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661528848; bh=IOZowF68SZG9ZTT5xonVZvejCy6z/ET2dPQFS82hH14=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=JZhabWI5tx2Wa0y1k2b6PCy70GDj+r7GBzizR7oLx9A0Z0iYMA7bwZCGTl+FMNU0L flv1IVR8rsud3IZdzrUMWIZD91M3fp53FWFPpHwZj5NkJ1zwR5b4jXPEUULpOtuWFz im/x7WKv1ixbcG+Wab8CBagbbLz/q8Wx0FseBRro= 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 2080B38515F4 for <gcc-patches@gcc.gnu.org>; Fri, 26 Aug 2022 15:46:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2080B38515F4 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-346-o7Kw0AH3M2-3FZVAurFlkQ-1; Fri, 26 Aug 2022 11:46:42 -0400 X-MC-Unique: o7Kw0AH3M2-3FZVAurFlkQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 73615940F61 for <gcc-patches@gcc.gnu.org>; Fri, 26 Aug 2022 15:46:42 +0000 (UTC) Received: from abulafia.home (unknown [10.39.193.54]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2AF9B403349; Fri, 26 Aug 2022 15:46:42 +0000 (UTC) Received: from abulafia.home (localhost [127.0.0.1]) by abulafia.home (8.17.1/8.17.1) with ESMTPS id 27QFkdYI1156076 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 26 Aug 2022 17:46:39 +0200 Received: (from aldyh@localhost) by abulafia.home (8.17.1/8.17.1/Submit) id 27QFkdJu1156075; Fri, 26 Aug 2022 17:46:39 +0200 To: GCC patches <gcc-patches@gcc.gnu.org> Subject: [PATCH] Make all default vrange setters set VARYING. Date: Fri, 26 Aug 2022 17:46:38 +0200 Message-Id: <20220826154638.1156062-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 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=-11.4 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, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Aldy Hernandez via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Aldy Hernandez <aldyh@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1742239275533692146?= X-GMAIL-MSGID: =?utf-8?q?1742239275533692146?= |
Series |
Make all default vrange setters set VARYING.
|
|
Commit Message
Aldy Hernandez
Aug. 26, 2022, 3:46 p.m. UTC
frange is using some of the default vrange setters, some of which are leaving the range in an undefined state. We hadn't noticed this because neither frange nor unsupported_range, both which use some of the default implementation, weren't being used much. We can never go wrong with setting VARYING ;-). Will commit after tests complete. gcc/ChangeLog: * value-range.cc (vrange::set): Set varying. (vrange::set_nonzero): Same. (vrange::set_zero): Same. (vrange::set_nonnegative): Same. --- gcc/value-range.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/gcc/value-range.cc b/gcc/value-range.cc index d056f7356e1..edd10bf5794 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -94,8 +94,9 @@ vrange::singleton_p (tree *) const } void -vrange::set (tree, tree, value_range_kind) +vrange::set (tree min, tree, value_range_kind) { + set_varying (TREE_TYPE (min)); } tree @@ -168,18 +169,21 @@ vrange::nonzero_p () const } void -vrange::set_nonzero (tree) +vrange::set_nonzero (tree type) { + set_varying (type); } void -vrange::set_zero (tree) +vrange::set_zero (tree type) { + set_varying (type); } void -vrange::set_nonnegative (tree) +vrange::set_nonnegative (tree type) { + set_varying (type); } bool