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
|
|
|
|
2019-06-04 21:51:30 -04:00
|
|
|
fn main() {
|
2023-12-02 21:00:59 +00:00
|
|
|
// CHECK-LABEL: fn main(
|
|
|
|
// CHECK: [[ptr:_.*]] = main as fn() (PointerCoercion(ReifyFnPointer));
|
2024-04-03 15:17:00 +02:00
|
|
|
// CHECK: [[addr:_.*]] = move [[ptr]] as usize (PointerExposeProvenance);
|
2024-03-23 12:21:20 +01:00
|
|
|
// CHECK: [[back:_.*]] = move [[addr]] as *const fn() (PointerWithExposedProvenance);
|
2019-06-04 21:51:30 -04:00
|
|
|
let _ = main as usize as *const fn();
|
|
|
|
}
|