]> gcc.gnu.org Git - gcc.git/commit
Merge #1220 #1221
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Mon, 9 May 2022 10:11:28 +0000 (10:11 +0000)
committerGitHub <noreply@github.com>
Mon, 9 May 2022 10:11:28 +0000 (10:11 +0000)
commit3b8f3e61394f27100fb788a839e61f8b753f502b
tree4186f8b73ca7635db5c0e7ca6484dca79365e00a
parent74e836599ce80a11b1fe28065ed7aae6ffa3b7e2
parent224647d24a3fe0411a46ac97d76e06fe2156a9fc
parent0d8c298443615c1fd75c9af10ca26c7c36b69273
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>
gcc/rust/backend/rust-compile-expr.h
This page took 0.062792 seconds and 6 git commands to generate.