1  /* { dg-do compile } */
       2  /* { dg-require-effective-target mbranch_protection_ok } */
       3  /* { dg-additional-options "-march=armv8.1-m.main+fp -mbranch-protection=bti -mfloat-abi=hard --save-temps" } */
       4  
       5  #if !defined (__ARM_FEATURE_BTI_DEFAULT)
       6  #error "Feature test macro __ARM_FEATURE_BTI_DEFAULT should be defined."
       7  #endif
       8  
       9  #if defined (__ARM_FEATURE_PAC_DEFAULT)
      10  #error "Feature test macro __ARM_FEATURE_PAC_DEFAULT should be undefined."
      11  #endif
      12  /* { dg-final { scan-assembler-not "\.arch_extension pacbti" } } */
      13  /* { dg-final { scan-assembler "\.eabi_attribute 50, 1" } } */
      14  /* { dg-final { scan-assembler "\.eabi_attribute 52, 1" } } */
      15  /* { dg-final { scan-assembler "\.eabi_attribute 74, 1" } } */
      16  /* { dg-final { scan-assembler-not "\.eabi_attribute 76" } } */