2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / tests / bug-27420.cs
blob0866a0515e7fb03ff82b66843e6bf6b794fec9f1
1 //
2 // bug-27420.cs: Using valuetypes in a loop leads to crash
3 //
5 using System;
7 struct A1 {
8 int i, j, k, l, m, n, o, p;
11 // Allocate a big structure
12 struct A2 {
13 A1 a, b, c, d, e, f;
15 public int g;
18 public class crash
20 static A2 get_a2 () {
21 return new A2 ();
24 static void Main() {
25 int i;
27 for (int j = 0; j < 100000; ++j) {
28 // Force the runtime to create a temporary valuetype on the stack
29 i = get_a2 ().g;