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 { target { sh2a } } }  */
5 /* { dg-options "-O1" } */
6 /* { dg-final { scan-assembler-not "add|sub" } } */
7 
8 void
testfunc_00(const short * ap,short * bp)9 testfunc_00 (const short* ap, short* bp)
10 {
11   bp[100] = ap[15];
12   bp[200] = ap[50];
13   bp[900] = ap[71];
14   bp[0] = ap[25];
15 }
16 
17 void
testfunc_01(volatile const short * ap,volatile short * bp)18 testfunc_01 (volatile const short* ap, volatile short* bp)
19 {
20   bp[100] = ap[15];
21   bp[200] = ap[50];
22   bp[900] = ap[71];
23   bp[0] = ap[25];
24 }
25 
26