diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/gcov/gcov-3.C')
-rw-r--r-- | gcc/testsuite/g++.dg/gcov/gcov-3.C | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-3.C b/gcc/testsuite/g++.dg/gcov/gcov-3.C new file mode 100644 index 000000000..aff063a4b --- /dev/null +++ b/gcc/testsuite/g++.dg/gcov/gcov-3.C @@ -0,0 +1,17 @@ +/* Check that gcov doesn't abort when a static object is defined + within a header file. */ + +/* { dg-options "-fprofile-arcs -ftest-coverage" } */ +/* { dg-do run { target native } } */ + +#include "gcov-3.h" + +extern int foo(); + +int +main () +{ + return foo(); /* count(1) */ +} + +/* { dg-final { run-gcov gcov-3.C } } */ |