2014-10-24 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / testsuite / gcc.target / sh / pr50749-qihisi-postinc-1.c
blob90db97a273d7d99abe8e18822c6be5e671f49550
1 /* PR target/50749: Verify that post-increment addressing is generated. */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4 /* { dg-final { scan-assembler-times "mov.b\t@r\[0-9]\+\\+,r\[0-9]\+" 1 } } */
5 /* { dg-final { scan-assembler-times "mov.w\t@r\[0-9]\+\\+,r\[0-9]\+" 1 } } */
6 /* { dg-final { scan-assembler-times "mov.l\t@r\[0-9]\+\\+,r\[0-9]\+" 1 } } */
8 char*
9 test_func_00 (char* p, int* x)
11 int r = 0;
12 r += *p++;
13 *x = r;
14 return p;
17 short*
18 test_func_01 (short* p, int* x)
20 int r = 0;
21 r += *p++;
22 *x = r;
23 return p;
26 int*
27 test_func_02 (int* p, int* x)
29 int r = 0;
30 r += *p++;
31 *x = r;
32 return p;