doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/partial-inline.c
raw| 1 | extern void abort (void); |
| 2 | volatile int v; |
| 3 | #define V1 v++; v++; v++; v++; v++; v++; v++; v++; v++; v++; |
| 4 | #define V2 V1 V1 V1 V1 V1 V1 V1 V1 V1 V1 |
| 5 | static int |
| 6 | foo (int x) |
| 7 | { |
| 8 | int a = 2 * x + 4; |
| 9 | int b = 6; |
| 10 | if (x < 30) |
| 11 | { |
| 12 | int c = 8; |
| 13 | int d = 8 * x; |
| 14 | return 6; |
| 15 | } |
| 16 | else |
| 17 | { |
| 18 | int e = 134; |
| 19 | int f = 9 * x; |
| 20 | V2 |
| 21 | return v + 17; |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | int |
| 26 | main (void) |
| 27 | { |
| 28 | if (foo (v) > 10000) |
| 29 | abort (); |
| 30 | foo (70); |
| 31 | return 0; |
| 32 | } |