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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
321 B
Rust
Raw Normal View History

2020-04-16 15:50:32 +09:00
// run-fail
// error-pattern:stop
2020-05-08 00:39:02 +09:00
// 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 15:50:32 +09:00
2016-05-27 08:09:36 +05:30
extern "C" fn other() {}