]>
git.proxmox.com Git - rustc.git/blob - src/test/codegen/issue-77812.rs
1 // min-llvm-version: 12.0.0
5 // Test that LLVM can eliminate the unreachable `Variant::Zero` branch.
7 #[derive(Copy, Clone, Eq, PartialEq)]
19 pub static mut GLOBAL
: Variant
= Variant
::Zero
;
21 // CHECK-LABEL: @issue_77812
23 pub unsafe fn issue_77812() {
25 if g
!= Variant
::Zero
{
27 Variant
::One
=> exf1(),
28 Variant
::Two
=> exf2(),
30 Variant
::Zero
=> panic
!(),