rust/tests/ui/extern/issue-18576.rs

17 lines
324 B
Rust
Raw Normal View History

//@ run-fail
//@ error-pattern:stop
//@ ignore-emscripten no processes
// #18576
// Make sure that calling an extern function pointer in an unreachable
// context doesn't cause an LLVM assertion
#[allow(unreachable_code)]
fn main() {
panic!("stop");
let pointer = other;
pointer();
}
2020-04-16 06:50:32 +00:00
2016-05-27 02:39:36 +00:00
extern "C" fn other() {}