aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sh/pr52483-5.c
blob: 50aefe2cddec6484dedf5b1fb7ba74f2b7ea8f4d (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
/* Check that loads from volatile mems utilize post-increment addressing
   modes and do not result in redundant sign extensions. */
/* { dg-do compile }  */
/* { dg-options "-O1" } */
/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } }  */
/* { dg-final { scan-assembler-times "@r\[0-9\]\+\\+," 3 } } */
/* { dg-final { scan-assembler-not "exts" } } */

volatile char*
test_00 (volatile char* x)
{
  int xx = *x++;
  return x;
}

volatile short*
test_01 (volatile short* x)
{
  int xx = *x++;
  return x;
}

volatile int*
test_02 (volatile int* x)
{
  int xx = *x++;
  return x;
}