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
[corlib] Fix a few NSLogWriter issues. (#13799)
[mono-project.git]
/
mcs
/
tests
/
test-688.cs
blob
5907aee9da9ecd7f075e48dede6d984b3d1a0f6d
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
}