summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/pr44539.c
blob: 9cfff7a3ae53af93e6e796e13c97c7ed1c506e02 (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
/* PR tree-optimization/44539 */
/* { dg-do compile } */
/* { dg-options "-ftracer -freorder-blocks -O2" } */

void bar (int file);
extern int baz (void);

void noret1 ()
{
  bar (0);
  __builtin_exit (0);
}

void noret2 ()
{
  __builtin_exit (0);
}

void bar (int i)
{
  if (baz ())
    noret1 (i);
}

void foo (int i)
{
  if (~i) bar (i);
  i ? noret1 () : noret2 ();
}
OpenPOWER on IntegriCloud