From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25966 invoked by alias); 27 Oct 2009 17:01:24 -0000 Received: (qmail 25649 invoked by uid 22791); 27 Oct 2009 17:01:23 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from g4t0014.houston.hp.com (HELO g4t0014.houston.hp.com) (15.201.24.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Oct 2009 17:01:16 +0000 Received: from smtp2.cup.hp.com (smtp.cup.hp.com [16.89.216.28]) by g4t0014.houston.hp.com (Postfix) with ESMTP id 1CD9F24361; Tue, 27 Oct 2009 17:01:15 +0000 (UTC) Received: from [16.89.92.85] (hpsje.cup.hp.com [16.89.92.85]) by smtp2.cup.hp.com (Postfix) with ESMTP id AC86E39568F; Tue, 27 Oct 2009 16:21:28 +0000 (UTC) Subject: Re: Testsuite regular expression question From: Steve Ellcey Reply-To: sje@cup.hp.com To: "Kaveh R. GHAZI" , Andreas Schwab Cc: gcc@gcc.gnu.org, janis187@us.ibm.com In-Reply-To: References: <200910262306.n9QN6u113854@lucas.cup.hp.com> Content-Type: text/plain Date: Tue, 27 Oct 2009 17:16:00 -0000 Message-Id: <1256662877.23605.20.camel@hpsje.cup.hp.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg00567.txt.bz2 So it looks like the problem isn't in the pattern matching, it is in the counting. If I use this: /* { dg-final { scan-assembler-times "data1.*?0x3.*? DW_AT_inline" 3 } } */ Everything works. If I change it to: /* { dg-final { scan-assembler-times "(data1|byte).*?0x3.*? DW_AT_inline" 3 } } */ Then it fails. But if I change the count from 3 to 2, like this: /* { dg-final { scan-assembler-times "(data1|byte).*?0x3.*? DW_AT_inline" 2 } } */ Then it works again. Now, there are 3 instances of the string in the output file, I know that because the first string that I use (with no pipe in it) works and by looking at the assembler file by hand. But for some reason when I add the parens to the expression then the scan-assembler-times thinks there are only two instances. But there are 3 when I run it by hand and all 3 lines are exactly identical. This must be a bug in the scan-assembler-times code somewhere. Steve Ellcey sje@cup.hp.com