Add FileCheck to mutate_through_pointer.rs
This commit is contained in:
parent
3d12668f21
commit
6eaf4fedcf
1 changed files with 4 additions and 1 deletions
|
|
@ -1,4 +1,3 @@
|
|||
// skip-filecheck
|
||||
//@ test-mir-pass: CopyProp
|
||||
//
|
||||
// This attempts to mutate `a` via a pointer derived from `addr_of!(a)`. That is UB
|
||||
|
|
@ -18,6 +17,10 @@ use core::intrinsics::mir::*;
|
|||
|
||||
#[custom_mir(dialect = "analysis", phase = "post-cleanup")]
|
||||
fn f(c: bool) -> bool {
|
||||
// CHECK-LABEL: fn f(
|
||||
// CHECK: _2 = copy _1;
|
||||
// CHECK-NOT: _3 = &raw const _1;
|
||||
// CHECK: _3 = &raw const _2;
|
||||
mir! {
|
||||
{
|
||||
let a = c;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue