From patchwork Wed Sep 7 10:59:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 1065 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp1079152wrt; Wed, 7 Sep 2022 04:00:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR5frveSB5DsyJyJ0nz6re3EnVtwyZuGsKeelXp+Vx5w6D6dzuUBAbkgY0cT6LsO39qWQ/Yg X-Received: by 2002:a05:6402:2547:b0:448:6c4c:b3e with SMTP id l7-20020a056402254700b004486c4c0b3emr2572670edb.288.1662548446090; Wed, 07 Sep 2022 04:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662548446; cv=none; d=google.com; s=arc-20160816; b=AK6Agc/mjW73V35AbEwaaYdW56eWpOKOLfVILTANWxpeQEPCWJrKQFt3bFSyN+F7rP WLJ3Wy9mu1hUsMYOAixxnhNenV0HCKwP52kjJQYlcWH27eQnXXv8LU9UpsVea/pAvZdt rybFC5b++syqDRW7l+BYjGapOTNWJs0wociw2VGi6B49lPtANH3ksvjMSNO/TIKMzoyK dBIhfDiuFc41gMoGjc9pPy5l0dYcQ7fcNezLf2LVIq00RbrrZt41f+bbpejhGJ1kWz+I nWayj9TzuewrHPVr6hZX8F5FHDRCJNEeHaPUzxIBQ+2aD7DFjIrsx/pczAxjlJ398v94 2aXQ== 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=fDV3pZF61uMgsce4cCsfxBkQR/GQhmynbffSjf8x+aU=; b=chCFjiA3RlBnLfeg8GRZ5v+1yqvMbMlmHMJcCjiC1p4LEu9sjTIuNHFz2fddPBcPHt zs7J3aW8I56HYtb2MWOe2kKFYF8S6M+DyMM80cM2NKcXGUtdkT6b9uy6Bypz5lKKcYX8 WVQcAtVRoLXVkz3Aiebw81RI4SWsr0EMXkQh1hohYkCQ8pydJvwKQURsAFiXW66rCd0Q EH49YzguHtFHBkA+DbMaWLgwzFXe8fGksUmu5LzRro9kHTrxbctY6xL3CVNfJnPnqOBj g8sPpEi5aR307kzxECnzzCl0ZrG+o4IW1vp9FKUDacRTQ9VnmT/XhDHoSMXajEuDm4ls oZ4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=wMU4T4gV; 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 cs17-20020a170906dc9100b00730d5ec03basi11264423ejc.391.2022.09.07.04.00.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 04:00:46 -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=wMU4T4gV; 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 E34133850841 for ; Wed, 7 Sep 2022 11:00:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E34133850841 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662548444; bh=fDV3pZF61uMgsce4cCsfxBkQR/GQhmynbffSjf8x+aU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=wMU4T4gVAtakYdb44507Mzx5eUkKq+dlWGDPC2Mz2Rv6rHDYu5I+z97W7urjw7fsq V+i1mbRwDSrSJTw1yWg5YQSMsqrqsFzeuNLgI8WMPaENwS6llxNLgB7obZkPqh5O6s jxmlB13syjBPa9ZCVoQase6jwkMum8CIaf0OpVtI= 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 45DD338515D9 for ; Wed, 7 Sep 2022 11:00:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 45DD338515D9 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-324-0hZAEMT7PSSDQOxj71dOdQ-1; Wed, 07 Sep 2022 06:59:54 -0400 X-MC-Unique: 0hZAEMT7PSSDQOxj71dOdQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 30C2B85A58A for ; Wed, 7 Sep 2022 10:59:54 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.192.88]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A597E2166B26; Wed, 7 Sep 2022 10:59:53 +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 287AxpFt3547300 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 7 Sep 2022 12:59:51 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 287Axob33547299; Wed, 7 Sep 2022 12:59:50 +0200 To: GCC patches Subject: [COMMITTED] [PR106867] Add test for PR. Date: Wed, 7 Sep 2022 12:59:49 +0200 Message-Id: <20220907105949.3547286-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.7 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_LOW, 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 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?1743308399149833639?= X-GMAIL-MSGID: =?utf-8?q?1743308399149833639?= PR tree-optimization/106867 gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr106867.c: New test. --- gcc/testsuite/gcc.dg/tree-ssa/pr106867.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr106867.c diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr106867.c b/gcc/testsuite/gcc.dg/tree-ssa/pr106867.c new file mode 100644 index 00000000000..68773d9ae74 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr106867.c @@ -0,0 +1,16 @@ +// { dg-do compile } +// { dg-options "-O2 -fno-tree-fre" } + +double m; +int n; + +void +foo (void) +{ + static double a[] = { 0.0 / 0.0, 0.0 }; + int i; + + for (i = 0; i < n; ++i) + if (m >= a[i]) + __builtin_abort (); +}