gcc/testsuite/gcc.target/i386/pr94417-3.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fcf-protection -mforce-indirect-call" } */ |
| 3 | /* { dg-final { scan-assembler-times {\mendbr} 2 } } */ |
| 4 | |
| 5 | extern void ext (void); |
| 6 | |
| 7 | __attribute((noclone, noinline)) |
| 8 | static |
| 9 | void |
| 10 | foo (void) |
| 11 | { |
| 12 | ext (); |
| 13 | } |
| 14 | |
| 15 | void |
| 16 | bar (void) |
| 17 | { |
| 18 | foo (); |
| 19 | } |