summaryrefslogtreecommitdiff
path: root/tests/src/JIT/jit64/opt/rngchk/RngchkStress3.cs
blob: 95704607ae2ce532bd4a6bab36ca545912bf38d1 (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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

//This is a positive stress test.  All the rngchk should be removed

using System;
using System.Runtime.CompilerServices;

namespace SimpleArray_01
{
    public delegate void RngTest();
    internal class Class1
    {
        private static int Main()
        {
            int retVal = 100;

            int[] array = new int[3];
            for (int index1 = 0; index1 < array.Length; index1++)
            {
                for (int index2 = 0; index2 < array.Length; index2++)
                {
                    for (int index3 = 0; index3 < array.Length; index3++)
                    {
                        for (int index4 = 0; index4 < array.Length; index4++)
                        {
                            for (int index5 = 0; index5 < array.Length; index5++)
                            {
                                for (int index6 = 0; index6 < array.Length; index6++)
                                {
                                    for (int index7 = 0; index7 < array.Length; index7++)
                                    {
                                        for (int index8 = 0; index8 < array.Length; index8++)
                                        {
                                            for (int index9 = 0; index9 < array.Length; index9++)
                                            {
                                                for (int index10 = 0; index10 < array.Length; index10++)
                                                {
                                                    for (int index11 = 0; index11 < array.Length; index11++)
                                                    {
                                                        for (int index12 = 0; index12 < array.Length; index12++)
                                                        {
                                                            for (int index13 = 0; index13 < array.Length; index13++)
                                                            {
                                                                for (int index14 = 0; index14 < array.Length; index14++)
                                                                {
                                                                    for (int index15 = 0; index15 < array.Length; index15++)
                                                                    {
                                                                        for (int index16 = 0; index16 < array.Length; index16++)
                                                                        {
                                                                            for (int index17 = 0; index17 < array.Length; index17++)
                                                                            {
                                                                                for (int index18 = 0; index18 < array.Length; index18++)
                                                                                {
                                                                                    for (int index19 = 0; index19 < array.Length; index19++)
                                                                                    {
                                                                                        for (int index20 = 0; index20 < array.Length; index20++)
                                                                                        {
                                                                                            array[index1] = index1;
                                                                                            array[index2] = index2;
                                                                                            array[index3] = index3;
                                                                                            array[index4] = index4;
                                                                                            array[index5] = index5;
                                                                                            array[index6] = index6;
                                                                                            array[index7] = index7;
                                                                                            array[index8] = index8;
                                                                                            array[index9] = index9;
                                                                                            array[index10] = index10;
                                                                                            array[index11] = index11;
                                                                                            array[index12] = index12;
                                                                                            array[index13] = index13;
                                                                                            array[index14] = index14;
                                                                                            array[index15] = index15;
                                                                                            array[index16] = index16;
                                                                                            array[index17] = index17;
                                                                                            array[index18] = index18;
                                                                                            array[index19] = index19;
                                                                                            array[index20] = index20;
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return retVal;
        }
    }
}