summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-pr68376-1.c
blob: 622f6ba00b3d4d5ff61954cad9b9b7ba90cf967d (plain) (blame)
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
/*
   pr68376-1.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

/* PR rtl-optimization/68376 */

int a, b, c = 1;
signed char d;

void
testTortureExecute (void)
{
  for (; a < 1; a++)
    for (; b < 1; b++)
      {
	signed char e = ~d;
	if (d < 1)
	  e = d;
	d = e;
	if (!c)
	  ASSERT (0);
      }

  if (d != 0)
    ASSERT (0);

  return;
}