summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-pr63659.c
blob: cc4268d5b4ff67ecd15bdf65c90fc36422d8c83d (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
/*
   pr60822.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

/* PR rtl-optimization/63659 */

int a, b, c, *d = &b, g, h, i;
unsigned char e;
char f;

void
testTortureExecute (void)
{
  while (a)
    {
      for (a = 0; a; a++)
	for (; c; c++)
	  ;
      if (i)
	break;
    }

  char j = c, k = -1, l;
  l = g = j >> h;
  f = l == 0 ? k : k % l;
  e = 0 ? 0 : f;
  *d = e;

  if (b != 255)
    ASSERT (0);

  return;
}