aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr58830.c
blob: 8081f8b2c27ce205d1f6f97ac09d71d9c1edbfb7 (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
/* { dg-do run } */
/* { dg-additional-options "-ftree-pre -ftree-partial-pre" } */

extern void abort (void);

int b, c, d, f, g, h, i, j[6], *l = &b, *m, n, *o, r; 
char k;

static int
foo ()
{
  char *p = &k;

  for (; d; d++)
    if (i)
      h = 0;
    else
      h = c || (r = 0);

  for (f = 0; f < 2; f++)
    {
      unsigned int q;
      *l = 0;
      if (n)
	*m = g;
      if (g)
	o = 0;
      for (q = -8; q >= 5; q++)
	(*p)--;
    }

  return 0;
}

int
main ()
{
  foo ();
  if (j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[0]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ^ (k & 15)] != 0)
    abort ();
  return 0;
}