Skip to content

Commit 2943129

Browse files
committed
Added test for min_align_of_val (showing it is stuck)
1 parent 942e5a7 commit 2943129

3 files changed

Lines changed: 23 additions & 1 deletion

File tree

kmir/src/tests/integration/data/prove-rs/intrinsics.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,10 @@ pub fn test_size_of_val() {
6666
let r = unsafe { intrinsics::size_of_val(&x as *const u32) };
6767
assert!(r == 4);
6868
}
69+
70+
#[no_mangle]
71+
pub fn test_min_align_of_val() {
72+
let x: u32 = 0;
73+
let r = unsafe { intrinsics::min_align_of_val(&x as *const u32) };
74+
assert!(r == 4);
75+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
┌─ 1 (root, init)
3+
│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC
4+
│ span: 0
5+
6+
│ (32 steps)
7+
└─ 3 (stuck, leaf)
8+
#execIntrinsic ( IntrinsicFunction ( symbol ( "min_align_of_val" ) ) , operandMo
9+
span: 244
10+
11+
12+
┌─ 2 (root, leaf, target, terminal)
13+
│ #EndProgram ~> .K
14+
15+

kmir/src/tests/integration/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
PROVE_DIR = (Path(__file__).parent / 'data' / 'prove-rs').resolve(strict=True)
2929
PROVE_FILES = list(PROVE_DIR.glob('*.*'))
3030
PROVE_START_SYMBOLS = {
31-
'intrinsics': ['main', 'test_rotate_left', 'test_bswap', 'test_ctpop', 'test_ctlz_nonzero', 'test_size_of_val'],
31+
'intrinsics': ['main', 'test_rotate_left', 'test_bswap', 'test_ctpop', 'test_ctlz_nonzero', 'test_size_of_val', 'test_min_align_of_val'],
3232
'symbolic-args-fail': ['main', 'eats_all_args'],
3333
'symbolic-structs-fail': ['eats_struct_args'],
3434
'unchecked_arithmetic': ['unchecked_add_i32', 'unchecked_sub_usize', 'unchecked_mul_isize'],

0 commit comments

Comments
 (0)