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

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

long a = 1;

#if !defined(__SDCC_pdk14) // Lack of memory - see RFE #364.
foo ()
{
  switch (a % 2 % 2 % 2 % 2 % 2 % 2 % 2 % 2)
    {
    case 0:
      return 0;
    case 1:
      return 1;
    default:
      return -1;
    }
}
#endif

void
testTortureExecute (void)
{
#if !defined(__SDCC_pdk14) // Lack of memory - see RFE #364.
  if (foo () != 1)
    ASSERT (0);
  return;
#endif
}