From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22973 invoked by alias); 15 Jun 2011 16:52:09 -0000 Received: (qmail 22961 invoked by uid 22791); 15 Jun 2011 16:52:06 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from dair.pair.com (HELO dair.pair.com) (209.68.1.49) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Wed, 15 Jun 2011 16:51:52 +0000 Received: (qmail 50433 invoked by uid 20157); 15 Jun 2011 16:51:51 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 15 Jun 2011 16:51:51 -0000 Date: Wed, 15 Jun 2011 17:15:00 -0000 From: Hans-Peter Nilsson To: Steve Ellcey cc: gcc-patches@gcc.gnu.org Subject: Re: [patch, testsuite] Fix g++.dg/opt/devirt2.C scanning, PR 48727 In-Reply-To: <201106101628.p5AGSXG20686@lucas.cup.hp.com> Message-ID: References: <201106101628.p5AGSXG20686@lucas.cup.hp.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes 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 X-SW-Source: 2011-06/txt/msg01171.txt.bz2 On Fri, 10 Jun 2011, Steve Ellcey wrote: > I will check in this testsuite fix as obvious if there are no objections. But... :) > On IA64 and HPPA the test generates global declarations for the function > as well as calls so the scan-assembler-times fails because it finds the > declarations as well as the two calls. The fix is to make the scans more > specific on IA64 and HPPA. This fix follows the example of what was > done in gcc.dg/tree-ssa/loop-1.c. > > Steve Ellcey > sje@cup.hp.com > > > 2011-06-10 Steve Ellcey > > PR testsuite/48727 > * g++.dg/opt/devirt2.C: Fix scan rules for ia64*-*-* and hppa*-*-*. > > > Index: g++.dg/opt/devirt2.C > =================================================================== > --- g++.dg/opt/devirt2.C (revision 174878) > +++ g++.dg/opt/devirt2.C (working copy) > @@ -1,6 +1,10 @@ > // { dg-do compile } > // { dg-options "-O2" } > -// { dg-final { scan-assembler-times "xyzzy" 2 } } > +// The IA64 and HPPA compilers generate external declarations in addition > +// to the call so those scans need to be more specific. > +// { dg-final { scan-assembler-times "xyzzy" 2 { xfail hppa*-*-* ia64*-*-* } } } JFTR, if you want this to be really right, you should not xfail this part of the test but rather skip it, as the test is at fault, not the targets/gcc. If think it'd be: // { dg-final { scan-assembler-times "xyzzy" 2 { target { ! { hppa*-*-* ia64*-*-* } } } } } > +// { dg-final { scan-assembler-times "br\[^\n\]*xyzzy" 2 { target ia64*-*-* } } } > +// { dg-final { scan-assembler-times "xyzzy\[^\n\]*,%r" 2 { target hppa*-*-* } } } > > struct S { S(); virtual void xyzzy(); }; > struct R { int a; S s; R(); }; > brgds, H-P