diff options
| author | Michael Bradshaw <mjbshaw@google.com> | 2018-09-29 19:51:09 -0700 |
|---|---|---|
| committer | Michael Bradshaw <mjbshaw@google.com> | 2018-09-29 19:51:09 -0700 |
| commit | 43cc32fbb2506eff0090e894c1e8a46b62a8eb0b (patch) | |
| tree | ac301fe1be819c25d833880da0ab32bf550016eb /src/test/codegen | |
| parent | aec5330082a0c4664abf0f6604c1b05768a90234 (diff) | |
| parent | 9653f790333d1270f36f1614e85d8a7b54193e75 (diff) | |
| download | rust-43cc32fbb2506eff0090e894c1e8a46b62a8eb0b.tar.gz rust-43cc32fbb2506eff0090e894c1e8a46b62a8eb0b.zip | |
Merge branch 'master' into drop
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/align-struct.rs | 10 | ||||
| -rw-r--r-- | src/test/codegen/box-maybe-uninit.rs | 23 | ||||
| -rw-r--r-- | src/test/codegen/issue-32364.rs | 5 |
3 files changed, 13 insertions, 25 deletions
diff --git a/src/test/codegen/align-struct.rs b/src/test/codegen/align-struct.rs index bf119da2e82..887c43c6761 100644 --- a/src/test/codegen/align-struct.rs +++ b/src/test/codegen/align-struct.rs @@ -48,6 +48,16 @@ pub fn align64(i : i32) -> Align64 { a64 } +// For issue 54028: make sure that we are specifying the correct alignment for fields of aligned +// structs +// CHECK-LABEL: @align64_load +#[no_mangle] +pub fn align64_load(a: Align64) -> i32 { +// CHECK: [[FIELD:%.*]] = bitcast %Align64* %{{.*}} to i32* +// CHECK: {{%.*}} = load i32, i32* [[FIELD]], align 64 + a.0 +} + // CHECK-LABEL: @nested64 #[no_mangle] pub fn nested64(a: Align64, b: i32, c: i32, d: i8) -> Nested64 { diff --git a/src/test/codegen/box-maybe-uninit.rs b/src/test/codegen/box-maybe-uninit.rs deleted file mode 100644 index 168e1a3eba0..00000000000 --- a/src/test/codegen/box-maybe-uninit.rs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// compile-flags: -O -#![crate_type="lib"] -#![feature(maybe_uninit)] - -use std::mem::MaybeUninit; - -// Boxing a `MaybeUninit` value should not copy junk from the stack -#[no_mangle] -pub fn box_uninitialized() -> Box<MaybeUninit<usize>> { - // CHECK-LABEL: @box_uninitialized - // CHECK-NOT: store - Box::new(MaybeUninit::uninitialized()) -} diff --git a/src/test/codegen/issue-32364.rs b/src/test/codegen/issue-32364.rs index 401253a315f..8feb10b5757 100644 --- a/src/test/codegen/issue-32364.rs +++ b/src/test/codegen/issue-32364.rs @@ -8,8 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-arm -// ignore-aarch64 +// Test that `extern "stdcall"` is properly translated. + +// only-x86 // compile-flags: -C no-prepopulate-passes |
