summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/leaf.c
blob: b885fd0d4155d023455261534f8174da354e3120 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
static int local_static;
void __attribute__ ((leaf)) leaf_call (void);

int
clobber_it (void)
{
  return local_static++;
}
int
test (void)
{
  local_static = 9;
  leaf_call ();
  return local_static;
}
/* { dg-final { scan-tree-dump-times "return 9" 1 "optimized"} } */