[gcc/devel/rust/master] Merge #1437

Thomas Schwinge tschwinge@gcc.gnu.org
Sat Aug 6 12:10:46 GMT 2022


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 <philip.herron@embecosm.com>

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(-)


More information about the Gcc-cvs mailing list