summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/20011114-3.c
blob: 882792525c96cab9c5d468222a86810e31405571 (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
typedef struct { int s, t; } C;
C x;
int foo (void);
void bar (int);

int baz (void)
{
  int a = 0, c, d = 0;
  C *b = &x;

  while ((c = foo ()))
    switch(c)
      {
      case 23:
	bar (1);
	break;
      default:
	break;
      }

  if (a == 0 || (a & 1))
    {
      if (b->s)
	{
	  if (a)
	    bar (1);
	  else
	    a = 16;
	}
      else if (b->t)
	{
	  if (a)
	    bar (1);
	  else
	    a = 32;
	}
    }

  if (d && (a & ~127))
    bar (2);
  return 0;
}