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-pr68506.c
blob759365d83db5f1480d88572951f904735c10fa9a
1 /*
2 pr68506.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 /* { dg-options "-fno-builtin-abort" } */
13 int a, b, m, n, o, p, s, u, i;
14 char c, q, y;
15 short d;
16 unsigned char e;
17 static int f, h;
18 static short g, r, v;
19 unsigned t;
21 int
22 fn1 (int p1)
24 return a ? p1 : p1 + a;
27 unsigned char
28 fn2 (unsigned char p1, int p2)
30 return p2 >= 2 ? p1 : p1 >> p2;
33 #ifndef __SDCC_pdk14 // Lack of memory
34 static short
35 fn3 ()
37 int w, x = 0;
38 for (; p < 31; p++)
40 s = fn1 (c | ((1 && c) == c));
41 t = fn2 (s, x);
42 c = (unsigned) c > -(unsigned) ((o = (m = d = t) == p) <= 4UL) && n;
43 v = -c;
44 y = 1;
45 for (; y; y++)
46 e = v == 1;
47 d = 0;
48 for (; h != 2;)
50 for (;;)
52 if (!m)
53 ASSERT (0);
54 r = 7 - f;
55 x = e = i | r;
56 q = u * g;
57 w = b == q;
58 if (w)
59 break;
61 break;
64 return x;
66 #endif
68 void
69 testTortureExecute (void)
71 #ifndef __SDCC_pdk14 // Lack of memory
72 fn3 ();
73 return;
74 #endif