1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect -mprivileged" } */
3 /* { dg-require-effective-target rop_ok } */
4
5 /* Verify that privileged 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 {\mhashstp\M} 1 } } */
17 /* { dg-final { scan-assembler-times {\mhashchkp\M} 1 } } */