Debian Codegraph @

gcc/testsuite/gcc.target/arm/pac-6.c

raw
1 /* Check that GCC does .save and .cfi_offset directives with RA_AUTH_CODE pseudo hard-register. */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target arm_arch_v8_1m_main_ok } */
4 /* { dg-require-effective-target mbranch_protection_ok } */
5 /* { dg-options "-mbranch-protection=pac-ret+leaf --save-temps -O0 -g" } */
6 /* { dg-add-options arm_arch_v8_1m_main } */
7
8 int i;
9
10 void foo (int);
11
12 int bar()
13 {
14 foo (i);
15 return 0;
16 }
17
18 /* { dg-final { scan-assembler "\tpac\tip, lr, sp" } } */
19 /* { dg-final { scan-assembler "\taut\tip, lr, sp" } } */
20 /* { dg-final { scan-assembler-not "\tbti" } } */