2023-10-16 12:36:39 -05:00
|
|
|
// skip-filecheck
|
2023-09-12 12:29:32 -05:00
|
|
|
// unit-test: DataflowConstProp
|
2023-09-20 16:43:33 -05:00
|
|
|
// compile-flags: -Zmir-enable-passes=+GVN,+Inline
|
2023-09-20 13:18:44 -05:00
|
|
|
// ignore-debug assertions change the output MIR
|
2023-09-12 12:29:32 -05:00
|
|
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
|
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
|
|
|
|
|
|
|
struct A {
|
|
|
|
foo: Box<[bool]>,
|
|
|
|
}
|
|
|
|
|
2023-09-20 16:43:33 -05:00
|
|
|
// EMIT_MIR default_boxed_slice.main.GVN.diff
|
2023-09-12 12:29:32 -05:00
|
|
|
// EMIT_MIR default_boxed_slice.main.DataflowConstProp.diff
|
|
|
|
fn main() {
|
|
|
|
// ConstProp will create a constant of type `Box<[bool]>`.
|
|
|
|
// Verify that `DataflowConstProp` does not ICE trying to dereference it directly.
|
|
|
|
let a: A = A { foo: Box::default() };
|
|
|
|
}
|