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
"disable_omit_fp" can now be included in MONO_DEBUG
[mono-project.git]
/
mcs
/
tests
/
test-618.cs
blob
29891e49dacbc5854268e1b390a0c90e43c22a7e
1
using
System
;
2
3
class
C
4
{
5
//
6
// All the operations should be reduced
7
//
8
public static void
ZeroBasedReductions
()
9
{
10
int
a
=
1
;
11
12
a
=
a
+
0
;
13
a
=
a
-
0
;
14
a
=
a
|
0
;
15
a
=
0
+
a
;
16
a
=
0
|
a
;
17
18
a
=
a
>>
0x40
;
19
}
20
21
public static void
ZeroBasedReductionsWithConversion
()
22
{
23
byte
b
=
0
;
24
b
|=
0
;
25
b
+=
0
;
26
b
-=
0
;
27
b
*=
1
;
28
}
29
30
public static int
Main
()
31
{
32
ZeroBasedReductions
();
33
ZeroBasedReductionsWithConversion
();
34
35
int
a
=
9
;
36
a
=
0
-
a
;
37
if
(
a
!= -
9
)
38
return
1
;
39
40
return
0
;
41
}
42
}
43
44