blob: 98ea4e5db4e6f297c009e76d91a292f53005fe3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
//
// Tests related to constants and binary operators (bug 39018)
//
class X {
void Bug1 () {
uint a = 1, b = 2;
long l = (b & (0x1 << 31));
}
void Bug2 () {
uint a = 1, b = 2;
const int l = 1;
const int r = 31;
long ll = (b & (l << r));
}
public static int Main ()
{
const byte b = 255;
const int i = b << int.MaxValue;
const int i2 = b << int.MaxValue;
long token = uint.MaxValue;
const int column_mask = (int)((1 << 32) - 1);
int r2 = (int) (token & column_mask);
if (r2 != 0)
return 1;
return 0;
}
}
|