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

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

17 lines
324 B
Rust
Raw Normal View History

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