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 01:50:32 -05:00
// run-fail
// error-pattern:stop
2020-05-07 10:39:02 -05: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 01:50:32 -05:00
2016-05-26 21:39:36 -05:00
extern "C" fn other() {}