From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 32B0C38928E1; Wed, 8 Jun 2022 12:41:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32B0C38928E1 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Merge #1188 X-Act-Checkin: gcc X-Git-Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> X-Git-Refname: refs/heads/devel/rust/master X-Git-Oldrev: f8a137bd9391733a3d0d7b58f0f30af441e25a5a X-Git-Newrev: f38bf60c3ac7f039db5ff5c7c0587325097892c8 Message-Id: <20220608124121.32B0C38928E1@sourceware.org> Date: Wed, 8 Jun 2022 12:41:21 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2022 12:41:21 -0000 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 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(-)