| 1 |
/* Test -mnop-mcount */ |
| 2 |
/* { dg-do compile { target { *-*-linux* && nonpic } } } */ |
| 3 |
/* { dg-require-effective-target mfentry } */ |
| 4 |
/* { dg-options "-Wno-old-style-definition -pg -mfentry -mrecord-mcount -mnop-mcount" } */ |
| 5 |
/* { dg-final { scan-assembler-not "__fentry__" } } */ |
| 6 |
/* Origin: Andi Kleen */ |
| 7 |
extern void foobar(char *); |
| 8 |
|
| 9 |
void func(void) |
| 10 |
{ |
| 11 |
foobar ("Hello world\n"); |
| 12 |
} |
| 13 |
|
| 14 |
void func2(void) |
| 15 |
{ |
| 16 |
int i; |
| 17 |
for (i = 0; i < 10; i++) |
| 18 |
foobar ("Hello world"); |
| 19 |
} |
| 20 |
|
| 21 |
void func3(a) |
| 22 |
char *a; |
| 23 |
{ |
| 24 |
foobar("Hello world"); |
| 25 |
} |