| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O -fdump-tree-einline" } */ |
| 3 |
|
| 4 |
void *foo (void *, int); |
| 5 |
static inline void *mcp (void *src, int i) |
| 6 |
{ |
| 7 |
return foo (src, i); |
| 8 |
} |
| 9 |
void bar() |
| 10 |
{ |
| 11 |
int i; |
| 12 |
mcp (&i, 0); |
| 13 |
} |
| 14 |
|
| 15 |
/* There should be exactly two assignments, one for both |
| 16 |
the original foo call and the inlined copy (plus a clobber |
| 17 |
that doesn't match here). In particular bar should look like |
| 18 |
<bb 2> : |
| 19 |
_4 = foo (&i, 0); |
| 20 |
i ={v} {CLOBBER}; |
| 21 |
return; */ |
| 22 |
/* { dg-final { scan-tree-dump-times " = " 2 "einline" } } */ |