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

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#pragma disable_warning 127
#endif

void
foo (void *p)
{
  long l = (long) p;
  if (l < 0 || l > 6)
    ASSERT (0);
}

void
testTortureExecute (void)
{
  short i;
  for (i = 6; i >= 0; i--)
    foo ((void *) (long) i);
  return;
}