summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-18576.rs
blob: 389cf108b05eeddb5e4ce3f39c26cff600ef80c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-fail
// error-pattern:stop
// 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();
}

extern "C" fn other() {}