summary refs log tree commit diff
path: root/src/test/run-fail/issue-18576.rs
blob: ca9d1e5f5e7de0f5e8087246ee57650d99d414fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// error-pattern:stop

// #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();
}
extern "C" fn other() {}