https://gcc.gnu.org/g:95b3ef86f025c52f1787b7726aee50f3b16f7394

commit r16-5797-g95b3ef86f025c52f1787b7726aee50f3b16f7394
Author: Rainer Orth <[email protected]>
Date:   Mon Dec 1 14:04:03 2025 +0100

    testsuite: xfail g++.dg/gcov/pr16855*.C on Solaris [PR52477,PR81337]
    
    The g++.dg/gcov/pr16855*.C tests FAIL on Solaris:
    
    FAIL: g++.dg/gcov/pr16855.C  -std=gnu++17  gcov: 1 failures in line counts, 
0 in branch percentages, 0 in condition/decision, 0 in prime-paths, 0 in return 
percentages, 0 in intermediate format, 0 failed in filters
    FAIL: g++.dg/gcov/pr16855.C  -std=gnu++17  line 24: is #####:should be 1
    FAIL: g++.dg/gcov/pr16855.C  -std=gnu++26  gcov: 6 failures in line counts, 
0 in branch percentages, 0 in condition/decision, 0 in prime-paths, 0 in return 
percentages, 0 in intermediate format, 0 failed in filters
    FAIL: g++.dg/gcov/pr16855.C  -std=gnu++26  line 15: is 3:should be 1
    FAIL: g++.dg/gcov/pr16855.C  -std=gnu++26  line 22: is 3:should be 1
    FAIL: g++.dg/gcov/pr16855.C  -std=gnu++26  line 24: is #####:should be 1
    FAIL: g++.dg/gcov/pr16855.C  -std=gnu++26  line 38: is 3:should be 1
    FAIL: g++.dg/gcov/pr16855.C  -std=gnu++26  line 44: is 3:should be 1
    FAIL: g++.dg/gcov/pr16855.C  -std=gnu++26  line 49: is 3:should be 1
    
    Same for -std=gnu++98.
    
    The issue has long been known and the failures generate an excessive
    amount of noise.  Since the PRs haven't seen any activity in years, this
    patch xfail's them.
    
    Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11,
    x86_64-pc-linux-gnu, and x86_64-apple-darwin25.1.0.
    
    2025-11-26  Rainer Orth  <[email protected]>
    
            gcc/testsuite:
            PR c++/81337
            PR c++/52477
            * g++.dg/gcov/pr16855.C (Test::~Test): xfail on *-*-solaris2*
            (dg-final): Likewise.
            * g++.dg/gcov/pr16855-priority.C (Test::~Test): Likewise.
            (dg-final): Likewise.

Diff:
---
 gcc/testsuite/g++.dg/gcov/pr16855-priority.C | 4 ++--
 gcc/testsuite/g++.dg/gcov/pr16855.C          | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/gcc/testsuite/g++.dg/gcov/pr16855-priority.C 
b/gcc/testsuite/g++.dg/gcov/pr16855-priority.C
index c7a58397bb91..ebdcad5d94fb 100644
--- a/gcc/testsuite/g++.dg/gcov/pr16855-priority.C
+++ b/gcc/testsuite/g++.dg/gcov/pr16855-priority.C
@@ -20,7 +20,7 @@ class Test
 public:
   Test (void) { fprintf (stderr, "In Test::Test\n"); /* count(1) */ }
   ~Test (void) {
-   fprintf (stderr, "In Test::~Test\n"); /* count(1) { xfail *-*-dragonfly* } 
*/
+   fprintf (stderr, "In Test::~Test\n"); /* count(1) { xfail *-*-dragonfly* 
*-*-solaris2* } */
   }
 } T1;
 
@@ -78,4 +78,4 @@ static void __attribute__ ((destructor ((65535)))) dtor_65535 
()
   fprintf (stderr, "in destructor((65535))\n"); /* count(1) */
 }
 
-/* { dg-final { run-gcov branches { -b pr16855-priority.C } { xfail 
*-*-dragonfly* } } } */
+/* { dg-final { run-gcov branches { -b pr16855-priority.C } { xfail 
*-*-dragonfly* *-*-solaris2* } } } */
diff --git a/gcc/testsuite/g++.dg/gcov/pr16855.C 
b/gcc/testsuite/g++.dg/gcov/pr16855.C
index f9b86a40001f..724ee02813a9 100644
--- a/gcc/testsuite/g++.dg/gcov/pr16855.C
+++ b/gcc/testsuite/g++.dg/gcov/pr16855.C
@@ -1,7 +1,8 @@
 /* { dg-options "-fprofile-arcs -ftest-coverage" } */
 /* { dg-do run { target native } } */
 
-/* See PR91087 for information on Darwin xfails. */
+/* See PR91087 for information on Darwin xfails.  Also PR81337 for Solaris
+   ones.*/
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -21,7 +22,7 @@ class Test
 public:
   Test (void) { fprintf (stderr, "In Test::Test\n"); /* count(1) */ }
   ~Test (void) {
-   fprintf (stderr, "In Test::~Test\n"); /* count(1) { xfail *-*-darwin* 
*-*-dragonfly* } */
+   fprintf (stderr, "In Test::~Test\n"); /* count(1) { xfail *-*-darwin* 
*-*-dragonfly* *-*-solaris2* } */
   }
 } T1;
 
@@ -49,4 +50,4 @@ static void __attribute__ ((destructor)) dtor_default ()
   fprintf (stderr, "in destructor(())\n"); /* count(1) { xfail *-*-darwin* } */
 }
 
-/* { dg-final { run-gcov branches { -b pr16855.C } { xfail *-*-darwin* 
*-*-dragonfly* } } } */
+/* { dg-final { run-gcov branches { -b pr16855.C } { xfail *-*-darwin* 
*-*-dragonfly* *-*-solaris2* } } } */

Reply via email to