aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/force-indirect-call-1.c
blob: 6ecf598708a3d931cdd022f2983453562e44b317 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile } */
/* { dg-options "-O2 -mforce-indirect-call" } */
/* { dg-final { scan-assembler-times "(?:call|jmp)\[ \\t\]+\\*%" 3 } } */

int x;
int y;

void __attribute__((noinline)) f1(void)
{
	x++;
}

static __attribute__((noinline)) void f3(void)
{
	y++;
}

void f2()
{
	f1();
	f3();
	f1();
}