From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101022 invoked by alias); 14 Jun 2017 06:31:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 101005 invoked by uid 89); 14 Jun 2017 06:31:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-20.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=10am, 10AM, Scanning X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Jun 2017 06:31:06 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A36361B91; Wed, 14 Jun 2017 06:31:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8A36361B91 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8A36361B91 Received: from tucnak.zalov.cz (ovpn-117-179.ams2.redhat.com [10.36.117.179]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 25F728CE21; Wed, 14 Jun 2017 06:31:08 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v5E6V57a020944; Wed, 14 Jun 2017 08:31:06 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v5E6V3un020943; Wed, 14 Jun 2017 08:31:03 +0200 Date: Wed, 14 Jun 2017 06:31:00 -0000 From: Jakub Jelinek To: Rainer Orth Cc: Paul Hua , Martin =?utf-8?B?TGnFoWth?= , gcc-patches Subject: Re: [PATCH] Enhance dump_probability function. Message-ID: <20170614063103.GO2099@tucnak> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00991.txt.bz2 On Wed, Jun 14, 2017 at 07:52:10AM +0200, Rainer Orth wrote: > both revised scan-tree-dump patterns got the quoting wrong, leading to > attempts to run unknown procs ^\\: instead of matching [^:] ;-( > > This totally broke make check-gcc: the affected partial test runs > aborted at that point, leading to gcc.{sum,log} files that make > contrib/dg-extract-results.py choke, producing empty combined > gcc.{sum,log} files. No idea how this was tested (probably not at all). > > The following patch fixes the syntax error > > diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c > --- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c > +++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c > @@ -290,7 +290,7 @@ RNG (0, 6, 8, "%s%ls", "1", L"2"); > > /* Only conditional calls to must_not_eliminate must be made (with > any probability): > - { dg-final { scan-tree-dump-times "> \\\[\[0-9.\]+%\\\]\\ \\\[count:\\[^:\\]*\\\]:\n *must_not_eliminate" 127 "optimized" { target { ilp32 || lp64 } } } } > - { dg-final { scan-tree-dump-times "> \\\[\[0-9.\]+%\\\]\\ \\\[count:\\[^:\\]*\\\]:\n *must_not_eliminate" 96 "optimized" { target { { ! ilp32 } && { ! lp64 } } } } } > + { dg-final { scan-tree-dump-times "> \\\[\[0-9.\]+%\\\]\\ \\\[count:\\\[^:\\]*\\\]:\n *must_not_eliminate" 127 "optimized" { target { ilp32 || lp64 } } } } > + { dg-final { scan-tree-dump-times "> \\\[\[0-9.\]+%\\\]\\ \\\[count:\\\[^:\\]*\\\]:\n *must_not_eliminate" 96 "optimized" { target { { ! ilp32 } && { ! lp64 } } } } } > No unconditional calls to abort should be made: > { dg-final { scan-tree-dump-not ";\n *must_not_eliminate" "optimized" } } */ > diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp101.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp101.c > --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp101.c > +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp101.c > @@ -10,4 +10,4 @@ int main () > return 0; > } > > -/* { dg-final { scan-tree-dump " \\\[\[0-9.\]+%\\\] \\\[count: \\[^:\\]*\\\]:\[\n\r \]*return 0;" "optimized" } } */ > +/* { dg-final { scan-tree-dump " \\\[\[0-9.\]+%\\\] \\\[count: \\\[^:\\]*\\\]:\[\n\r \]*return 0;" "optimized" } } */ > > but both tests still come out as FAIL: > > +FAIL: gcc.dg/tree-ssa/builtin-sprintf-2.c scan-tree-dump-times optimized "> \\\ > \[[0-9.]+%\\\\]\\\\ \\\\[count:\\\\[^:\\\\]*\\\\]:\\n *must_not_eliminate" 127 > > +FAIL: gcc.dg/tree-ssa/vrp101.c scan-tree-dump optimized " \\\\[[0-9.]+%\\ > \\] \\\\[count: \\\\[^:\\\\]*\\\\]:[\\n\\r ]*return 0;" > > Martin should check what he really meant to match here and fix the > patterns accordingly. I've looked at the patch and committed following change that makes both tests pass. Scanning for [^:]* is weird, it would make more sense to scan for [^]]*, but as only [0-9INV]* can appear there, I think it doesn't hurt to be more precise. 2017-06-14 Jakub Jelinek * gcc.dg/tree-ssa/vrp101.c: Fix scan-tree-dump regex. * gcc.dg/tree-ssa/builtin-sprintf-2.c: Likewise. Adjust comment. --- gcc/testsuite/gcc.dg/tree-ssa/vrp101.c.jj 2017-06-13 22:01:36.000000000 +0200 +++ gcc/testsuite/gcc.dg/tree-ssa/vrp101.c 2017-06-14 08:22:36.296814015 +0200 @@ -10,4 +10,4 @@ int main () return 0; } -/* { dg-final { scan-tree-dump " \\\[\[0-9.\]+%\\\] \\\[count: \\[^:\\]*\\\]:\[\n\r \]*return 0;" "optimized" } } */ +/* { dg-final { scan-tree-dump " \\\[\[0-9.\]+%\\\] \\\[count: \[0-9INV\]*\\\]:\[\n\r \]*return 0;" "optimized" } } */ --- gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c.jj 2017-06-13 22:01:36.000000000 +0200 +++ gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c 2017-06-14 08:22:10.055149125 +0200 @@ -279,18 +279,18 @@ RNG (0, 6, 8, "%s%ls", "1", L"2"); : result_3 = __builtin_sprintf (&MEM[(void *)&buf8k + 8192B], "%c", 32); if (result_3 != 0) - goto ; [50.0%] + goto ; [50.0%] [count: INV] else - goto ; [50.0%] + goto ; [50.0%] [count: INV] - [50.0%]: + [50.0%] [count: INV]: must_not_eliminate (); */ /* Only conditional calls to must_not_eliminate must be made (with any probability): - { dg-final { scan-tree-dump-times "> \\\[\[0-9.\]+%\\\]\\ \\\[count:\\[^:\\]*\\\]:\n *must_not_eliminate" 127 "optimized" { target { ilp32 || lp64 } } } } - { dg-final { scan-tree-dump-times "> \\\[\[0-9.\]+%\\\]\\ \\\[count:\\[^:\\]*\\\]:\n *must_not_eliminate" 96 "optimized" { target { { ! ilp32 } && { ! lp64 } } } } } + { dg-final { scan-tree-dump-times "> \\\[\[0-9.\]+%\\\] \\\[count: \[0-9INV\]*\\\]:\n *must_not_eliminate" 127 "optimized" { target { ilp32 || lp64 } } } } + { dg-final { scan-tree-dump-times "> \\\[\[0-9.\]+%\\\] \\\[count: \[0-9INV\]*\\\]:\n *must_not_eliminate" 96 "optimized" { target { { ! ilp32 } && { ! lp64 } } } } } No unconditional calls to abort should be made: { dg-final { scan-tree-dump-not ";\n *must_not_eliminate" "optimized" } } */ Jakub