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-pr83383.c
blob28107630c10b32f47fb0f2632ff7274e0462f8e4
1 /*
2 pr83383.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 /* PR tree-optimization/83383 */
9 #if !defined(__SDCC_pdk14) // Lack of memory
10 unsigned long long int a = 16ULL;
11 unsigned char b = 195;
12 unsigned long long int c = ~0ULL;
13 unsigned char d = 1;
14 unsigned long long int e[2] = { 3625445792498952486ULL, 0 };
15 unsigned long long int f[2] = { 0, 8985037393681294663ULL };
16 unsigned long long int g = 5052410635626804928ULL;
18 void
19 foo ()
21 a = ((signed char) a) < b;
22 c = (d ? e[0] : 0) - (f[1] * a ? 1 : g);
24 #endif
26 void
27 testTortureExecute (void)
29 #if !defined(__SDCC_pdk14) // Lack of memory
30 foo ();
31 if (a != 1 || c != 3625445792498952485ULL)
32 ASSERT (0);
33 return;
34 #endif