aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr63284.c
blob: dc7fc28b87e7a993eb4fdf53190eb898835162ff (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
34
35
36
37
38
39
40
41
42
/* PR debug/63284 */
/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug" } */

int a[10], *b, *d, c, f;
int fn2 (void);
void fn3 (void);
void fn4 (int);

static int
fn1 (int x)
{
  int e = a[0];
  if (e)
    return 1;
  if (b)
    switch (x)
      {
      case 1:
        if (d)
          e = fn2 ();
        else
          fn3 ();
        break;
      case 0:
        if (d)
          {
            fn3 ();
            if (c)
              fn4 (1);
          }
        else
          fn4 (0);
      }
  return e;
}

void
fn6 (void)
{
  f = fn1 (0);
}