diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
commit | 631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch) | |
tree | a1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/codegen/issue-56927.rs | |
parent | Adding debian version 1.69.0+dfsg1-1. (diff) | |
download | rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/codegen/issue-56927.rs')
-rw-r--r-- | tests/codegen/issue-56927.rs | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/codegen/issue-56927.rs b/tests/codegen/issue-56927.rs deleted file mode 100644 index 044d72181..000000000 --- a/tests/codegen/issue-56927.rs +++ /dev/null @@ -1,43 +0,0 @@ -// compile-flags: -C no-prepopulate-passes - -#![crate_type="rlib"] - -#[repr(align(16))] -pub struct S { - arr: [u32; 4], -} - -// CHECK-LABEL: @test1 -// CHECK: store i32 0, {{i32\*|ptr}} %{{.+}}, align 16 -// CHECK: store i32 1, {{i32\*|ptr}} %{{.+}}, align 4 -// CHECK: store i32 2, {{i32\*|ptr}} %{{.+}}, align 8 -// CHECK: store i32 3, {{i32\*|ptr}} %{{.+}}, align 4 -#[no_mangle] -pub fn test1(s: &mut S) { - s.arr[0] = 0; - s.arr[1] = 1; - s.arr[2] = 2; - s.arr[3] = 3; -} - -// CHECK-LABEL: @test2 -// CHECK: store i32 4, {{i32\*|ptr}} %{{.+}}, align 4 -#[allow(unconditional_panic)] -#[no_mangle] -pub fn test2(s: &mut S) { - s.arr[usize::MAX / 4 + 1] = 4; -} - -// CHECK-LABEL: @test3 -// CHECK: store i32 5, {{i32\*|ptr}} %{{.+}}, align 4 -#[no_mangle] -pub fn test3(s: &mut S, i: usize) { - s.arr[i] = 5; -} - -// CHECK-LABEL: @test4 -// CHECK: store i32 6, {{i32\*|ptr}} %{{.+}}, align 4 -#[no_mangle] -pub fn test4(s: &mut S) { - s.arr = [6; 4]; -} |