]> git.lizzy.rs Git - rust.git/blobdiff - src/test/codegen/loads.rs
Auto merge of #35856 - phimuemue:master, r=brson
[rust.git] / src / test / codegen / loads.rs
index 21f23b6ea18612dee9c0ae2708964553a47f3639..def5269e07a02b1c345a897e5677c65ba9fa9276 100644 (file)
@@ -23,6 +23,7 @@ pub struct Bytes {
 #[no_mangle]
 pub fn borrow(x: &i32) -> &i32 {
 // CHECK: load {{(i32\*, )?}}i32** %x{{.*}}, !nonnull
+    &x; // keep variable in an alloca
     x
 }