blob: d5304b6a5ccc5551f786e346d7747bb6f266e3a0 [file] [log] [blame]
/* { dg-options "-msave-restore" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-Og" } } */
/* With -msave-restore in use GCC should be able to remove the calls to the
save and restore stubs in this case, replacing them with a tail call to
foo. */
extern int foo ();
int bar ()
{
return foo ();
}
/* { dg-final { scan-assembler-not "call\[ \t\]*t0,__riscv_save_0" } } */
/* { dg-final { scan-assembler-not "tail\[ \t\]*__riscv_restore_0" } } */
/* { dg-final { scan-assembler "tail\[ \t\]*foo" } } */