aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/sh/pr52483-5.c
blob: 947e8df31c3824d3f41c2575a3cd2942d6c67de1 (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
/* 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-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;
}