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

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

#if 0
SDCC urrently cannot return aggregates TODO: Enable later.
struct X { int *p; } x;

struct X
foo(int *p) { struct X x; x.p = p; return x; }

void
bar() { *x.p = 1; }
#endif

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