Justin Bogner | f69557e | 2014-02-04 06:41:43 +0000 | [diff] [blame] | 1 | -: 0:Source:test.cpp |
| 2 | -: 0:Graph:objdir/test.gcno |
| 3 | -: 0:Data:objdir/test.gcda |
| 4 | -: 0:Runs:2 |
| 5 | -: 0:Programs:1 |
| 6 | -: 1:#include "test.h" |
| 7 | -: 2:#include <cstdlib> |
| 8 | -: 3: |
| 9 | -: 4:bool on = false; |
| 10 | -: 5:int len = 42; |
| 11 | -: 6:double grid[10][10] = {0}; |
| 12 | -: 7:const char * hello = "world"; |
| 13 | -: 8:const char * world = "hello"; |
| 14 | -: 9: |
| 15 | 8589934592: 10:void A::B() {} |
| 16 | -: 11: |
| 17 | #####: 12:void useless() {} |
| 18 | -: 13: |
| 19 | -: 14:double more_useless() { |
| 20 | #####: 15: return 0; |
| 21 | -: 16:} |
| 22 | -: 17: |
| 23 | -: 18:int foo() { |
| 24 | 2: 19: on = true; |
| 25 | 2: 20: return 3; |
| 26 | -: 21:} |
| 27 | -: 22: |
| 28 | -: 23:int bar() { |
| 29 | #####: 24: len--; |
| 30 | #####: 25: return foo() + 45; |
| 31 | -: 26:} |
| 32 | -: 27: |
| 33 | 8: 28:void assign(int ii, int jj) { |
| 34 | 8: 29: grid[ii][jj] = (ii+1) * (jj+1); |
| 35 | 8: 30:} |
| 36 | -: 31: |
| 37 | -: 32:void initialize_grid() { |
| 38 | 12: 33: for (int ii = 0; ii < 2; ii++) |
| 39 | 24: 34: for (int jj = 0; jj < 2; jj++) |
| 40 | 12: 35: assign(ii, jj); |
| 41 | 2: 36:} |
| 42 | -: 37: |
| 43 | -: 38:int main() { |
| 44 | 2: 39: initialize_grid(); |
| 45 | -: 40: |
| 46 | 2: 41: int a = 2; |
| 47 | 2: 42: on = rand() % 2; |
| 48 | 2: 43: if (on) { |
| 49 | 2: 44: foo(); |
| 50 | 2: 45: ++a; |
| 51 | 2: 46: } else { |
| 52 | #####: 47: bar(); |
| 53 | #####: 48: a += rand(); |
| 54 | -: 49: } |
| 55 | -: 50: |
| 56 | 44: 51: for (int ii = 0; ii < 10; ++ii) { |
| 57 | 20: 52: switch (rand() % 5) { |
| 58 | -: 53: case 0: |
| 59 | 4: 54: a += rand(); |
| 60 | 4: 55: break; |
| 61 | -: 56: case 1: |
| 62 | -: 57: case 2: |
| 63 | 2: 58: a += rand() / rand(); |
| 64 | 2: 59: break; |
| 65 | -: 60: case 3: |
| 66 | 6: 61: a -= rand(); |
| 67 | 6: 62: break; |
| 68 | -: 63: default: |
| 69 | 8: 64: a = -1; |
| 70 | 8: 65: } |
| 71 | 20: 66: } |
| 72 | -: 67: |
| 73 | 2: 68: A thing; |
| 74 | 17179869188: 69: for (uint64_t ii = 0; ii < 4294967296; ++ii) |
| 75 | 8589934592: 70: thing.B(); |
| 76 | -: 71: |
| 77 | 2: 72: return a + 8 + grid[2][3] + len; |
| 78 | -: 73: return more_useless(); |
| 79 | -: 74:} |