gcc/testsuite/g++.dg/gcov/pr84548.C
raw| 1 | // PR gcov-profile/84548 |
| 2 | // { dg-options "-fprofile-arcs -ftest-coverage" } |
| 3 | // { dg-do run { target native } } |
| 4 | // TODO: add support for groups to gcov.exp script |
| 5 | |
| 6 | struct A { static int foo () { return 1; }; static int bar () { |
| 7 | int x; |
| 8 | return 2; } }; |
| 9 | |
| 10 | int main() |
| 11 | { |
| 12 | int a = A::foo () + A::bar (); |
| 13 | if (a != 3) |
| 14 | return 1; |
| 15 | |
| 16 | return 0; |
| 17 | } |
| 18 | |
| 19 | // { dg-final { run-gcov pr84548.C } } |