1  /* { dg-do compile } */
       2  /* { dg-options "-O2" } */
       3  
       4  /* Just create some dummy call that should trigger sibcall, no
       5     stack logic.  */
       6  int calc (int a, int b, int c) {
       7    if (c <= 0) return a;
       8    return calc (a * b, b, --c);
       9  }
      10  
      11  int main() {
      12     return calc (4, 3, 4);
      13  }
      14  
      15  /* Ensure sibcalls do not need to manipulate the stack.  */
      16  /* { dg-final { scan-assembler-not "r1," } } */
      17  /* Ensure sibcall maintains the body of the function.  */
      18  /* { dg-final { scan-assembler "l.mul" } } */