Skip to content

mulodi4 debug assertion #148

@japaric

Description

@japaric

STR

#![feature(compiler_builtins_lib)]

extern crate compiler_builtins;

use compiler_builtins::int::mul::__mulodi4;

fn main() {
    let (a, b) = (72113192, -480093263);
    let mut overflow = 2;
    let c = __mulodi4(a, b, &mut overflow);
}
$ cross run --target armv7-unknown-linux-gnueabihf
     Running `/target/armv7-unknown-linux-gnueabihf/debug/foo`
thread 'main' panicked at 'attempt to subtract with overflow', /cargo/git/checkouts/compiler-builtins-ec094dc45a0179c8/0507842/src/int/sdiv.rs:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.

The command hangs and doesn't return but that could be a Cross bug ... I don't know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions