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
/
test-688.cs
1
// Compiler options: -unsafe
2
3
using System;
4
5
unsafe class Test
6
{
7
public static unsafe byte* GetFoo ()
8
{
9
byte *one = (byte*)1;
10
return 1 + one;
11
}
12
13
public static unsafe byte* GetFoo2 ()
14
{
15
byte *one = (byte*)3;
16
return one + 3;
17
}
18
19
public static int Main()
20
{
21
int b = (int)GetFoo ();
22
Console.WriteLine (b);
23
if (b != 2)
24
return 1;
25
26
b = (int)GetFoo2 ();
27
Console.WriteLine (b);
28
if (b != 6)
29
return 2;
30
31
return 0;
32
}
33
}