Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr39120.c
blobbf4d0179e98af932ef803c9e40d4d8fc39397d75
1 /*
2 pr39120.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 #if 0
12 SDCC urrently cannot return aggregates TODO: Enable later.
13 struct X { int *p; } x;
15 struct X
16 foo(int *p) { struct X x; x.p = p; return x; }
18 void
19 bar() { *x.p = 1; }
20 #endif
22 void
23 testTortureExecute (void)
25 #if 0
26 int i = 0;
27 x = foo(&i);
28 bar();
29 if (i != 1)
30 ASSERT (0);
31 return;
32 #endif