This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Enhance dump_probability function.
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Paul Hua <paul dot hua dot gm at gmail dot com>
- Cc: Martin Liška <mliska at suse dot cz>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 14 Jun 2017 07:52:10 +0200
- Subject: Re: [PATCH] Enhance dump_probability function.
- Authentication-results: sourceware.org; auth=none
- References: <f776d98c-d5db-edd7-54b8-995b3eb08a19@suse.cz> <CAKjxQH=iSB4=HdO0BP6O6C=c6m6XMQ7siuNNnuiE_2-v1Y6J_g@mail.gmail.com>
Hi Paul,
> New "ERROR: (DejaGnu)" on mips64el target.
>
> my DejaGnu version is 1.5.1.
>
> 1)
> make check-gcc RUNTESTFLAGS="tree-ssa.exp=builtin-sprintf-2.c"
> ...
> ERROR: (DejaGnu) proc "^:\\" does not exist.
> The error code is TCL LOOKUP COMMAND ^:\\
> The info on the error is:
> invalid command name "^:\"
> while executing
> "::tcl_unknown ^:\\"
> ("uplevel" body line 1)
> invoked from within
> "uplevel 1 ::tcl_unknown $args"
> ...
>
> 2)
> make check-gcc RUNTESTFLAGS="tree-ssa.exp=vrp101.c"
> ...
> ERROR: (DejaGnu) proc "^:\\" does not exist.
> The error code is TCL LOOKUP COMMAND ^:\\
> The info on the error is:
> invalid command name "^:\"
> while executing
> "::tcl_unknown ^:\\"
> ("uplevel" body line 1)
> invoked from within
> "uplevel 1 ::tcl_unknown $args"
> ...
>
> I don't known how to debug this, any advice ?
both revised scan-tree-dump patterns got the quoting wrong, leading to
attempts to run unknown procs ^\\: instead of matching [^:] ;-(
This totally broke make check-gcc: the affected partial test runs
aborted at that point, leading to gcc.{sum,log} files that make
contrib/dg-extract-results.py choke, producing empty combined
gcc.{sum,log} files. No idea how this was tested (probably not at all).
The following patch fixes the syntax error
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c
@@ -290,7 +290,7 @@ RNG (0, 6, 8, "%s%ls", "1", L"2");
/* Only conditional calls to must_not_eliminate must be made (with
any probability):
- { dg-final { scan-tree-dump-times "> \\\[\[0-9.\]+%\\\]\\ \\\[count:\\[^:\\]*\\\]:\n *must_not_eliminate" 127 "optimized" { target { ilp32 || lp64 } } } }
- { dg-final { scan-tree-dump-times "> \\\[\[0-9.\]+%\\\]\\ \\\[count:\\[^:\\]*\\\]:\n *must_not_eliminate" 96 "optimized" { target { { ! ilp32 } && { ! lp64 } } } } }
+ { dg-final { scan-tree-dump-times "> \\\[\[0-9.\]+%\\\]\\ \\\[count:\\\[^:\\]*\\\]:\n *must_not_eliminate" 127 "optimized" { target { ilp32 || lp64 } } } }
+ { dg-final { scan-tree-dump-times "> \\\[\[0-9.\]+%\\\]\\ \\\[count:\\\[^:\\]*\\\]:\n *must_not_eliminate" 96 "optimized" { target { { ! ilp32 } && { ! lp64 } } } } }
No unconditional calls to abort should be made:
{ dg-final { scan-tree-dump-not ";\n *must_not_eliminate" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp101.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp101.c
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp101.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp101.c
@@ -10,4 +10,4 @@ int main ()
return 0;
}
-/* { dg-final { scan-tree-dump "<bb 2> \\\[\[0-9.\]+%\\\] \\\[count: \\[^:\\]*\\\]:\[\n\r \]*return 0;" "optimized" } } */
+/* { dg-final { scan-tree-dump "<bb 2> \\\[\[0-9.\]+%\\\] \\\[count: \\\[^:\\]*\\\]:\[\n\r \]*return 0;" "optimized" } } */
but both tests still come out as FAIL:
+FAIL: gcc.dg/tree-ssa/builtin-sprintf-2.c scan-tree-dump-times optimized "> \\\
\[[0-9.]+%\\\\]\\\\ \\\\[count:\\\\[^:\\\\]*\\\\]:\\n *must_not_eliminate" 127
+FAIL: gcc.dg/tree-ssa/vrp101.c scan-tree-dump optimized "<bb 2> \\\\[[0-9.]+%\\
\\] \\\\[count: \\\\[^:\\\\]*\\\\]:[\\n\\r ]*return 0;"
Martin should check what he really meant to match here and fix the
patterns accordingly.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University