about summary refs log tree commit diff
path: root/tests/codegen/cffi
diff options
context:
space:
mode:
authorDianQK <dianqk@dianqk.net>2024-06-30 21:33:46 +0800
committerDianQK <dianqk@dianqk.net>2024-07-02 06:33:35 +0800
commitc453dcd62abba536d0580ad9b880b86d46e911ce (patch)
tree1988d22a2a95635292ac894ef03ef7dc71ccbc49 /tests/codegen/cffi
parent09e0abb0d19822455bfc40a8cf31f8fd5a675ba9 (diff)
Use the aligned size for alloca at args when the pass mode is cast.
The `load` and `store` instructions in LLVM access the aligned size.
Diffstat (limited to 'tests/codegen/cffi')
-rw-r--r--tests/codegen/cffi/ffi-out-of-bounds-loads.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/codegen/cffi/ffi-out-of-bounds-loads.rs b/tests/codegen/cffi/ffi-out-of-bounds-loads.rs
index 614d5d94f62..a4b7c0caa6d 100644
--- a/tests/codegen/cffi/ffi-out-of-bounds-loads.rs
+++ b/tests/codegen/cffi/ffi-out-of-bounds-loads.rs
@@ -1,5 +1,5 @@
 //@ revisions: linux apple
-//@ compile-flags: -C opt-level=0 -C no-prepopulate-passes
+//@ compile-flags: -C opt-level=0 -C no-prepopulate-passes -C passes=lint
 
 //@[linux] compile-flags: --target x86_64-unknown-linux-gnu
 //@[linux] needs-llvm-components: x86
@@ -36,7 +36,7 @@ extern "C" {
 pub fn test() {
     let s = S { f1: 1, f2: 2, f3: 3 };
     unsafe {
-        // CHECK: [[ALLOCA:%.+]] = alloca [12 x i8], align 8
+        // CHECK: [[ALLOCA:%.+]] = alloca [16 x i8], align 8
         // CHECK: [[LOAD:%.+]] = load { i64, i32 }, ptr [[ALLOCA]], align 8
         // CHECK: call void @foo({ i64, i32 } [[LOAD]])
         foo(s);