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
393 B
Rust
Raw Normal View History

2023-05-01 11:18:41 +00:00
// unit-test: ConstProp
2020-07-27 21:22:43 +02:00
// EMIT_MIR reify_fn_ptr.main.ConstProp.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 (PointerExposeAddress);
// CHECK: [[back:_.*]] = move [[addr]] as *const fn() (PointerFromExposedAddress);
let _ = main as usize as *const fn();
}