Skip to content

Commit

Permalink
Add a new regression test
Browse files Browse the repository at this point in the history
Add a new test to highlight the fix made for #2660.

gcc/testsuite/ChangeLog:

	* rust/compile/range_from_expr_for_loop.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
  • Loading branch information
P-E-P committed Oct 17, 2023
1 parent 66aa179 commit 442008f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gcc/testsuite/rust/compile/range_from_expr_for_loop.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// { dg-additional-options "-frust-compile-until=ast" }
fn main() {
for _ in 1.. {
break;
}
let i = 2;
}

0 comments on commit 442008f

Please sign in to comment.