Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion kmir/src/kmir/kdist/mir-semantics/kmir.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,8 @@ Therefore a heuristics is used here:
_SPAN
)
=>
#setTupleArgs(2, getValue(LOCALS, TUPLE)) ~> #execBlock(FIRST)
#setLocalValue(place(local(1), .ProjectionElems), #incrementRef(getValue(LOCALS, CLOSURE)))
~> #setTupleArgs(2, getValue(LOCALS, TUPLE)) ~> #execBlock(FIRST)
// arguments are tuple components, stored as _2 .. _n
...
</k>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
fn main() {
let _keep: fn() -> bool = repro;
}

#[inline(never)]
#[no_mangle]
pub fn repro() -> bool {
let k0 = Pubkey([1; 32]);
let k1 = Pubkey([2; 32]);
let k2 = Pubkey([3; 32]);
let n = 2usize;

let accounts = [
AccountInfo { key: &k0 },
AccountInfo { key: &k1 },
AccountInfo { key: &k2 },
];
let signers = [k1, k2, k0];

accounts[1..]
.iter()
.map(|signer| *signer.key)
.eq(signers.iter().take(n).copied())
}

#[derive(Clone)]
struct AccountInfo<'a> {
key: &'a Pubkey,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
struct Pubkey([u8; 32]);
1 change: 1 addition & 0 deletions kmir/src/tests/integration/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
'assume-cheatcode-conflict-fail': ['check_assume_conflict'],
'transmute-bytes': ['bytes_to_u64', 'u64_to_bytes'],
'test_offset_from-fail': ['testing'],
'iter-eq-copied-take-dereftruncate': ['repro'],
}
PROVE_RS_SHOW_SPECS = [
'local-raw-fail',
Expand Down