From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 73DBA385841F; Sat, 6 Aug 2022 12:10:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 73DBA385841F 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 #1437 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: 8725e324aad3eac0df074e5f0a494b5e3f332a31 X-Git-Newrev: 7beea479c5a1e7e415223f3fbd4e16c20c3214ec Message-Id: <20220806121046.73DBA385841F@sourceware.org> Date: Sat, 6 Aug 2022 12:10:46 +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: Sat, 06 Aug 2022 12:10:46 -0000 https://gcc.gnu.org/g:7beea479c5a1e7e415223f3fbd4e16c20c3214ec commit 7beea479c5a1e7e415223f3fbd4e16c20c3214ec Merge: 8725e324aad c86ac620c2b Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Fri Aug 5 13:38:37 2022 +0000 Merge #1437 1437: Array index access does not need to unsize to a slice for access r=philberty a=philberty When we define the core code for SliceIndex access its possible for an array to be fully coerced into a slice DST and follow the normal slice index access which removes support for GCC -Warray-index checks and generates unnessecary code for array access. Fixes #1436 Co-authored-by: Philip Herron Diff: gcc/rust/typecheck/rust-hir-type-check-expr.cc | 63 +++++---- gcc/testsuite/rust/compile/usize1.rs | 2 +- gcc/testsuite/rust/execute/torture/issue-1436.rs | 172 +++++++++++++++++++++++ 3 files changed, 209 insertions(+), 28 deletions(-)