summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/near-far-4.c
blob: 7d156fabdc5260c31903cae3b73bad2265a62d9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-mips-options "-mno-long-calls -O2 -mno-mips16" } */
/* { dg-require-effective-target nonpic } */

extern int long_call_func () __attribute__((long_call));
extern int far_func () __attribute__((far));
extern int near_func () __attribute__((near));
extern int normal_func ();

int test1 () { return long_call_func (); }
int test2 () { return far_func (); }
int test3 () { return near_func (); }
int test4 () { return normal_func (); }

/* { dg-final { scan-assembler-not "\tj\tlong_call_func\n" } } */
/* { dg-final { scan-assembler-not "\tj\tfar_func\n" } } */
/* { dg-final { scan-assembler     "\tj\tnear_func\n" } } */
/* { dg-final { scan-assembler     "\tj\tnormal_func\n" } } */