struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20041114-1.c
blobf90fe431c612cd8093932fd37c63da4198c94338
1 /*
2 20041114-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 /* Verify that
13 var <= 0 || ((long unsigned) (unsigned) (var - 1) < MAX_UNSIGNED_INT)
15 gets folded to 1. */
17 #include <limits.h>
19 void link_failure (void);
21 volatile int v;
23 void
24 foo (int var)
26 if (!(var <= 0
27 || ((long unsigned) (unsigned) (var - 1) < UINT_MAX)))
28 link_failure ();
31 void
32 testTortureExecute (void)
34 foo (v);
35 return;
38 void
39 link_failure (void)
41 ASSERT (0);