Debian Codegraph @

gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-2.c

raw
1 /* { dg-do run } */
2 /* { dg-require-effective-target arm_arch_v8_1m_main_pacbti_link } */
3 /* { dg-require-effective-target mbranch_protection_ok } */
4 /* { dg-require-effective-target arm_pacbti_hw } */
5 /* { dg-options "-mbranch-protection=bti+pac-ret+leaf -mfloat-abi=hard" } */
6 /* { dg-add-options arm_arch_v8_1m_main_pacbti } */
7
8 #if !defined (__ARM_FEATURE_BTI_DEFAULT)
9 #error "Feature test macro __ARM_FEATURE_BTI_DEFAULT should be defined."
10 #endif
11
12 #if !defined (__ARM_FEATURE_PAC_DEFAULT)
13 #error "Feature test macro __ARM_FEATURE_PAC_DEFAULT should be defined."
14 #endif
15
16 int
17 main()
18 {
19 if (__ARM_FEATURE_BTI_DEFAULT != 1)
20 __builtin_abort ();
21
22 if (__ARM_FEATURE_PAC_DEFAULT != 5)
23 __builtin_abort ();
24
25 return 0;
26 }