File tree Expand file tree Collapse file tree 3 files changed +42
-8
lines changed
jbmc/regression/jbmc/shift1 Expand file tree Collapse file tree 3 files changed +42
-8
lines changed Original file line number Diff line number Diff line change 1
1
class shift1
2
2
{
3
- public static void main ( String [] args )
3
+ public static void foo ( int c , long x )
4
4
{
5
- assert (5 << 1 ) == 10 ;
6
- assert (5 >> 1 ) == 2 ;
7
- assert (-4 >> 1 ) == -2 ;
8
- assert (-4 >>> 1 ) == 2147483646 ;
5
+ switch (c )
6
+ {
7
+ case 0 :
8
+ if (x == 5L ) assert ((int )x << 1 ) == 10 ;
9
+ break ;
10
+ case 1 :
11
+ if (x == 5L ) assert ((int )x >> 1 ) == 2 ;
12
+ break ;
13
+ case 2 :
14
+ if (x == -4L ) assert ((int )x >> 1 ) == -2 ;
15
+ break ;
16
+ case 3 :
17
+ if (x == -4L ) assert ((int )x >>> 1 ) == 2147483646 ;
18
+ break ;
19
+ case 4 :
20
+ if (x == 1L ) assert ((int )x << 0 ) == 1 ;
21
+ break ;
22
+ case 5 :
23
+ if (x == 1L ) assert ((int )x << 31 ) == -2147483648 ;
24
+ break ;
25
+ case 6 :
26
+ if (x == 1L ) assert ((int )x << 32 ) == 1 ;
27
+ break ;
28
+ case 7 :
29
+ if (x == 1L ) assert ((int )x << 33 ) == 2 ;
30
+ break ;
31
+ case 8 :
32
+ if (x == 1L ) assert (x << 0 ) == 1L ;
33
+ break ;
34
+ case 9 :
35
+ if (x == 1L ) assert (x << 63 ) == -9223372036854775808L ;
36
+ break ;
37
+ case 10 :
38
+ if (x == 1L ) assert (x << 64 ) == 1L ;
39
+ break ;
40
+ default :
41
+ if (x == 1L ) assert (x << 65 ) == 2L ;
42
+ break ;
43
+ }
9
44
}
10
45
}
11
-
Original file line number Diff line number Diff line change 1
- CORE
2
- shift1
1
+ KNOWNBUG
2
+ shift1.foo
3
3
4
4
^EXIT=0$
5
5
^SIGNAL=0$
You can’t perform that action at this time.
0 commit comments