ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gcc.target/aarch64/branch-protection-attr-2.c

17 lines
439 B
C

/* { dg-do "compile" } */
void __attribute__ ((target("branch-protection=pac-ret+leaf,branch-protection=none")))
foo ()
{
}
void __attribute__ ((target("branch-protection=pac-ret,branch-protection=none")))
foo2 ()
{
/* Function call here to make this a non-leaf function, so that it is covered by pac-ret. */
foo ();
}
/* { dg-final { scan-assembler-not "\tautiasp\t" } } */
/* { dg-final { scan-assembler-not "\tpaciasp\t" } } */