From: Martin Liska Date: Mon, 19 Nov 2018 11:19:15 +0000 (+0100) Subject: Fix how we match for count(n*) in gcov tests. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ddd6f407e8021812c6205bebc40098b87faa4239;p=gcc.git Fix how we match for count(n*) in gcov tests. 2018-11-19 Martin Liska * g++.dg/gcov/pr84548.C: Remove remove-gcda. * g++.dg/gcov/ternary.C: Likewise. * lib/gcov.exp: Support pattern of following form: count(1*). From-SVN: r266270 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 271055d349a..3fff2c85e7b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2018-11-19 Martin Liska + + * g++.dg/gcov/pr84548.C: Remove remove-gcda. + * g++.dg/gcov/ternary.C: Likewise. + * lib/gcov.exp: Support pattern of following form: + count(1*). + 2018-11-19 Eric Botcazou * gcc.target/visium/overflow8.c: Remove -fno-if-conversion and diff --git a/gcc/testsuite/g++.dg/gcov/pr84548.C b/gcc/testsuite/g++.dg/gcov/pr84548.C index 6c22c1902f2..3b60b90e2a2 100644 --- a/gcc/testsuite/g++.dg/gcov/pr84548.C +++ b/gcc/testsuite/g++.dg/gcov/pr84548.C @@ -16,4 +16,4 @@ int main() return 0; } -// { dg-final { run-gcov remove-gcda pr84548.C } } +// { dg-final { run-gcov pr84548.C } } diff --git a/gcc/testsuite/g++.dg/gcov/ternary.C b/gcc/testsuite/g++.dg/gcov/ternary.C index d055928c295..9b8e34644b4 100644 --- a/gcc/testsuite/g++.dg/gcov/ternary.C +++ b/gcc/testsuite/g++.dg/gcov/ternary.C @@ -9,4 +9,4 @@ int main() return a; } -// { dg-final { run-gcov remove-gcda ternary.C } } +// { dg-final { run-gcov ternary.C } } diff --git a/gcc/testsuite/lib/gcov.exp b/gcc/testsuite/lib/gcov.exp index a7b8c0a1ef4..dbd3c8e8e44 100644 --- a/gcc/testsuite/lib/gcov.exp +++ b/gcc/testsuite/lib/gcov.exp @@ -59,7 +59,7 @@ proc verify-lines { testname testcase file } { while { [gets $fd line] >= 0 } { # We want to match both "-" and "#####" as count as well as numbers, # since we want to detect lines that shouldn't be marked as covered. - if [regexp "^ *(\[^:]*): *(\[0-9\\-#]+):.*count\\((\[0-9\\-#=\\.kMGTPEZY]+)\\)(.*)" \ + if [regexp "^ *(\[^:]*): *(\[0-9\\-#]+):.*count\\((\[0-9\\-#=\\.kMGTPEZY\*]+)\\)(.*)" \ "$line" all is n shouldbe rest] { if [regexp "^ *{(.*)}" $rest all xfailed] { switch [dg-process-target $xfailed] {