1/*
2 * Copyright 2014, NICTA
3 *
4 * This software may be distributed and modified according to the terms of
5 * the BSD 2-Clause license. Note that NO WARRANTY is provided.
6 * See "LICENSE_BSD2.txt" for details.
7 *
8 * @TAG(NICTA_BSD)
9 */
10
11int x, y;
12
13int array1[10], array2[20];
14
15int *ptr;
16
17int f(void)
18{
19  x = 3;
20  return y;
21}
22
23void g1(int i)
24{
25  array1[i] = f();
26}
27
28void g2(int j)
29{
30  *ptr = f();
31}
32
33void h(int i)
34{
35  g1(i);
36}
37
38void ifn(int *p, int i)
39{
40  *p = i;
41}
42
43void jfn(void)
44{
45  ifn(array2 + 3);
46}
47
48void k(void)
49{
50  y = f();
51}
52
53void mrec2(void);
54void mrec1(void)
55{
56  int tmp = mrec2();
57  array1[f()] = tmp;
58}
59
60void mrec2(void)
61{
62  if (x > 4) mrec1();
63  else y = 10;
64}
65
66int a(void)
67{
68  mrec2();
69  return 3;
70}
71