aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-5.c
blob: 106d20f27d263244fdaa1becbbb5bdbf05f04861 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-do run } */
/* { dg-require-effective-target arm_arch_v8_1m_main_link } */
/* { dg-require-effective-target mbranch_protection_ok } */
/* { dg-require-effective-target arm_pacbti_hw } */
/* { dg-additional-options "-mbranch-protection=bti+pac-ret" } */
/* { dg-add-options arm_arch_v8_1m_main } */

#if !defined (__ARM_FEATURE_BTI_DEFAULT)
#error "Feature test macro __ARM_FEATURE_BTI_DEFAULT should be defined."
#endif

#if !defined (__ARM_FEATURE_PAC_DEFAULT)
#error "Feature test macro __ARM_FEATURE_PAC_DEFAULT should be defined."
#endif

int
main()
{
  if (__ARM_FEATURE_BTI_DEFAULT != 1)
    __builtin_abort ();

  if (__ARM_FEATURE_PAC_DEFAULT != 1)
    __builtin_abort ();

  return 0;
}