Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/gcov/pr16855.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-options "-fprofile-arcs -ftest-coverage" } */ /* { dg-do run { target native } } */ /* See PR91087 for information on Darwin xfails. */ #include <stdlib.h> #include <stdio.h> int a; void foo () { fprintf (stderr, "In foo\n"); a = 123; /* count(1) */ } using namespace std; 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* } */ } } T1; void uncalled (void) { fprintf (stderr, "In uncalled\n"); /* count(#####) */ } int main (void) { atexit (&foo); fprintf (stderr, "In main\n"); /* count(1) */ return 0; } static void __attribute__ ((constructor)) ctor_default () { fprintf (stderr, "in constructor(())\n"); /* count(1) */ } 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* } } } */