os-rust/tests/mir-opt/const_prop/reify_fn_ptr.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
388 B
Rust
Raw Normal View History

2023-09-20 21:43:33 +00:00
//@ unit-test: GVN
// EMIT_MIR reify_fn_ptr.main.GVN.diff
2020-04-04 17:15:01 +00:00
fn main() {
2023-12-02 21:00:59 +00:00
// 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();
}