public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1188
@ 2022-06-08 12:41 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:41 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:f38bf60c3ac7f039db5ff5c7c0587325097892c8
commit f38bf60c3ac7f039db5ff5c7c0587325097892c8
Merge: f8a137bd939 fd51331270e
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date: Fri Apr 29 15:14:48 2022 +0000
Merge #1188
1188: Support align and packed repr layout on structs r=dafaust a=dafaust
This is a start at handling the various layout options supported by Rust, beginning with `#[repr(align(N))]` and `#[repr(packed(N))]`, on structs and tuple structs.
There are several other layout options which remain to be supported such as `#[repr(C)]`, `#[repr(transparent)]`, combinations e.g. `#[repr(C, packed(2))]`, as well as layouts on union and enum types.
Fixes: #915
Co-authored-by: David Faust <david.faust@oracle.com>
Diff:
gcc/rust/backend/rust-compile-type.cc | 20 +++++++
gcc/rust/typecheck/rust-hir-type-check-base.cc | 67 +++++++++++++++++++++++
gcc/rust/typecheck/rust-hir-type-check-base.h | 3 +
gcc/rust/typecheck/rust-hir-type-check-stmt.h | 16 +++++-
gcc/rust/typecheck/rust-hir-type-check-toplevel.h | 16 +++++-
gcc/rust/typecheck/rust-tyty.cc | 3 +-
gcc/rust/typecheck/rust-tyty.h | 28 ++++++++++
gcc/rust/util/rust-attributes.cc | 1 +
gcc/testsuite/rust/compile/struct_align1.rs | 19 +++++++
gcc/testsuite/rust/compile/struct_align2.rs | 18 ++++++
gcc/testsuite/rust/compile/struct_pack1.rs | 19 +++++++
gcc/testsuite/rust/compile/struct_pack2.rs | 18 ++++++
12 files changed, 223 insertions(+), 5 deletions(-)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-08 12:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:41 [gcc/devel/rust/master] Merge #1188 Thomas Schwinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).