(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
sh/
pr50749-qihisi-postinc-1.c
       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 } } */
       7  
       8  char*
       9  test_func_00 (char* p, int* x)
      10  {
      11    int r = 0;
      12    r += *p++;
      13    *x = r;
      14    return p;
      15  }
      16  
      17  short*
      18  test_func_01 (short* p, int* x)
      19  {
      20    int r = 0;
      21    r += *p++;
      22    *x = r;
      23    return p;
      24  }
      25  
      26  int*
      27  test_func_02 (int* p, int* x)
      28  {
      29    int r = 0;
      30    r += *p++;
      31    *x = r;
      32    return p;
      33  }
      34