Hi, consider complex-6.c, that passes as: ... PASS: gcc.dg/complex-6.c (test for excess errors) PASS: gcc.dg/complex-6.c scan-tree-dump-times cplxlower1 "unord" 1 PASS: gcc.dg/complex-6.c scan-tree-dump-times cplxlower1 "__mulsc3" 1 ...
If we drop one argument from the first scan-tree-dump-times: ... -/* { dg-final { scan-tree-dump-times "unord" 1 "cplxlower1" } } */ +/* { dg-final { scan-tree-dump-times "unord" 1 } } */ ... we get: ... PASS: gcc.dg/complex-6.c (test for excess errors) ERROR: gcc.dg/complex-6.c: error executing dg-final: scan-tree-dump: too few arguments UNRESOLVED: gcc.dg/complex-6.c: error executing dg-final: scan-tree-dump: too few arguments ... while I would expect 'scan-tree-dump-times' to be used in the error message, like this: ... PASS: gcc.dg/complex-6.c (test for excess errors) ERROR: gcc.dg/complex-6.c: error executing dg-final: scan-tree-dump-times: too few arguments UNRESOLVED: gcc.dg/complex-6.c: error executing dg-final: scan-tree-dump-times: too few arguments ... This patch fixes that for scan-{assembler,ipa,rtl,tree}-times. Committed as obvious. Thanks, - Tom [testsuite] Fix "too few/many" error messages in scan-*-times procs 2018-05-21 Tom de Vries <t...@codesourcery.com> * lib/scanasm.exp (scan-assembler-times): Use proc name in error message. * lib/scanipa.exp (scan-ipa-dump-times): Same. * lib/scanrtl.exp (scan-rtl-dump-times): Same. * lib/scantree.exp (scan-tree-dump-times): Same. --- gcc/testsuite/lib/scanasm.exp | 4 ++-- gcc/testsuite/lib/scanipa.exp | 4 ++-- gcc/testsuite/lib/scanrtl.exp | 4 ++-- gcc/testsuite/lib/scantree.exp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp index 701e1f6..ad964fb 100644 --- a/gcc/testsuite/lib/scanasm.exp +++ b/gcc/testsuite/lib/scanasm.exp @@ -229,11 +229,11 @@ proc scan-ada-spec-not { args } { # Call pass if pattern is present given number of times, otherwise fail. proc scan-assembler-times { args } { if { [llength $args] < 2 } { - error "scan-assembler: too few arguments" + error "scan-assembler-times: too few arguments" return } if { [llength $args] > 3 } { - error "scan-assembler: too many arguments" + error "scan-assembler-times: too many arguments" return } if { [llength $args] >= 3 } { diff --git a/gcc/testsuite/lib/scanipa.exp b/gcc/testsuite/lib/scanipa.exp index 68f1ae3..56c82c5 100644 --- a/gcc/testsuite/lib/scanipa.exp +++ b/gcc/testsuite/lib/scanipa.exp @@ -52,11 +52,11 @@ proc scan-ipa-dump { args } { proc scan-ipa-dump-times { args } { if { [llength $args] < 3 } { - error "scan-ipa-dump: too few arguments" + error "scan-ipa-dump-times: too few arguments" return } if { [llength $args] > 4 } { - error "scan-ipa-dump: too many arguments" + error "scan-ipa-dump-times: too many arguments" return } if { [llength $args] >= 4 } { diff --git a/gcc/testsuite/lib/scanrtl.exp b/gcc/testsuite/lib/scanrtl.exp index d744e7d..a24d005 100644 --- a/gcc/testsuite/lib/scanrtl.exp +++ b/gcc/testsuite/lib/scanrtl.exp @@ -54,11 +54,11 @@ force_conventional_output_for scan-rtl-dump proc scan-rtl-dump-times { args } { if { [llength $args] < 3 } { - error "scan-rtl-dump: too few arguments" + error "scan-rtl-dump-times: too few arguments" return } if { [llength $args] > 4 } { - error "scan-rtl-dump: too many arguments" + error "scan-rtl-dump-times: too many arguments" return } if { [llength $args] >= 4 } { diff --git a/gcc/testsuite/lib/scantree.exp b/gcc/testsuite/lib/scantree.exp index e66337a..d827190 100644 --- a/gcc/testsuite/lib/scantree.exp +++ b/gcc/testsuite/lib/scantree.exp @@ -52,11 +52,11 @@ proc scan-tree-dump { args } { proc scan-tree-dump-times { args } { if { [llength $args] < 3 } { - error "scan-tree-dump: too few arguments" + error "scan-tree-dump-times: too few arguments" return } if { [llength $args] > 4 } { - error "scan-tree-dump: too many arguments" + error "scan-tree-dump-times: too many arguments" return } if { [llength $args] >= 4 } {