From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6092 invoked by alias); 10 Jun 2011 16:37:23 -0000 Received: (qmail 5895 invoked by uid 22791); 10 Jun 2011 16:37:21 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from g4t0016.houston.hp.com (HELO g4t0016.houston.hp.com) (15.201.24.19) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Jun 2011 16:37:08 +0000 Received: from g4t0009.houston.hp.com (g4t0009.houston.hp.com [16.234.32.26]) by g4t0016.houston.hp.com (Postfix) with ESMTP id 993E3143A1 for ; Fri, 10 Jun 2011 16:37:04 +0000 (UTC) Received: from lucas.cup.hp.com (lucas.cup.hp.com [15.244.97.116]) by g4t0009.houston.hp.com (Postfix) with ESMTP id 5C4D9C3A9 for ; Fri, 10 Jun 2011 16:37:04 +0000 (UTC) Received: (from sje@localhost) by lucas.cup.hp.com (8.11.1 (PHNE_35485)/8.11.1) id p5AGSXG20686 for gcc-patches@gcc.gnu.org; Fri, 10 Jun 2011 09:28:33 -0700 (PDT) Date: Fri, 10 Jun 2011 17:09:00 -0000 From: Steve Ellcey Message-Id: <201106101628.p5AGSXG20686@lucas.cup.hp.com> To: gcc-patches@gcc.gnu.org Subject: [patch, testsuite] Fix g++.dg/opt/devirt2.C scanning, PR 48727 Reply-to: sje@cup.hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00860.txt.bz2 I will check in this testsuite fix as obvious if there are no objections. 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*-*-* } } } +// { 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(); };