diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr60580_1.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr60580_1.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr60580_1.c b/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr60580_1.c new file mode 100644 index 000000000..1adf508cf --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr60580_1.c @@ -0,0 +1,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 } } */ |