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-980506-2.c
blobd97c0d4f83abedc6e70957b24a7fe984a92e5cf0
1 /*
2 980506-2.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 static void *self(void *p){ return p; }
13 int
14 f()
16 struct { int i; } s, *sp;
17 int *ip = &s.i;
19 s.i = 1;
20 sp = self(&s);
22 *ip = 0;
23 return sp->i+1;
26 void
27 testTortureExecute (void)
29 if (f () != 1)
30 ASSERT (0);
31 else
32 return;