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
2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git]
/
tests
/
test-654.cs
blob
745aaaffc7dbb66e3f2e25523afd28051d99dae3
1
// Compiler options: -unsafe
2
3
using
System
;
4
5
class
Program
6
{
7
static unsafe int
Main
()
8
{
9
return
Test
((
sbyte
*) (-
1
));
10
}
11
12
static unsafe int
Test
(
sbyte
*
x
)
13
{
14
if
((
x
+
1
) <
x
) {
15
Console
.
WriteLine
(
"OK"
);
16
return
0
;
17
}
else
{
18
Console
.
WriteLine
(
"BAD"
);
19
return
1
;
20
}
21
}
22
}
23