1 /*
2 pr81503.c from the execute part of the gcc torture tests.
3 */
4 
5 #include <testfwk.h>
6 
7 #include <stdint.h>
8 
9 #if !defined(__SDCC_pdk14) // Lack of memory
10 unsigned short a = 41461;
11 unsigned short b = 3419;
12 #if __SIZEOF_INT__ >= 4
13 int c = 0;
14 
foo()15 void foo() {
16   if (a + b * ~(0 != 5))
17     c = -~(b * ~(0 != 5)) + 2147483647;
18 }
19 #else
20 int32_t c = 0;
21 
foo()22 void foo() {
23   if (a + b * ~((int32_t)(0 != 5)))
24     c = -~(b * ~((int32_t)(0 != 5))) + 2147483647;
25 }
26 #endif
27 #endif
28 
29 void
testTortureExecute(void)30 testTortureExecute (void) {
31 #if !defined(__SDCC_pdk14) // Lack of memory
32   foo();
33   if (c != 2147476810)
34     ASSERT (0);
35   return;
36 #endif
37 }
38