gcc/testsuite/gcc.target/powerpc/rop-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect" } */ |
| 3 | /* { dg-require-effective-target rop_ok } */ |
| 4 | |
| 5 | /* Verify that ROP-protect instructions are inserted when a |
| 6 | call is present. */ |
| 7 | |
| 8 | extern void foo (void); |
| 9 | |
| 10 | int bar () |
| 11 | { |
| 12 | foo (); |
| 13 | return 5; |
| 14 | } |
| 15 | |
| 16 | /* { dg-final { scan-assembler-times {\mhashst\M} 1 } } */ |
| 17 | /* { dg-final { scan-assembler-times {\mhashchk\M} 1 } } */ |