summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b26496/_1d6bgof.cs
blob: 6025abf79b8fd7ded5f5c945ce220684ce485487 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System;
using System.Collections;
using System.Runtime.InteropServices;

public enum TestEnum
{
    red = 1,
    green = 2,
    blue = 4,
}

public class AA
{
    public bool[][,][, ,][][][][] m_abField1;
    public static float m_fStatic1;
    public static ushort Static1(ref char[, ,] param1, ref byte[, ,] param2, ulong
        param3, bool[, ,] param4)
    {
        short local1 = App.m_shFwd1;
        while (App.m_bFwd2)
        {
            object local2 = ((object)(TestEnum.red));
            byte local3 = ((byte)(88u));
            long local4 = App.m_lFwd3;
            short local5 = App.m_shFwd1;
            try
            {
                byte local6 = ((byte)(37u));
                local6 = (local6 += local3);
            }
            catch (InvalidOperationException)
            {
                sbyte[, ,][][][] local7 = (new sbyte[89u, 48u, 47u][][][]);
                ulong local8 = ((ulong)(67u));
#pragma warning disable 1717
                local3 = (local3 = local3);
                AA.m_fStatic1 = AA.m_fStatic1;
#pragma warning restore 1717
            }
            do
            {
                AA.m_fStatic1 = (45.0f + local4);
                try
                {
                    goto label1;
                }
                catch (NullReferenceException)
                {
                    param2[109, 35, 92] = (local3 += local3);
                }
            label1:
                do
                {
#pragma warning disable 1717
                    AA.m_fStatic1 *= (AA.m_fStatic1 = AA.m_fStatic1);
#pragma warning restore 1717
                    do
                    {
                    }
                    while (((bool)(local2)));
                }
                while (((bool)(local2)));
            }
            while (((bool)(local2)));
            local5 += local1;
        }
        for (App.m_sbyFwd4 = ((sbyte)(local1)); App.m_bFwd2; local1 *= (local1 -= local1)
            )
        {
        }
        param1[74, 65, ((int)(AA.m_fStatic1))] = '\x30';
        return ((ushort)(33u));
    }
    public static uint Static2(String[,] param1, double param2, ref long param3)
    {
        for (App.m_iFwd5 -= 20; (87.0 == param2); App.m_chFwd6 /= '\x2e')
        {
            Array[,][] local9 = (new Array[36u, 24u][]);
            char local10 = ((char)(121));
            bool local11 = false;
            String local12 = "120";
            String local13 = "110";
            try
            {
                ushort[,] local14 = (new ushort[80u, 97u]);
                sbyte local15 = Convert.ToSByte('\x72');
                ushort local16 = Convert.ToUInt16(56.0);
                param1[((int)(param2)), 17] = "35";
                while (local11)
                {
                    AA.Static1(
                        ref App.m_achFwd7,
                        ref App.m_abyFwd8,
                        App.m_ulFwd9,
                        (new bool[20u, 47u, 26u]));
                    if (local11)
                        try
                        {
                            throw new InvalidOperationException();
                        }
                        catch (NullReferenceException)
                        {
                            continue;
                        }
#pragma warning disable 1717
                    local11 = local11;
#pragma warning restore 1717
                }
            }
            finally
            {
                do
                {
                }
                while ((local11 || true));
                local10 = '\x11';
                do
                {
                }
                while (local11);
            }
            if (local11)
                return 93u;
            continue;
        }
        try
        {
        }
        catch (Exception)
        {
        }
        param1[106, ((int)('\x40'))] = "34";
        return 17u;
    }
    public static byte Static3(ref byte param1, ref char param2, ref char[,][,][, ,]
         param3, ref ulong param4, double param5, TestEnum[, ,] param6, sbyte param7,
        ulong[, , ,][, ,][, ,] param8)
    {
        return param1;
    }
    public static double[, ,] Static4(Array[][, ,] param1, long param2, ushort param3
        , ref Array param4, float[][] param5, ref byte[] param6, float[,] param7, ref 
		TestEnum param8)
    {
        double[][,] local17 = (new double[101u][,]);
        int[,] local18 = (new int[85u, 101u]);
        ushort local19 = ((ushort)(77.0f));
        return (new double[48u, 34u, 29u]);
    }
    public static sbyte[][,] Static5(double[] param1, ref char param2, ref 
		object[,] param3, ushort param4, bool[][] param5, ref float param6, uint[, ,][]
         param7, long param8)
    {
        AA.m_fStatic1 /= AA.m_fStatic1;
        try
        {
            float local20 = ((float)(50));
            double[,] local21 = (new double[91u, 31u]);
            TestEnum[, ,] local22 = (new TestEnum[69u, 7u, 94u]);
            for (param2 += '\x6d'; Convert.ToBoolean(AA.m_fStatic1); App.m_uFwd10 /= AA.
                Static2((new String[36u, 114u]), 48.0, ref param8))
            {
                byte[][][, , ,][, ,] local23 = new byte[][][,,,][,,]{(new byte[36u][,,,][,,]), 
					(new byte[85u][,,,][,,]), (new byte[77u][,,,][,,]), new byte[][,,,][,,]{
					(new byte[122u, 118u, 41u, 13u][,,]), (new byte[20u, 126u, 99u, 44u][,,]), 
					(new byte[18u, 96u, 14u, 125u][,,]) }, (new byte[37u][,,,][,,]) };
                sbyte[,][, ,][,][, ,][][, , ,] local24 = (new sbyte[66u, 74u][, ,][,][,,][][,,,])
                    ;
                TestEnum[,] local25 = (new TestEnum[112u, 103u]);
                String[,] local26 = (new String[114u, 47u]);
                goto label2;
            }
            goto label3;
        }
        finally
        {
            ushort local27 = ((ushort)(17.0));
#pragma warning disable 1717
            for (App.m_ulFwd9 *= ((ulong)(85.0)); Convert.ToBoolean(param8); param2 -= param2
                )
            {
                AA.m_fStatic1 += (param6 = param6);
#pragma warning restore 1717
                do
                {
                    AA.Static3(
                        ref App.m_byFwd11,
                        ref param2,
                        ref App.m_achFwd12,
                        ref App.m_ulFwd9,
                        (67.0 - param6),
                        (new TestEnum[41u, 27u, 5u]),
                        App.m_sbyFwd4,
                        (new ulong[54u, 94u, 4u, 113u][, ,][,,]));
                    try
                    {
                        while (App.m_bFwd2)
                        {
                            param7[123, 77, 111][63] -= AA.Static2((new String[113u, 113u]), 117.0,
                                ref param8);
                        }
                        do
                        {
                        }
                        while (App.m_bFwd2);
                        for (param8 /= (param8 | param8); App.m_bFwd2; App.m_uFwd10 -= ((uint)(110.0))
                            )
                        {
                        }
                    }
                    catch (Exception)
                    {
                    }
                    param4 *= param4;
                }
                while (App.m_bFwd2);
                AA.m_fStatic1 /= AA.m_fStatic1;
            }
        }
    label3:
    label2:
        return new sbyte[][,] { (new sbyte[50u, 121u]), (new sbyte[59u, 10u]) };
    }
}

