struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20180921-1.c
blob67ab435460e102b7beea394703a75f9848d8903b
1 /*
2 20180921-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 /* PR tree-optimization/86990 */
8 /* Testcase by Zhendong Su <su@cs.ucdavis.edu> */
10 #if 0 // TODO: Enable when SDCC supports all types of bracing in initialization!
11 const char *ss;
13 int dummy (const char *s, ...)
15 ss = s;
18 int i[6];
19 static int j, v, e, f, h = 5, k, l, n, o, p, q, r, s, u, w, x, y, z, aa, ab, ac,
20 ad, ae, af, ag = 8, ah, ai, aj, ak, al;
21 char c;
22 struct a {
23 unsigned b;
24 int c : 9;
25 int d;
26 } static g = {9, 5};
27 static short m[1], t = 95, am;
28 int an, ao, ap;
29 void aq(int ar) {
30 j = j & 5 ^ i[j ^ v & 5];
31 j = j & 5 ^ i[(j ^ v) & 5];
32 j = j & 4095 ^ (j ^ v) & 5;
34 void as(int ar) {
35 if (n)
36 s = 0;
38 static unsigned at() {
39 int au[] = {2080555007, 0};
40 for (; al; al--) {
41 if (r)
42 --x;
43 if (g.d)
44 l++;
45 dummy("", j);
46 if (u)
47 ae = n = au[al];
49 r = 0;
50 return 0;
52 int aw(int ar) {
53 int ax[] = {9, 5, 5, 9, 5}, ay = 3;
54 struct a az = {1, 3};
55 av:
56 an = (as((at(), ax)[2]), ax[4]);
58 int ba[] = {5, 5, 9, 8, 1, 0, 5, 5, 9, 8, 1, 0,
59 5, 5, 9, 8, 1, 0, 5, 5, 9, 8, 1};
60 int a[] = {8, 2, 8, 2, 8, 2, 8};
61 int b[] = {1027239, 8, 1, 7, 9, 2, 9, 4, 4, 2, 8, 1, 0, 4, 4, 2,
62 4, 4, 2, 9, 2, 9, 8, 1, 7, 9, 2, 9, 4, 4, 2};
63 if (z) {
64 struct a bc;
65 bb:
66 for (; e; e++)
67 for (; q;)
68 return ax[e];
69 if (bc.c < g.d <= a[7])
70 aa--;
73 struct a bd = {5};
74 int d[20] = {1, 9, 7, 7, 8, 4, 4, 4, 4, 8, 1, 9, 7, 7, 8, 4, 4, 4, 4};
75 c = h | r % g.c ^ x;
76 dummy("", g);
77 am -= t | x;
78 if (h)
79 while (1) {
80 if (a[o]) {
81 struct a be;
82 if (ar) {
83 struct a bf = {908, 5, 3};
84 int bg[3], bh = k, bj = ag | ae, bk = aj + 3, bl = u << e;
85 if (f)
86 if (ac)
87 ak = w;
88 ag = -(ag & t);
89 af = ag ^ af;
90 if (8 < af)
91 break;
92 if (bj)
93 goto bi;
94 if (s)
95 dummy("", 6);
96 be.d = k;
97 w = f - bh;
98 dummy("", be);
99 if (w)
100 goto bb;
101 ao = r - aa && g.b;
102 if (y)
103 k++;
104 goto av;
106 if (aa)
107 continue;
108 if (f)
109 if (k)
110 dummy("", g);
111 aj = ac + k ^ g.c;
112 g.c = bk;
113 ah = 0;
114 for (; ah < 3; ah++)
115 if (s)
116 bg[ah] = 8;
117 if (!ay)
118 dummy("", ai);
119 u = bl;
120 g = bf;
121 } else
122 for (;; o += a[ap])
124 int bm[] = {0};
125 for (; p; p++)
126 c = ad;
127 ad = l;
128 if (bd.c) {
129 dummy(" ");
130 goto bi;
133 int bn[] = {5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5,
134 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2,
135 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2, 2, 5, 2};
136 struct a a[] = {3440025416, 2, 8, 4, 2, 8, 4, 4, 2, 8, 4};
137 struct a b = {3075920};
138 if (f) {
139 aq(m[am + e]);
140 dummy("", j);
141 dummy("", e);
142 ab--;
144 if (ax[4]) {
145 if (l)
146 goto av;
147 ++f;
148 } else
149 ay = az.c && a;
150 for (; ac; ac++)
151 m[f] = 0;
153 h = 9;
154 for (; y; y = 1)
155 if (f)
156 goto av;
159 return 0;
161 #endif
162 void
163 testTortureExecute (void)
165 #if 0
166 aw(1);
167 if (g.c!= 5)
168 ASSERT (0);
169 return;
170 #endif