blob: ee64197fcd387ec68e0d407b37ab5e4fdf58f689 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O0 -fomit-frame-pointer -fno-inline --save-temps" } */
void
func_leaf (void)
{
int a = 0;
}
void
func_no_leaf (void)
{
int a = 0;
func_leaf ();
}
void
func1 (void)
{
int a = 0;
func_no_leaf ();
}
/*
* This function calls XXX(), which modifies SP. This is incompatible to
* -fomit-frame-pointer generated code as SP is used to access the frame.
*/
__attribute__ ((optimize("no-omit-frame-pointer")))
void
func2 (void)
{
int a = 0;
func_no_leaf ();
}
void
func3 (void)
{
int a = 0;
func_no_leaf ();
}
/* { dg-final { scan-assembler-times "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" 1 } } */