(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
riscv/
save-restore-2.c
       1  /* { dg-options "-msave-restore" } */
       2  /* { dg-skip-if "" { *-*-* } { "-O0" } } */
       3  
       4  /* With -msave-restore in use it should not be possible to remove the calls
       5     to the save and restore stubs in this case (in current GCC).  */
       6  
       7  extern void fn2 ();
       8  
       9  volatile int a = 0;
      10  
      11  int
      12  fn1 ()
      13  {
      14    fn2 ();
      15  
      16    while (a)
      17      ;
      18  
      19    return 0;
      20  }
      21  
      22  /* { dg-final { scan-assembler "call\[ \t\]*t0,__riscv_save_0" } } */
      23  /* { dg-final { scan-assembler "tail\[ \t\]*__riscv_restore_0" } } */