repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[mono-api-info] Use XmlWriter instead of XmlDocument to make this faster.
[mono-project.git]
/
mono
/
tests
/
bug-27420.cs
blob
0866a0515e7fb03ff82b66843e6bf6b794fec9f1
1
//
2
// bug-27420.cs: Using valuetypes in a loop leads to crash
3
//
4
5
using
System
;
6
7
struct
A1
{
8
int
i
,
j
,
k
,
l
,
m
,
n
,
o
,
p
;
9
}
10
11
// Allocate a big structure
12
struct
A2
{
13
A1 a
,
b
,
c
,
d
,
e
,
f
;
14
15
public int
g
;
16
}
17
18
public class
crash
19
{
20
static
A2
get_a2
() {
21
return new
A2
();
22
}
23
24
static void
Main
() {
25
int
i
;
26
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
;
30
}
31
}
32
}