aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-07-25 18:12:03 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-07-25 18:12:03 +0000
commit7649f2e444bae95d2b093354ace296386691b603 (patch)
tree1b39dc00f63bc83797a7c375ef3e6347d06f2cf3
parent40e1ed26774b7b6c24d166489a715aa75843ab36 (diff)
downloadgcc-7649f2e444bae95d2b093354ace296386691b603.zip
gcc-7649f2e444bae95d2b093354ace296386691b603.tar.gz
gcc-7649f2e444bae95d2b093354ace296386691b603.tar.bz2
[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-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. From-SVN: r273809
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.dg/gcov/pr16855.C10
2 files changed, 14 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ea5d239..6fc4931 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+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-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/65819
diff --git a/gcc/testsuite/g++.dg/gcov/pr16855.C b/gcc/testsuite/g++.dg/gcov/pr16855.C
index d7aa8a4..a68b05c 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* } } } */