summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/20080530.c
blob: 6da7cb8a03ab9fd23023fbc19e83eabe06c68cca (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 "einline2"} } */
/* { dg-final { cleanup-tree-dump "einline2" } } */