gcc:
[official-gcc.git] / gcc / testsuite / gcc.target / sh / pr50751-6.c
blob129729037e22822365f4a0a875594f722ad795d9
1 /* Check that on SH2A the 4 byte mov.w displacement insn is generated to
2 handle larger displacements. If it is generated correctly, there should
3 be no base address adjustments outside the mov.w insns. */
4 /* { dg-do compile } */
5 /* { dg-options "-O1" } */
6 /* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
7 /* { dg-final { scan-assembler-not "add|sub" } } */
9 void
10 testfunc_00 (const short* ap, short* bp)
12 bp[100] = ap[15];
13 bp[200] = ap[50];
14 bp[900] = ap[71];
15 bp[0] = ap[25];
18 void
19 testfunc_01 (volatile const short* ap, volatile short* bp)
21 bp[100] = ap[15];
22 bp[200] = ap[50];
23 bp[900] = ap[71];
24 bp[0] = ap[25];