blob: 58e6624ada6d5f140c2b848ee466df32e9f0c118 (
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
|
// 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.
//
// The legendary 37-byte value class.
namespace DefaultNamespace
{
//@BEGINRENAME; Verify this renames
//@ENDRENAME; Verify this renames
using System;
internal struct V3
{
internal long a;
internal long b;
internal long c;
internal long d;
internal int e;
internal short f;
internal byte g;
public V3(int unused_param)
{
a = 1;
b = -2;
c = 3;
d = -4;
e = 5;
f = (short)-6;
g = 7;
}
public bool Validate()
{
return a == 1 && b == -2 && c == 3 && d == -4 && e == 5 && f == -6 && g == 7;
}
public override bool Equals(Object o) { return false; }
public override int GetHashCode() { return 0; }
}
public class jitBug
{
public static int Main(String[] args)
{
V3[] V3Array = new V3[5];
for (int i = 0; i < V3Array.Length; i++)
V3Array[i] = new V3();
/*
V3[] clone = null;
clone = (V3[]) V3Array.Clone();
if (clone.length != V3Array.length)
throw new Exception("V3[] length mismatch! cloned length: "+clone.length);
for(int i=0; i<V3Array.length; i++) {
clone[i].Validate();
}
Console.WriteLine("V3 array test worked");
/* */
return 100;
}
}
}
|