| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fstack-clash-protection -mtune=generic -fomit-frame-pointer" } */ |
| 3 |
/* { dg-require-effective-target supports_stack_clash_protection } */ |
| 4 |
|
| 5 |
__attribute__ ((noreturn)) void exit (int); |
| 6 |
|
| 7 |
__attribute__ ((noreturn)) void |
| 8 |
f (void) |
| 9 |
{ |
| 10 |
exit (1); |
| 11 |
} |
| 12 |
|
| 13 |
/* { dg-final { scan-assembler-not "or\[ql\]" } } */ |
| 14 |
/* On ia32 PIC, saving the PIC register requires a stack frame, which does away |
| 15 |
with the need for the dummy %esi pushing and popping for stack probing. */ |
| 16 |
/* { dg-final { scan-assembler "pushl %esi" { target { ia32 && nonpic } } } } */ |
| 17 |
/* { dg-final { scan-assembler "popl %esi" { target { ia32 && nonpic } } } } */ |
| 18 |
/* { dg-final { scan-assembler "pushq %rax" { target { ! ia32 } } } } */ |
| 19 |
/* { dg-final { scan-assembler "popq %rax" { target { ! ia32 } } } } */ |