about summary refs log tree commit diff
path: root/tests/ui/extern/issue-18576.rs
blob: 6b41fe736314585f5b0530a48414c18f9bb2b243 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ run-fail
//@ error-pattern:stop
//@ needs-subprocess

// #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() {}