summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/20080530.c
blob: bf222fee155a067289ac2bee87a18c81074e96c5 (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 "-O2 -fdump-tree-einline" } */

void bar (char *);
int i;

static void
foo (void)
{
  char *p = __builtin_alloca (i);
  bar (p);
}

int
baz (void)
{
  foo ();	/* foo() should not be inlined here because it calls alloca */
  return 6;
}

/* { dg-final { scan-tree-dump-times "Inlining foo into baz" 0 "einline"} } */
/* { dg-final { cleanup-tree-dump "einline" } } */