| 1 |
// PR gcov-profile/88263 |
| 2 |
// { dg-options "-fprofile-arcs -ftest-coverage -std=c++11" } |
| 3 |
// { dg-do run { target native } } |
| 4 |
/* { dg-skip-if "requires hosted libstdc++ for sstream" { ! hostedlib } } */ |
| 5 |
|
| 6 |
#include <sstream> |
| 7 |
|
| 8 |
namespace logging { |
| 9 |
class Logstream { |
| 10 |
~Logstream(); |
| 11 |
static thread_local std::ostringstream os_; |
| 12 |
}; |
| 13 |
} |
| 14 |
namespace logging { |
| 15 |
thread_local std::ostringstream Logstream::os_; |
| 16 |
Logstream::~Logstream() { |
| 17 |
os_.clear(); |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
int main() |
| 22 |
{ |
| 23 |
return 0; |
| 24 |
} |
| 25 |
|
| 26 |
// { dg-final { run-gcov pr88263-2.C } } |