From: Pierre-Emmanuel Patry Date: Tue, 10 Oct 2023 11:20:33 +0000 (+0200) Subject: gccrs: Add a new regression test X-Git-Tag: basepoints/gcc-15~2090 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c53cef37b801647d869627ed0f3b2a794840e73e;p=thirdparty%2Fgcc.git gccrs: Add a new regression test 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 --- diff --git a/gcc/testsuite/rust/compile/range_from_expr_for_loop.rs b/gcc/testsuite/rust/compile/range_from_expr_for_loop.rs new file mode 100644 index 000000000000..69b4b0c12c21 --- /dev/null +++ b/gcc/testsuite/rust/compile/range_from_expr_for_loop.rs @@ -0,0 +1,7 @@ +// { dg-additional-options "-frust-compile-until=ast" } +fn main() { + for _ in 1.. { + break; + } + let i = 2; +}