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 11unsigned z; 12 13unsigned f(void) 14{ 15 static unsigned x = 0; 16 x++; 17 return x; 18} 19 20unsigned g1(void) 21{ 22 z++; 23 return z; 24} 25 26unsigned g2(void) 27{ 28 static unsigned z; 29 z++; 30 return z; 31} 32 33unsigned h1(void) 34{ 35 static unsigned xx = 1; 36 return xx; 37} 38 39unsigned h2(void) 40{ 41 static unsigned x; 42 return x; 43} 44 45unsigned h3(unsigned x) 46{ 47 static unsigned xx = 0; 48 xx += x; 49 return xx; 50} 51