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

#include <testfwk.h>

#ifdef __SDCC
#pragma disable_warning 84
#endif

/* PR rtl-optimization/68321 */

int e = 1, u = 5, t2, t5, i, k;
int a[1], b, m;
char n, t;

int
fn1 (int p1)
{
  int g[1];
  for (;;)
    {
      if (p1 / 3)
        for (; t5;)
          u || n;
      t2 = p1 & 4;
      if (b + 1)
        return 0;
      u = g[0];
    }
}

void
testTortureExecute (void)
{
  for (; e >= 0; e--)
    {
      char c;
      if (!m)
        c = t;
      fn1 (c);
    }

  ASSERT (a[t2] == 0);

  return;
}