aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr60580_1.c
blob: 1adf508cfc0416bb84b6bd9bf03dc0d3fb94e8ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* { 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 } } */

/* { dg-final { cleanup-saved-temps } } */