diff options
author | iains <iains@138bc75d-0d04-0410-961f-82ee72b054a4> | 2019-09-09 20:27:05 +0000 |
---|---|---|
committer | iains <iains@138bc75d-0d04-0410-961f-82ee72b054a4> | 2019-09-09 20:27:05 +0000 |
commit | 263cf885a229b28282547a50b457ba2cc7dfc547 (patch) | |
tree | 5babc30a412dda6ee2b298d28e7b135d2f73c3a8 | |
parent | 58236c7c4664704033ee16f10bdd23381a1bf20b (diff) |
[Darwin, testsuite] Address PR91087 - XFAIL parts of pr16855.C.
The testcase is failing to instrument part of the source because of a bug
in the ordering of static DTORs. It seems unlikely that this is generically
fixable in the toolchain (and given that it's likely to be a dynamic loader
change would not be expected to be applied retrospectively to OS versions
that are out of support). To avoid the testsuite noise, xfail the count lines
that don't match (we can adjust the xfails as/when the upstream bug is fixed).
dejagnu xfails do not seem to work when embedded in a line like:
~Test (void) { .... /* count(1) { xfail ... } */ }
the closing brace seems to confuse the parser. The solution is to exapnd the
text onto three lines.
2019-09-09 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline.
2019-07-25 Iain Sandoe <iain@sandoe.co.uk>
PR gcov-profile/91087
* g++.dg/gcov/pr16855.C: Xfail the count lines for the DTORs and the
"final" line for the failure summaries. Adjust source layout so that
dejagnu xfail expressions work.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@275547 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/gcov/pr16855.C | 10 |
2 files changed, 17 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4f37f227c33..1043cf256d1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,16 @@ 2019-09-09 Iain Sandoe <iain@sandoe.co.uk> Backport from mainline. + 2019-07-25 Iain Sandoe <iain@sandoe.co.uk> + + PR gcov-profile/91087 + * g++.dg/gcov/pr16855.C: Xfail the count lines for the DTORs and the + "final" line for the failure summaries. Adjust source layout so that + dejagnu xfail expressions work. + +2019-09-09 Iain Sandoe <iain@sandoe.co.uk> + + Backport from mainline. 2019-06-11 Iain Sandoe <iain@sandoe.co.uk> PR testsuite/65364 diff --git a/gcc/testsuite/g++.dg/gcov/pr16855.C b/gcc/testsuite/g++.dg/gcov/pr16855.C index d7aa8a4f72c..a68b05cb571 100644 --- a/gcc/testsuite/g++.dg/gcov/pr16855.C +++ b/gcc/testsuite/g++.dg/gcov/pr16855.C @@ -1,6 +1,8 @@ /* { dg-options "-fprofile-arcs -ftest-coverage" } */ /* { dg-do run { target native } } */ +/* See PR91087 for information on Darwin xfails. */ + #include <stdlib.h> #include <stdio.h> @@ -18,7 +20,9 @@ class Test { public: Test (void) { fprintf (stderr, "In Test::Test\n"); /* count(1) */ } - ~Test (void) { fprintf (stderr, "In Test::~Test\n"); /* count(1) */ } + ~Test (void) { + fprintf (stderr, "In Test::~Test\n"); /* count(1) { xfail *-*-darwin* } */ + } } T1; void @@ -42,7 +46,7 @@ static void __attribute__ ((constructor)) ctor_default () static void __attribute__ ((destructor)) dtor_default () { - fprintf (stderr, "in destructor(())\n"); /* count(1) */ + fprintf (stderr, "in destructor(())\n"); /* count(1) { xfail *-*-darwin* } */ } -/* { dg-final { run-gcov branches { -b pr16855.C } } } */ +/* { dg-final { run-gcov branches { -b pr16855.C } { xfail *-*-darwin* } } } */ |