Brian Silverman | 8649792 | 2018-02-10 19:28:39 -0500 | [diff] [blame^] | 1 | // gcc -g -O2 -o parameter_ref parameter_ref.c |
2 | |||||
3 | volatile int vv; | ||||
4 | |||||
5 | /* Don't inline, but do allow clone to create specialized versions. */ | ||||
6 | static __attribute__((noinline)) int | ||||
7 | foo (int x, int y, int z) | ||||
8 | { | ||||
9 | int a = x * 2; | ||||
10 | int b = y * 2; | ||||
11 | int c = z * 2; | ||||
12 | vv++; | ||||
13 | return x + z; | ||||
14 | } | ||||
15 | |||||
16 | int | ||||
17 | main (int x, char **argv) | ||||
18 | { | ||||
19 | return foo (x, 2, 3) + foo (x, 4, 3) + foo (x + 6, x, 3) + x; | ||||
20 | } |