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