diff options
| author | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2023-06-11 17:05:26 -0400 |
|---|---|---|
| committer | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2023-07-10 19:19:40 -0400 |
| commit | 7e933b4e26947b04da70589110dacbdb2461e27d (patch) | |
| tree | 63b501c66626cdf9b1853eaa27e4c5159083fa46 /tests/codegen | |
| parent | 2591c30eaf30425812f42beb47bd2615a533e961 (diff) | |
| download | rust-7e933b4e26947b04da70589110dacbdb2461e27d.tar.gz rust-7e933b4e26947b04da70589110dacbdb2461e27d.zip | |
repr(align) <= 4 should still be byval
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/align-byval.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/codegen/align-byval.rs b/tests/codegen/align-byval.rs index 2c64230bfd0..fc5f795bf67 100644 --- a/tests/codegen/align-byval.rs +++ b/tests/codegen/align-byval.rs @@ -71,17 +71,16 @@ pub struct ForceAlign8 { c: i64 } -// On i686-windows, this is passed by reference because alignment is requested, -// even though the requested alignment is less than the natural alignment. +// On i686-windows, this is passed on stack, because requested alignment is <=4. #[repr(C)] -#[repr(align(1))] +#[repr(align(4))] pub struct LowerFA8 { a: i64, b: i64, c: i64 } -// On i686-windows, this is passed on stack again, because the wrapper struct does not have +// On i686-windows, this is passed on stack, because the wrapper struct does not have // requested/forced alignment. #[repr(C)] pub struct WrappedFA8 { @@ -287,9 +286,7 @@ extern "C" { // i686-linux: declare void @lower_fa8({{.*}}byval(%LowerFA8) align 4{{.*}}) - // i686-windows: declare void @lower_fa8( - // i686-windows-NOT: byval - // i686-windows-SAME: align 8{{.*}}) + // i686-windows: declare void @lower_fa8({{.*}}byval(%LowerFA8) align 4{{.*}}) fn lower_fa8(x: LowerFA8); // m68k: declare void @wrapped_fa8({{.*}}byval(%WrappedFA8) align 8{{.*}}) |
