gcc/testsuite/gcc.target/i386/pr82659-3.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-require-alias "" } */ |
| 3 | /* { dg-options "-O2 -fcf-protection" } */ |
| 4 | /* { dg-final { scan-assembler-times {\mendbr} 2 } } */ |
| 5 | |
| 6 | extern int x; |
| 7 | |
| 8 | static void |
| 9 | __attribute__ ((noinline, noclone)) |
| 10 | test (int i) |
| 11 | { |
| 12 | x = i; |
| 13 | } |
| 14 | |
| 15 | extern __typeof (test) foo __attribute__ ((alias ("test"))); |
| 16 | |
| 17 | void |
| 18 | bar (int i) |
| 19 | { |
| 20 | test (i); |
| 21 | } |