From 0abe96a7d41b0cf667a8ec93a4b44b1a3de4c1a2 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Mon, 16 Oct 2023 14:21:42 +0200 Subject: [PATCH] Add new regression test Add a new test to highlight fix of #2658. gcc/testsuite/ChangeLog: * rust/compile/while_break_expr.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/while_break_expr.rs | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 gcc/testsuite/rust/compile/while_break_expr.rs diff --git a/gcc/testsuite/rust/compile/while_break_expr.rs b/gcc/testsuite/rust/compile/while_break_expr.rs new file mode 100644 index 000000000000..099683e45de6 --- /dev/null +++ b/gcc/testsuite/rust/compile/while_break_expr.rs @@ -0,0 +1,3 @@ +fn main() { + let _ = 'l: while break 'l {}; +}