(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
arm/
pac-5.c
       1  /* Testing return address signing.  */
       2  /* { dg-do run } */
       3  /* { dg-require-effective-target mbranch_protection_ok } */
       4  /* { dg-require-effective-target arm_pacbti_hw } */
       5  /* { dg-options "-march=armv8.1-m.main+pacbti+fp -mbranch-protection=pac-ret+leaf -mthumb -mfloat-abi=hard --save-temps -O0" } */
       6  
       7  #include <stdlib.h>
       8  
       9  int
      10  __attribute__((noinline))
      11  foo1 (int a, int b)
      12  {
      13    int square (int z) { return z * z; }
      14    return square (a) + square (b);
      15  }
      16  
      17  int
      18  main (void)
      19  {
      20    if (foo1 (1, 2) != 5)
      21      abort ();
      22  
      23    return 0;
      24  }
      25  
      26  /* { dg-final { scan-assembler-times "pac\tip, lr, sp" 3 } } */
      27  /* { dg-final { scan-assembler-times "aut\tip, lr, sp" 3 } } */
      28  /* { dg-final { scan-assembler-not "\tbti" } } */