FileCheck reify_fn_ptr.

This commit is contained in:
Camille GILLOT 2023-12-02 21:00:59 +00:00
parent 6baec3ccc2
commit 343ef6a9cb

View File

@ -1,7 +1,10 @@
// skip-filecheck
// unit-test: ConstProp // unit-test: ConstProp
// EMIT_MIR reify_fn_ptr.main.ConstProp.diff // EMIT_MIR reify_fn_ptr.main.ConstProp.diff
fn main() { fn main() {
// 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(); let _ = main as usize as *const fn();
} }