add test that exhausts argument registers

This commit is contained in:
Folkert 2023-10-08 18:23:41 +02:00
parent a03772d5cc
commit 46e8328056
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -4612,3 +4612,21 @@ fn linked_list_trmc() {
i64
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
fn many_arguments() {
// exhausts all argument registers on x86 and aarch
assert_evals_to!(
indoc!(
r#"
fun = \a,b,c,d, e,f,g,h, i ->
(a + b + c + d) + (e + f + g + h) + i
fun 0i64 1 2 3 4 5 6 7 8
"#
),
1 + 2 + 3 + 4 + 5 + 6 + 7 + 8,
i64
);
}