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