[StructLayout(LayoutKind.Sequential)]
public class App
{
    static int Main()
    {
        try
        {
            Console.WriteLine("Testing AA::Static1");
            AA.Static1(
                ref App.m_achFwd7,
                ref App.m_abyFwd8,
                App.m_ulFwd9,
                (new bool[2u, 84u, 69u]));
        }
        catch (Exception x)
        {
            Console.WriteLine("Exception handled: " + x.ToString());
        }
        try
        {
            Console.WriteLine("Testing AA::Static2");
            AA.Static2(
                (new String[13u, 8u]),
                55.0,
                ref App.m_lFwd3);
        }
        catch (Exception x)
        {
            Console.WriteLine("Exception handled: " + x.ToString());
        }
        try
        {
            Console.WriteLine("Testing AA::Static3");
            AA.Static3(
                ref App.m_byFwd11,
                ref App.m_chFwd6,
                ref App.m_achFwd12,
                ref App.m_ulFwd9,
                118.0,
                (new TestEnum[46u, 80u, 35u]),
                ((sbyte)(72)),
                (new ulong[97u, 36u, 52u, 126u][, ,][,,]));
        }
        catch (Exception x)
        {
            Console.WriteLine("Exception handled: " + x.ToString());
        }
        try
        {
            Console.WriteLine("Testing AA::Static4");
            AA.Static4(
                (new Array[80u][, ,]),
                ((long)(88)),
                ((ushort)(AA.m_fStatic1)),
                ref App.m_xFwd13,
                (new float[16u][]),
                ref App.m_abyFwd14,
                (new float[93u, 70u]),
                ref App.m_xFwd15);
        }
        catch (Exception x)
        {
            Console.WriteLine("Exception handled: " + x.ToString());
        }
        try
        {
            Console.WriteLine("Testing AA::Static5");
            AA.Static5(
                (new double[66u]),
                ref App.m_chFwd6,
                ref App.m_aobjFwd16,
                ((ushort)(119u)),
                new bool[][]{new bool[]{true, false, false }, new bool[]{true, true, true }
					, new bool[]{false, true }, (new bool[126u]), (new bool[4u]) },
                ref AA.m_fStatic1,
                (new uint[52u, 87u, 34u][]),
                App.m_lFwd3);
        }
        catch (Exception x)
        {
            Console.WriteLine("Exception handled: " + x.ToString());
        }
        Console.WriteLine("Passed.");
        return 100;
    }
    public static short m_shFwd1;
    public static bool m_bFwd2;
    public static long m_lFwd3;
    public static sbyte m_sbyFwd4;
    public static int m_iFwd5;
    public static char m_chFwd6;
    public static char[, ,] m_achFwd7;
    public static byte[, ,] m_abyFwd8;
    public static ulong m_ulFwd9;
    public static uint m_uFwd10;
    public static byte m_byFwd11;
    public static char[,][,][, ,] m_achFwd12;
    public static Array m_xFwd13;
    public static byte[] m_abyFwd14;
    public static TestEnum m_xFwd15;
    public static object[,] m_aobjFwd16;
}