public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1465 #1467
@ 2022-08-13 8:42 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-08-13 8:42 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:021e4953390da748515debfc8973149457d3118a
commit 021e4953390da748515debfc8973149457d3118a
Merge: fadc7047514 8899dc9bf70 d4ddd73b0b8
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date: Fri Aug 12 12:11:26 2022 +0000
Merge #1465 #1467
1465: intrinsics: Add wrapping_{add, sub, mul} r=CohenArthur a=CohenArthur
Since wrapping arithmetics are guaranteed in Rust, we turn on the -fwrapv and simply desugar wrapping_{add, sub, mul} to their non-checked inner operations. This is the only difference between a wrapping add and a regular addition: The regular addition will gain some checks for overflows, which are simply not used for the wrapping version.
Fixes #1449
`@bjorn3` if you want to have a look :)
1467: Desugar HIR::IdentifierExpr into HIR::PathInExpression r=philberty a=philberty
This completly removes the HIR::IdentifierExpr and unifies how we handle
generics in general. There was a hack from last year that did not infer
generic arguments on IdentifierExpr's which leads to a type inferencing
behvaiour mismatch which was becoming difficult to debug. This simplifies
everything.
The changes to the test case reflect making our code more compliant to
real rustc apart from compile/traits3.rs which will be fixed as part of the
refactoring effort going on in the type system.
Fixes #1456
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diff:
gcc/rust/backend/rust-compile-block.h | 3 -
gcc/rust/backend/rust-compile-expr.cc | 120 ---------------------
gcc/rust/backend/rust-compile-expr.h | 2 -
gcc/rust/backend/rust-compile-intrinsic.cc | 69 +++++++++++-
gcc/rust/backend/rust-compile-resolve-path.cc | 15 +++
gcc/rust/backend/rust-compile-struct-field-expr.h | 1 -
gcc/rust/backend/rust-compile.cc | 15 ++-
.../checks/errors/privacy/rust-privacy-reporter.cc | 4 -
.../checks/errors/privacy/rust-privacy-reporter.h | 1 -
gcc/rust/checks/errors/rust-const-checker.cc | 4 -
gcc/rust/checks/errors/rust-const-checker.h | 1 -
gcc/rust/checks/errors/rust-unsafe-checker.cc | 15 ---
gcc/rust/checks/errors/rust-unsafe-checker.h | 1 -
gcc/rust/checks/lints/rust-lint-marklive.cc | 14 ---
gcc/rust/checks/lints/rust-lint-marklive.h | 1 -
gcc/rust/hir/rust-ast-lower-expr.h | 15 ++-
gcc/rust/hir/rust-hir-dump.cc | 3 -
gcc/rust/hir/rust-hir-dump.h | 1 -
gcc/rust/hir/tree/rust-hir-full-decls.h | 1 -
gcc/rust/hir/tree/rust-hir-full-test.cc | 12 ---
gcc/rust/hir/tree/rust-hir-visitor.h | 3 -
gcc/rust/hir/tree/rust-hir.h | 58 ----------
gcc/rust/rust-lang.cc | 8 +-
gcc/rust/typecheck/rust-hir-type-check-expr.cc | 56 ----------
gcc/rust/typecheck/rust-hir-type-check-expr.h | 1 -
gcc/rust/typecheck/rust-hir-type-check-struct.cc | 14 ++-
gcc/rust/typecheck/rust-tycheck-dump.h | 5 -
gcc/testsuite/rust/compile/torture/issue-1075.rs | 3 +-
gcc/testsuite/rust/compile/traits3.rs | 4 +-
gcc/testsuite/rust/execute/torture/issue-1120.rs | 3 +-
gcc/testsuite/rust/execute/torture/issue-1133.rs | 3 +-
gcc/testsuite/rust/execute/torture/issue-1232.rs | 3 +-
gcc/testsuite/rust/execute/torture/issue-1436.rs | 3 +-
gcc/testsuite/rust/execute/torture/slice-magic.rs | 3 +-
gcc/testsuite/rust/execute/torture/slice-magic2.rs | 3 +-
gcc/testsuite/rust/execute/torture/wrapping_op1.rs | 14 +++
gcc/testsuite/rust/execute/torture/wrapping_op2.rs | 20 ++++
37 files changed, 164 insertions(+), 338 deletions(-)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-13 8:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-13 8:42 [gcc/devel/rust/master] Merge #1465 #1467 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).