File tree 6 files changed +13
-6
lines changed
compiler/rustc_codegen_llvm/src/gotoc/cbmc/irep
scripts/setup/ubuntu-20.04
6 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -278,15 +278,15 @@ impl ToIrep for ExprValue {
278
278
sub : vec ! [ e. to_irep( mm) ] ,
279
279
named_sub : btree_map ! [ (
280
280
IrepId :: CBoundsCheck ,
281
- if * allow_zero { Irep :: one ( ) } else { Irep :: zero ( ) }
281
+ if * allow_zero { Irep :: zero ( ) } else { Irep :: one ( ) }
282
282
) ] ,
283
283
} ,
284
284
ExprValue :: UnOp { op : UnaryOperand :: CountTrailingZeros { allow_zero } , e } => Irep {
285
285
id : IrepId :: CountTrailingZeros ,
286
286
sub : vec ! [ e. to_irep( mm) ] ,
287
287
named_sub : btree_map ! [ (
288
288
IrepId :: CBoundsCheck ,
289
- if * allow_zero { Irep :: one ( ) } else { Irep :: zero ( ) }
289
+ if * allow_zero { Irep :: zero ( ) } else { Irep :: one ( ) }
290
290
) ] ,
291
291
} ,
292
292
ExprValue :: UnOp { op, e } => {
Original file line number Diff line number Diff line change 3
3
#![ feature( core_intrinsics) ]
4
4
use std:: intrinsics:: ctlz_nonzero;
5
5
6
+ /// rmc bounds_fail.rs -- --bounds-check
6
7
fn main ( ) {
7
8
let uv8: u8 = 0 ;
8
9
let uv16: u16 = 0 ;
Original file line number Diff line number Diff line change 3
3
#![ feature( core_intrinsics) ]
4
4
use std:: intrinsics:: cttz_nonzero;
5
5
6
+ /// rmc bounds_fail.rs -- --bounds-check
6
7
fn main ( ) {
7
8
let uv8: u8 = 0 ;
8
9
let uv16: u16 = 0 ;
File renamed without changes.
Original file line number Diff line number Diff line change @@ -23,7 +23,12 @@ for f in `find $TEST_DIR -name '*.rs'`; do
23
23
continue
24
24
fi
25
25
26
- rmc $f -- --object-bits 11 --unwind $UNWIND > .sandbox/" $NAME " .output
26
+ EXTRA_ARGS=" "
27
+ if [[ " $f " == * bounds* ]]; then
28
+ EXTRA_ARGS+=" --bounds-check"
29
+ fi
30
+
31
+ rmc $f -- --object-bits 11 --unwind $UNWIND $EXTRA_ARGS > .sandbox/" $NAME " .output
27
32
28
33
CODE=$?
29
34
if [[ $CODE == 0 ]]; then
Original file line number Diff line number Diff line change 4
4
5
5
set -eux
6
6
7
- # Install CBMC 5.27 for Ubuntu 20.04
8
- wget https://github.com/diffblue/cbmc/releases/download/cbmc-5.27.0 /ubuntu-20.04-cbmc-5.27.0 -Linux.deb \
9
- && sudo dpkg -i ubuntu-20.04-cbmc-5.27.0 -Linux.deb \
7
+ # Install CBMC 5.30.1 for Ubuntu 20.04
8
+ wget https://github.com/diffblue/cbmc/releases/download/cbmc-5.30.1 /ubuntu-20.04-cbmc-5.30.1 -Linux.deb \
9
+ && sudo dpkg -i ubuntu-20.04-cbmc-5.30.1 -Linux.deb \
10
10
&& cbmc --version
You can’t perform that action at this time.
0 commit comments