summaryrefslogtreecommitdiffstats
path: root/tests/run-make/wasm-spurious-import/main.rs
blob: fcbead5e28bd2113b5d23c79409b4340ae7b2cf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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
}