(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
sh/
pr50751-6.c
       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
       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
      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