summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr49217.c
blob: e8a89de8f5db033d35403ff88bc3f852d2337334 (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
/* { dg-do run } */
/* { dg-options "-fno-early-inlining" } */

extern void abort (void);
int i;
static void foo(void);
void __attribute__((noinline))
bar (void)
{
  if (!i)
    foo ();
}
static void
foo(void)
{
  i = 1;
  bar ();
}
int main()
{
  i = 0;
  bar();
  if (i != 1)
    abort ();
  return 0;
}