(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
mips/
frame-header-3.c
       1  /* Verify that we do not optimize away the frame header in foo when using
       2     -mframe-header-opt but are calling a weak function that may be overridden
       3     by a different function that does need the frame header.  Without the
       4     optimization foo should increment the stack by 24 bytes, with the
       5     optimization it would only be 8 bytes.  */
       6  
       7  /* { dg-do compile } */
       8  /* { dg-options "-mframe-header-opt -mabi=32 -mno-abicalls" } */
       9  /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
      10  /* { dg-final { scan-assembler "\taddiu\t\\\$sp,\\\$sp,-24" } } */
      11  
      12  NOMIPS16 void __attribute__((noinline, weak))
      13  bar (int* a)
      14  {
      15    *a = 1;
      16  }
      17  
      18  void
      19  NOMIPS16 foo (int a)
      20  {
      21    bar (&a);
      22  }