public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1220 #1221
@ 2022-06-08 12:44 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:44 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:3b8f3e61394f27100fb788a839e61f8b753f502b
commit 3b8f3e61394f27100fb788a839e61f8b753f502b
Merge: 74e836599ce 224647d24a3 0d8c2984436
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date: Mon May 9 10:11:28 2022 +0000
Merge #1220 #1221
1220: Ensure the coercion sites are applied correctly on unions r=philberty a=philberty
When we construct a union, we were wrongly compiling the constructor
without taking into account the associated union index. This meant we
if you were constructing a union using any other field than the first one
you had a bad coercion type check resulting in a silent failure of generating
an error_mark_node.
This was caught using an assertion to ensure there is no error on coercion site but it is valid
to have errors from coercion sites.
1221: Ensure we don't return error_mark_node for loop expressions r=philberty a=philberty
Loop expressions can return a value even if its a unit-type so we must
ensure we don't return an error_mark_node for the eventual coercion site
for the unit-type case.
The offending test-case was: rust/compile/torture/loop7.rs
This was found while fixing #1220
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diff:
gcc/rust/backend/rust-compile-expr.h | 80 ++++++++++++++++++++++++------------
1 file changed, 53 insertions(+), 27 deletions(-)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-08 12:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:44 [gcc/devel/rust/master] Merge #1220 #1221 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).