repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2009-08-30 Jb Evain <jbevain@novell.com>
[mcs.git]
/
tests
/
test-339.cs
blob
1055cf4250c90fc6f654a9aa2beff599b6057a66
1
// Compiler options: -unsafe
2
3
using
System
;
4
5
struct
SS
6
{
7
}
8
9
public class
C
10
{
11
public static int
[]
field
=
new int
[]
{ 66 }
;
12
13
static int
Main
()
14
{
15
unsafe
{
16
SS
*
ss
=
stackalloc
SS
[
10
];
17
SS
*
s1
= &
ss
[
5
];
18
19
int
*
values
=
stackalloc int
[
20
];
20
int
*
p
= &
values
[
1
];
21
int
*
q
= &
values
[
15
];
22
23
Console
.
WriteLine
(
"p - q =
{0}
"
,
p
-
q
);
24
Console
.
WriteLine
(
"q - p =
{0}
"
,
q
-
p
);
25
}
26
return
0
;
27
}
28
}
29