summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/inline-16.c
blob: 4f9fe978baa42ad665782f1942fed2b5771b1cc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do link } */
/* { dg-options "-std=c99" } */

static inline __SIZE_TYPE__
func1(const volatile void * base, __SIZE_TYPE__ byteOffset)
{
  volatile __SIZE_TYPE__ *addr
    = (volatile __SIZE_TYPE__ *)((__SIZE_TYPE__)base + byteOffset);
  return *addr;
}

static inline __SIZE_TYPE__
func2(__SIZE_TYPE__ data)
{
    return func1(&data, 0);
}

int main(int argc, char *argv[]) {
  __SIZE_TYPE__ b = func2(argc);

  return 0;
}