From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/run-make/wasm-spurious-import/main.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/run-make/wasm-spurious-import/main.rs (limited to 'tests/run-make/wasm-spurious-import/main.rs') diff --git a/tests/run-make/wasm-spurious-import/main.rs b/tests/run-make/wasm-spurious-import/main.rs new file mode 100644 index 000000000..fcbead5e2 --- /dev/null +++ b/tests/run-make/wasm-spurious-import/main.rs @@ -0,0 +1,14 @@ +#![crate_type = "cdylib"] +#![no_std] + +#[panic_handler] +fn my_panic(_info: &core::panic::PanicInfo) -> ! { + loop {} +} + +#[no_mangle] +pub fn multer(a: i128, b: i128) -> i128 { + // Trigger usage of the __multi3 compiler intrinsic which then leads to an imported + // panic function in case of a bug. We verify that no imports exist in our verifier. + a * b +} -- cgit v1.2.3