public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@embecosm.com>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: gcc-patches@gcc.gnu.org,
	Rainer Orth <ro@cebitec.uni-bielefeld.de>,
	 Mike Stump <mikestump@comcast.net>
Subject: Re: [PATCH] testsuite: Fix subexpressions with `scan-assembler-times'
Date: Wed, 22 Nov 2023 02:13:10 +0000 (GMT)	[thread overview]
Message-ID: <alpine.DEB.2.20.2311200912000.5892@tpp.orcam.me.uk> (raw)
In-Reply-To: <cc037c9c-b4c8-45a0-8cf0-bd91147b962c@gmail.com>

On Sun, 19 Nov 2023, Jeff Law wrote:

> >   Verified with the `riscv64-linux-gnu' target and the C language
> > testsuite.  OK to apply?
> Not sure why it is the way it is -- I walked back to Zdenek's change which
> introduced the scan-assembler-times and nothing about the -inline argument.

 I went through our history beforehand too and found nothing interesting 
either.  My only suspicion has been it may have happened as a conseqence 
of somewhat confusing regexp(n) TCL documentation just saying:

"Determines whether the regular expression exp matches part or all of 
string and returns 1 if it does, 0 if it does not, unless -inline is 
specified (see below)."

and then you need to dive into the description of `-all' to find out it 
actually returns the number of matches rather than just 1 or 0:

"Causes the regular expression to be matched as many times as possible in 
the string, returning the total number of matches found."

I guess maybe Zdenek missed the part after the comma?

> OK, but be on the lookout for scan-asm problems on other targets over the next
> few days.

 Good point.  I have grepped our testsuite for instances and found only 
one (as opposed to numerous non-captured subexpressions), specifically 
gcc/testsuite/gcc.target/arm/pr53447-5.c, well-documented as working 
around the quirk.  I've posted a change to avoid the quirk with this case: 
<https://gcc.gnu.org/pipermail/gcc-patches/2023-November/637710.html> and 
I mean to apply it just before this `scan-assembler-times' fix.

  Maciej

      reply	other threads:[~2023-11-22  2:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-19 11:27 Maciej W. Rozycki
2023-11-19 23:44 ` Jeff Law
2023-11-22  2:13   ` Maciej W. Rozycki [this message]

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=alpine.DEB.2.20.2311200912000.5892@tpp.orcam.me.uk \
    --to=macro@embecosm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=mikestump@comcast.net \
    --cc=ro@cebitec.uni-bielefeld.de \
    /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).