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-20070212-1.c
blob4ccdfcea686132912ab68286d696fb5564cea43e
1 /*
2 20070212-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 struct f
13 int i;
16 int g(int i, int c, struct f *ff, int *p)
18 int *t;
19 if (c)
20 t = &i;
21 else
22 t = &ff->i;
23 *p = 0;
24 return *t;
27 void
28 testTortureExecute (void)
30 struct f f;
31 f.i = 1;
32 if (g(5, 0, &f, &f.i) != 0)
33 ASSERT (0);
34 return;