diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc index bd1f13920bf..234721c585f 100644 --- a/gcc/rust/rust-gcc.cc +++ b/gcc/rust/rust-gcc.cc @@ -1792,6 +1792,8 @@ block (tree fndecl, tree enclosing, const std::vector &vars, *pp = block_tree; } + // Chain the variables of the scope together so they are all connected + // to the block. tree *pp = &BLOCK_VARS (block_tree); for (Bvariable *bv : vars) {