summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/near-far-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/near-far-2.c')
-rw-r--r--gcc/testsuite/gcc.target/mips/near-far-2.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/near-far-2.c b/gcc/testsuite/gcc.target/mips/near-far-2.c
new file mode 100644
index 000000000..c954b444c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/near-far-2.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-long-calls addressing=absolute" } */
+
+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 test ()
+{
+ return (long_call_func ()
+ + far_func ()
+ + near_func ()
+ + normal_func ());
+}
+
+/* { dg-final { scan-assembler-not "\tjal\tlong_call_func\n" } } */
+/* { dg-final { scan-assembler-not "\tjal\tfar_func\n" } } */
+/* { dg-final { scan-assembler "\tjal\tnear_func\n" } } */
+/* { dg-final { scan-assembler "\tjal\tnormal_func\n" } } */