mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
11 lines
392 B
Rust
11 lines
392 B
Rust
//@ test-mir-pass: GVN
|
|
// EMIT_MIR reify_fn_ptr.main.GVN.diff
|
|
|
|
fn main() {
|
|
// CHECK-LABEL: fn main(
|
|
// CHECK: [[ptr:_.*]] = main as fn() (PointerCoercion(ReifyFnPointer));
|
|
// CHECK: [[addr:_.*]] = move [[ptr]] as usize (PointerExposeProvenance);
|
|
// CHECK: [[back:_.*]] = move [[addr]] as *const fn() (PointerWithExposedProvenance);
|
|
let _ = main as usize as *const fn();
|
|
}
|