aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sh/pr54386.c
blob: ec52d89405a7d5bdcfaea6298aa7e7831ed2697b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* Check that the inlined mem load is not handled as unaligned load.  */
/* { dg-do compile }  */
/* { dg-options "-O2" } */
/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } }  */
/* { dg-final { scan-assembler-not "shll|extu|or" } } */

static inline int
readint0 (int* x)
{
  return *x;
}

int
test0 (int* x)
{
  return readint0 (x);
}

inline int
readint1 (int* x)
{
  return *x;
}

int
test1 (int* x)
{
  return readint1 (x);
}

static int
readint2 (int* x)
{
  return *x;
}

int
test2 (int* x)
{
  return readint2 (x);
}