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 global; 12 13int mult(int x, int y) 14{ 15 return x * y; 16} 17 18int f(int x) { return x + 1; } 19int g(int y) { return y * 2; } 20 21int something(void) 22{ 23 int r; 24 r = mult(f(7), g(7)); 25 return r; 26} 27 28int something_else(int i) 29{ 30 return mult(f(i),g(i+1)); 31} 32 33int another(int i) 34{ 35 int x = mult(f(i), g(i+1)); 36 return x + 1; 37} 38 39