mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Add test for #114691
This commit is contained in:
parent
64cc56b31d
commit
62ca87f45d
39
tests/ui/match/issue-114691.rs
Normal file
39
tests/ui/match/issue-114691.rs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
// run-pass
|
||||||
|
|
||||||
|
// This test used to be miscompiled by LLVM 17.
|
||||||
|
#![allow(dead_code)]
|
||||||
|
|
||||||
|
enum Pass {
|
||||||
|
Opaque {
|
||||||
|
clear_color: [f32; 4],
|
||||||
|
with_depth_pre_pass: bool,
|
||||||
|
},
|
||||||
|
Transparent,
|
||||||
|
}
|
||||||
|
|
||||||
|
enum LoadOp {
|
||||||
|
Clear,
|
||||||
|
Load,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline(never)]
|
||||||
|
fn check(x: Option<LoadOp>) {
|
||||||
|
assert!(x.is_none());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline(never)]
|
||||||
|
fn test(mode: Pass) {
|
||||||
|
check(match mode {
|
||||||
|
Pass::Opaque {
|
||||||
|
with_depth_pre_pass: true,
|
||||||
|
..
|
||||||
|
}
|
||||||
|
| Pass::Transparent => None,
|
||||||
|
_ => Some(LoadOp::Clear),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
test(Pass::Transparent);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user