Rebase.
[official-gcc.git] / gcc / testsuite / gcc.target / mips / call-6.c
blob86f3dc4a8fe9104908ac567eecff6edacb721367
1 /* Like call-5.c, but for n64. */
2 /* { dg-options "-mrelax-pic-calls -mshared -foptimize-sibling-calls -mabi=64" } */
3 /* { dg-skip-if "requires -foptimize-sibling-calls" { *-*-* } { "-O0" } { "" } } */
4 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,normal\n1:\tjalr\t" } } */
5 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,normal2\n1:\tjalr\t" } } */
6 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,staticfunc\n1:\tjalr\t" } } */
7 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail\n1:\tjalr\t" } } */
8 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail2\n1:\tjalr\t" } } */
9 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail3\n1:\tjr\t" } } */
10 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail4\n1:\tjr\t" } } */
12 __attribute__ ((noinline)) static void staticfunc () { asm (""); }
13 int normal ();
14 void normal2 ();
16 NOMIPS16 f (int *p)
18 *p = normal ();
19 normal2 ();
20 staticfunc ();
21 return 1;
24 int tail ();
26 NOMIPS16 h ()
28 return tail ();
31 void tail2 ();
33 NOMIPS16 void g ()
35 tail2 ();
38 __attribute__ ((visibility ("hidden"))) void tail3 ();
40 NOMIPS16 void j ()
42 tail3 ();
45 __attribute__ ((noinline)) static void tail4 () { asm (""); }
47 NOMIPS16 void k ()
49 tail4 ();