blob: 7fe985f3d10c06256ef48265848f1bf637f64d07 [file] [log] [blame]
Mark Wielaard6e6e54e2013-08-31 00:52:12 +02001// gcc -g -O2 -o parameter_ref parameter_ref.c
2
3volatile int vv;
4
5/* Don't inline, but do allow clone to create specialized versions. */
6static __attribute__((noinline)) int
7foo (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
16int
17main (int x, char **argv)
18{
19 return foo (x, 2, 3) + foo (x, 4, 3) + foo (x + 6, x, 3) + x;
20}