summaryrefslogtreecommitdiff
path: root/tests/testfile_parameter_ref.c
blob: 7fe985f3d10c06256ef48265848f1bf637f64d07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// gcc -g -O2 -o parameter_ref parameter_ref.c

volatile int vv;

/* Don't inline, but do allow clone to create specialized versions.  */
static __attribute__((noinline)) int
foo (int x, int y, int z)
{
  int a = x * 2;
  int b = y * 2;
  int c = z * 2;
  vv++;
  return x + z;
}

int
main (int x, char **argv)
{
  return foo (x, 2, 3) + foo (x, 4, 3) + foo (x + 6, x, 3) + x;
}