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

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

static inline int bar(void) { return 1; }
static int mem[3];

static int foo(int x)
{
  if (x != 0)
    return x;

  mem[x++] = foo(bar());

  if (x != 1)
    ASSERT(0);

  return 0;
}

void
testTortureExecute (void)
{
  foo(0);
  return;
}