1 /* { dg-options "-mrelax-pic-calls -mshared -foptimize-sibling-calls" } */
2 /* { dg-skip-if "requires -foptimize-sibling-calls" { *-*-* } { "-O0" } { "" } } */
3 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,normal\n1:\tjalr\t" } } */
4 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,normal2\n1:\tjalr\t" } } */
5 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,staticfunc\n1:\tjalr\t" } } */
6 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail\n1:\tjr\t" } } */
7 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail2\n1:\tjr\t" } } */
8 
staticfunc()9 __attribute__ ((noinline)) static void staticfunc () { asm (""); }
10 int normal ();
11 void normal2 ();
12 
f(int * p)13 NOMIPS16 f (int *p)
14 {
15   *p = normal ();
16   normal2 ();
17   staticfunc ();
18   return 1;
19 }
20 
21 int tail ();
22 
h()23 NOMIPS16 h ()
24 {
25   return tail ();
26 }
27 
28 void tail2 ();
29 
g()30 NOMIPS16 void g ()
31 {
32   tail2 ();
33 }
34