public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: Tom de Vries <Tom_deVries@mentor.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PING, testsuite] Add dot-file scan to test-case
Date: Mon, 18 Apr 2016 08:40:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.11.1604181040260.13384@t29.fhfr.qr> (raw)
In-Reply-To: <571493C3.7000803@mentor.com>

On Mon, 18 Apr 2016, Tom de Vries wrote:

> On 18-04-16 09:30, Richard Biener wrote:
> > > > diff --git a/gcc/testsuite/lib/scandump.exp
> > > > b/gcc/testsuite/lib/scandump.exp
> > > > > >index 74d27cc..89b3944 100644
> > > > > >--- a/gcc/testsuite/lib/scandump.exp
> > > > > >+++ b/gcc/testsuite/lib/scandump.exp
> > > > > >@@ -22,7 +22,7 @@
> > > > > >   # Extract the constant part of the dump file suffix from the
> > > > regexp.
> > > > > >   # Argument 0 is the regular expression.
> > > > > >   proc dump-suffix { arg } {
> > > > > >-    set idx [expr [string last "." $arg] + 1]
> > > > > >+    set idx [expr [string first "." $arg] + 1]
> > Does that even work?  For t.c.012t.foo the first "." is after 't'.
> 
> With this patch:
> ....
> diff --git a/gcc/testsuite/lib/scandump.exp b/gcc/testsuite/lib/scandump.exp
> index 89b3944..89e5754 100644
> --- a/gcc/testsuite/lib/scandump.exp
> +++ b/gcc/testsuite/lib/scandump.exp
> @@ -22,6 +22,7 @@
>  # Extract the constant part of the dump file suffix from the regexp.
>  # Argument 0 is the regular expression.
>  proc dump-suffix { arg } {
> +    puts "dump-suffix arg: $arg"
>      set idx [expr [string first "." $arg] + 1]
>      return [string range $arg $idx end]
>  }
> ...
> 
> I see:
> ...
> dump-suffix arg: [0-9][0-9][0-9]i.inline.dot
> dump-suffix arg: [0-9][0-9][0-9]i.cp.dot
> ...
> 
> So, by cutting off after the first dot, we find 'inline.dot' and 'cp.dot',
> instead of just 'dot'.

Ah, I see.  Patch is ok for trunk then.

Richard.

      reply	other threads:[~2016-04-18  8:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14 15:33 [PATCH, PR70161] Fix fdump-ipa-all-graph Tom de Vries
2016-03-15 11:37 ` Richard Biener
2016-03-17 11:16   ` Tom de Vries
2016-03-17 11:19     ` Richard Biener
2016-03-18  9:33   ` Tom de Vries
2016-03-18  9:45     ` Tom de Vries
2016-04-17  6:09       ` [PING, testsuite] Add dot-file scan to test-case Tom de Vries
2016-04-18  7:30         ` Richard Biener
2016-04-18  7:59           ` Tom de Vries
2016-04-18  8:40             ` Richard Biener [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.LSU.2.11.1604181040260.13384@t29.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=Tom_deVries@mentor.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    /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).