2023-10-16 12:36:39 -05:00
|
|
|
// skip-filecheck
|
2024-04-20 06:19:34 -05:00
|
|
|
//@ test-mir-pass: CopyProp
|
2023-05-10 10:25:02 -05:00
|
|
|
// Verify that we do not ICE on partial initializations.
|
|
|
|
|
|
|
|
#![feature(custom_mir, core_intrinsics)]
|
|
|
|
extern crate core;
|
|
|
|
use core::intrinsics::mir::*;
|
|
|
|
|
|
|
|
// EMIT_MIR partial_init.main.CopyProp.diff
|
|
|
|
#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
|
|
|
|
pub fn main() {
|
|
|
|
mir! (
|
|
|
|
let x: (isize, );
|
|
|
|
{
|
|
|
|
x.0 = 1;
|
|
|
|
Return()
|
|
|
|
}
|
|
|
|
)
|
|
|
|
}
|