2023-10-16 12:36:39 -05:00
|
|
|
// skip-filecheck
|
2022-11-11 04:24:31 -06:00
|
|
|
// unit-test: DataflowConstProp
|
|
|
|
|
|
|
|
// The struct has scalar ABI, but is not a scalar type.
|
|
|
|
// Make sure that we handle this correctly.
|
|
|
|
#[repr(transparent)]
|
|
|
|
struct I32(i32);
|
|
|
|
|
|
|
|
// EMIT_MIR repr_transparent.main.DataflowConstProp.diff
|
|
|
|
fn main() {
|
|
|
|
let x = I32(0);
|
|
|
|
let y = I32(x.0 + x.0);
|
|
|
|
}
|