aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.h
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-05-09 10:11:28 +0000
committerGitHub <noreply@github.com>2022-05-09 10:11:28 +0000
commit3b8f3e61394f27100fb788a839e61f8b753f502b (patch)
tree4186f8b73ca7635db5c0e7ca6484dca79365e00a /gcc/rust/backend/rust-compile-expr.h
parent74e836599ce80a11b1fe28065ed7aae6ffa3b7e2 (diff)
parent224647d24a3fe0411a46ac97d76e06fe2156a9fc (diff)
parent0d8c298443615c1fd75c9af10ca26c7c36b69273 (diff)
downloadgcc-3b8f3e61394f27100fb788a839e61f8b753f502b.zip
gcc-3b8f3e61394f27100fb788a839e61f8b753f502b.tar.gz
gcc-3b8f3e61394f27100fb788a839e61f8b753f502b.tar.bz2
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>