blob: 4bd7ee45dfee4470d5c9f8b09b0d22fd4ce81f8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// run-pass
/*!
* This is a regression test for a bug in LLVM, fixed in upstream r179587,
* where the switch instructions generated for destructuring enums
* represented with nullable pointers could be misoptimized in some cases.
*/
enum List<X> { Nil, Cons(X, #[allow(dead_code)] Box<List<X>>) }
pub fn main() {
match List::Cons(10, Box::new(List::Nil)) {
List::Cons(10, _) => {}
List::Nil => {}
_ => panic!()
}
}
|