From patchwork Thu Jan 10 19:18:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Minor testsuite improvement Date: Thu, 10 Jan 2013 09:18:10 -0000 From: Jeff Law X-Patchwork-Id: 211123 Message-Id: <50EF13F2.2060802@redhat.com> To: Richard Biener Cc: gcc-patches On 01/10/2013 03:13 AM, Richard Biener wrote: > On Thu, Jan 10, 2013 at 6:15 AM, Jeff Law wrote: >> >> Gary Funck noted that vrp06.c has two tests with the same output. After >> further investigation it was clear that expected output strings were too >> lenient and were in fact masking a missed optimization. >> >> This patch tightens the expected output from the vrp dump which has the side >> effect of making each test's string unique. Obviously the masked failure is >> xfailed. >> >> OK for the trunk? > > Hmm, but if the SSA versions are simply i_10 then i_.*0 will still match it > the same? I think you want the more elaborate 'i_\[0-9\]* . 0' here? Applied using Uros's regexp. The final patch is attached for historical purposes. Jeff commit 115e3f9b2615bbe7bce75e4d29638e977c10ac86 Author: law Date: Thu Jan 10 19:16:33 2013 +0000 * gcc/dg/tree-ssa/vrp06.c: Tighten expected output. Make each pass/fail message unique. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195093 138bc75d-0d04-0410-961f-82ee72b054a4 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 46bae82..6df9b9c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-01-10 Jeff Law + + * gcc/dg/tree-ssa/vrp06.c: Tighten expected output. Make each + pass/fail message unique. + + 2013-01-10 Jason Merrill * ada/.gitignore: New. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c index 1ef6c92..cb6df0d 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c @@ -25,7 +25,7 @@ foo (int i, int j, int a) return i + a + j; } -/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */ -/* { dg-final { scan-tree-dump-times "Folding predicate j_.*to 1" 1 "vrp1" } } */ -/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */ +/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9\]+.*0 to 0" 1 "vrp1" } } */ +/* { dg-final { scan-tree-dump-times "Folding predicate j_\[0-9\]+.*0 to 1" 1 "vrp1" } } */ +/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9]+.*j_\[0-9\]+.* to 0" 1 "vrp1" { xfail *-*-* } } } */ /* { dg-final { cleanup-tree-dump "vrp1" } } */