aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-9.c
blob: 6be42038bce6504d5371e060aa10dafb69bbe3e4 (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
43
44
45
46
47
48
49
50
/* PR 65048 */
/* { dg-do compile } */
/* { dg-options "-O3" } */

int a, b, c, d;
void fn (void);

int
foo (x)
{
  switch (x)
    {
    case 'A':
      return 'T';
    case 'U':
      return 'A';
    }
}

void
bar (int x, int y)
{
  switch (c)
    {
    case 'U':
      switch (x)
	{
	default:
	  fn ();
	case 'G':
	  switch (y)
	    {
	    case 'A':
	      d = 7;
	    }
	}
    }
}

void
baz (void)
{
  while (1)
    {
      a = foo ();
      b = foo ();
      bar (a, b);
    }
}