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
11struct div_t {
12  unsigned q;
13};
14
15unsigned f0(unsigned n, unsigned d)
16{
17  return n/d;
18}
19
20struct div_t f1(unsigned n, unsigned d)
21{
22  struct div_t r = { n / d };
23  return r;
24}
25
26struct div_t f2(unsigned n, unsigned d)
27{
28  return (struct div_t){n/d};
29}
30