diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-18576.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-18576.rs b/src/test/ui/issues/issue-18576.rs new file mode 100644 index 000000000..389cf108b --- /dev/null +++ b/src/test/ui/issues/issue-18576.rs @@ -0,0 +1,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() {} |