(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
sh/
pr61142.c
       1  /* Check that @(r0,rm),rn insns load into r0.  */
       2  /* { dg-do compile }  */
       3  /* { dg-options "-O2" }  */
       4  /* { dg-final { scan-assembler-times "mov.b\t@\\(r0,r\[0123456789\]\\),r0" 1 } }  */
       5  /* { dg-final { scan-assembler-times "mov.w\t@\\(r0,r\[0123456789\]\\),r0" 1 } }  */
       6  /* { dg-final { scan-assembler-times "mov.l\t@\\(r0,r\[0123456789\]\\),r0" 1 } }  */
       7  
       8  int
       9  test_00 (const char* x, int a, int b, int c)
      10  {
      11    if (x[a] == 92)
      12      return b;
      13    return c;
      14  }
      15  
      16  int
      17  test_01 (const short* x, int a, int b, int c)
      18  {
      19    if (x[a] == 92)
      20      return b;
      21    return c;
      22  }
      23  
      24  int
      25  test_02 (const int* x, int a, int b, int c)
      26  {
      27    if (x[a] == 92)
      28      return b;
      29    return c;
      30  }