gnu/gcc/34f5c37de80098cee2f29718dbaaae81355c1fac gccrs: fix ICE on break with a label and a value
A `break 'label value` expression looks up a temporary variable
associated with the labeled loop to hold the value, but labeled loops
never registered that temporary, leading to an ICE in the code
generator. Register the loop result temporary against the label.
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Associate the loop
result temporary with the loop label.
gcc/testsuite/ChangeLog:
* rust/compile/break-label-loop.rs: New test.
Signed-off-by: Lucas Ly Ba <lucas.ly-ba@outlook.com>
2 files changed