summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-961004-1.c
blob: a07710e6baf0e535af28dec4f45c7d5bc41b0423 (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
31
32
33
34
/*
   961004-1.c from the execute part of the gcc torture suite.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#pragma disable_warning 84
#endif

int k = 0;

void
testTortureExecute (void)
{
  int i;
  int j;

  for (i = 0; i < 2; i++)
    {
      if (k)
        {
          if (j != 2)
            ASSERT (0);
        }
      else
        {
          j = 2;
          k++;
        }
    }
  return;
}