summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/bfin/longcall-1.c
blob: 138707e9e3f1db54164dbb1897fbf22ab9c13d25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* { dg-do compile { target bfin-*-* } } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler-not "call\[^\\n\]*foo" } } */
/* { dg-final { scan-assembler-not "jump\[^\\n\]*foo" } } */
/* { dg-final { scan-assembler "call\[^\\n\]*baz" } } */
/* { dg-final { scan-assembler "jump\[^\\n\]*baz" } } */
/* { dg-final { scan-assembler "call\[^\\n\]*bar" } } */
/* { dg-final { scan-assembler "jump\[^\\n\]*bar" } } */

extern void foo () __attribute__((longcall));
extern void bar () __attribute__((shortcall));
extern void baz ();

int t1 ()
{
    foo ();
    bar ();
    baz ();
    return 4;
}

void t2 ()
{
    foo ();
}
void t3 ()
{
    bar ();
}
void t4 ()
{
    baz ();
}