struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20030828-1.c
blob87e2cdc53dc72fbf097cc6709c34bcf2ec03800e
1 /*
2 20030828-1.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 const int *p;
13 int bar (void)
15 return *p + 1;
18 void
19 testTortureExecute (void)
21 /* Variable 'i' is never used but it's aliased to a global pointer. The
22 alias analyzer was not considering that 'i' may be used in the call to
23 bar(). */
24 const int i = 5;
25 p = &i;
26 if (bar() != 6)
27 ASSERT (0);
28 return;