This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING, testsuite] Add dot-file scan to test-case
- From: Richard Biener <rguenther at suse dot de>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Mon, 18 Apr 2016 10:40:40 +0200 (CEST)
- Subject: Re: [PING, testsuite] Add dot-file scan to test-case
- Authentication-results: sourceware.org; auth=none
- References: <56E6D97F dot 3030606 at mentor dot com> <alpine dot LSU dot 2 dot 11 dot 1603151237080 dot 15580 at t29 dot fhfr dot qr> <56EBC8F6 dot 4010704 at mentor dot com> <56EBCBF5 dot 8060302 at mentor dot com> <5713281A dot 3070806 at mentor dot com> <alpine dot LSU dot 2 dot 11 dot 1604180929290 dot 13384 at t29 dot fhfr dot qr> <571493C3 dot 7000803 at mentor dot 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.