projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[msvc] Update csproj files (#4136)
[mono.git]
/
mcs
/
tests
/
gtest-fixedbuffer-05.cs
1
// Compiler options: -unsafe
2
3
unsafe struct S
4
{
5
public short nData;
6
public fixed int Data [1];
7
}
8
9
unsafe struct S2
10
{
11
public uint Header;
12
public fixed byte Data [5];
13
14
public void Test ()
15
{
16
fixed (byte* bP = Data) {
17
S* p = (S*) bP;
18
p = (S*) (p->Data + p->nData);
19
}
20
}
21
22
public static void Main ()
23
{
24
new S2 ().Test ();
25
}
26
}
27