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

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

int *restrict x;

int foo (int y)
{
  *x = y;
  return *x;
}

void
testTortureExecute (void)
{
  int i = 0;
  x = &i;
  if (foo(1) != 1)
    ASSERT (0);
  return;
}