summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/ipa-6.c
blob: c7d9b37386cd096d84a482005462fef47a51d8f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* PR middle-end/29122 */
/* { dg-do compile } */
/* { dg-options "-O3 -fipa-cp -fno-early-inlining" } */

int
dont_inline (int);

int
bar (int b, int c)
{
   return dont_inline (c);
}

int
foo (int a)
{
  if (a++ > 0)
    bar (a, 3);

  foo (7);
}

int
main ()
{
  int i;
  for (i = 0; i < 100; i++)
    foo (7);
  return 0;
}