aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/inline-12.c
blob: 250d77eb04d6e81d19fe6b1a258bf7b264b68abd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-einline" } */

void *foo (void *, int);
static inline void *mcp (void *src, int i)
{
  return foo (src, i);
}
void bar()
{
  int i;
  mcp (&i, 0);
}

/* There should be exactly two assignments, one for both
   the original foo call and the inlined copy (plus a clobber
   that doesn't match here).  In particular bar should look like
     <bb 2> :
     _4 = foo (&i, 0);
     i ={v} {CLOBBER};
     return;  */
/* { dg-final { scan-tree-dump-times " = " 2 "einline" } } */