From 6eaf4fedcff2884f7df72a7249423033abfba58b Mon Sep 17 00:00:00 2001 From: Shunpoco Date: Sat, 4 Jan 2025 12:40:41 +0000 Subject: [PATCH] Add FileCheck to mutate_through_pointer.rs --- tests/mir-opt/copy-prop/mutate_through_pointer.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/mir-opt/copy-prop/mutate_through_pointer.rs b/tests/mir-opt/copy-prop/mutate_through_pointer.rs index 53cca045248d..7523da8a292e 100644 --- a/tests/mir-opt/copy-prop/mutate_through_pointer.rs +++ b/tests/mir-opt/copy-prop/mutate_through_pointer.rs @@ -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;