public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #866
@ 2022-06-08 11:59 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 11:59 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:bc27d113167ec6c6cc96b01c8559fc9b9219417c
commit bc27d113167ec6c6cc96b01c8559fc9b9219417c
Merge: e082b6cfd03 6d0892636e9
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date: Fri Jan 7 11:29:06 2022 +0000
Merge #866
866: Add support for wildcard patterns within MatchExprs r=philberty a=philberty
GCC CASE_LABEL_EXPR's contain operand 0 and 1, operand 0 is used for the
low value of a case label and operand 1 for a high value. So with this
CASE_LABEL_EXPR is is possible to support a range of values from low->high
if set apropriately, but for the wildcard case this is effectively a
default case which means we set both operand 0 and 1 to NULL_TREE.
Fixes #853
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diff:
gcc/rust/backend/rust-compile-expr.cc | 7 ----
gcc/rust/backend/rust-compile-pattern.cc | 9 ++++
gcc/rust/backend/rust-compile-pattern.h | 2 +
gcc/rust/hir/rust-ast-lower-pattern.cc | 28 +++++++++++++
gcc/rust/hir/rust-ast-lower-pattern.h | 18 ++------
gcc/rust/typecheck/rust-hir-type-check-expr.h | 2 +-
gcc/rust/typecheck/rust-hir-type-check-pattern.cc | 9 ++++
gcc/rust/typecheck/rust-hir-type-check-pattern.h | 15 ++++---
gcc/testsuite/rust/execute/torture/match3.rs | 51 +++++++++++++++++++++++
9 files changed, 113 insertions(+), 28 deletions(-)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-08 11:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 11:59 [gcc/devel/rust/master] Merge #866 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).