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

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#pragma disable_warning 85
#endif

int f (int i) { return 12; }
int g () { return 0; }

void
testTortureExecute (void)
{
  int i, s;

  for (i = 0; i < 32; i++)
    {
      s = f (i);

      if (i == g ())
	s = 42;
      if (i == 0 || s == 12)
	;
      else
	ASSERT (0);
    }

  return;
}