Add test.
This commit is contained in:
parent
f6fa358a18
commit
6aebb2cfec
8
tests/ui/mir/alignment/misaligned-constant-gvn.rs
Normal file
8
tests/ui/mir/alignment/misaligned-constant-gvn.rs
Normal file
@ -0,0 +1,8 @@
|
||||
//@ build-pass
|
||||
//@ compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+GVN
|
||||
|
||||
fn main() {
|
||||
let variant: Option<u32> = None;
|
||||
let transmuted: u64 = unsafe { std::mem::transmute(variant) };
|
||||
println!("{transmuted}");
|
||||
}
|
Loading…
Reference in New Issue
Block a user