public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steve Ellcey <sje@cup.hp.com>
To: "Kaveh R. GHAZI" <ghazi@caip.rutgers.edu>,
		Andreas Schwab <schwab@redhat.com>
Cc: gcc@gcc.gnu.org, janis187@us.ibm.com
Subject: Re: Testsuite regular expression question
Date: Tue, 27 Oct 2009 17:16:00 -0000	[thread overview]
Message-ID: <1256662877.23605.20.camel@hpsje.cup.hp.com> (raw)
In-Reply-To: <Pine.GSO.4.58.0910270201450.4284@caipclassic.rutgers.edu>


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

  parent reply	other threads:[~2009-10-27 17:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-26 23:35 Steve Ellcey
2009-10-27 10:38 ` Kaveh R. GHAZI
2009-10-27 17:00   ` Steve Ellcey
2009-10-27 17:13     ` Andreas Schwab
2009-10-27 17:22       ` Steve Ellcey
2009-10-27 20:18         ` Andreas Schwab
2009-10-27 17:16   ` Steve Ellcey [this message]
2009-10-27 12:03 ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1256662877.23605.20.camel@hpsje.cup.hp.com \
    --to=sje@cup.hp.com \
    --cc=gcc@gcc.gnu.org \
    --cc=ghazi@caip.rutgers.edu \
    --cc=janis187@us.ibm.com \
    --cc=schwab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).