aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2021-05-05 22:33:32 +0200
committerThomas Schwinge <thomas@codesourcery.com>2021-05-05 22:36:29 +0200
commit97dddb606f734e89c4d55b486868d8d97d752698 (patch)
tree2d5e9089a1b2a1ce86d060ee00c2dbf85f37bdec /gcc
parent613eeee78a1ffd29332e3b0f500bfd476f8bfa9c (diff)
downloadgcc-97dddb606f734e89c4d55b486868d8d97d752698.zip
gcc-97dddb606f734e89c4d55b486868d8d97d752698.tar.gz
gcc-97dddb606f734e89c4d55b486868d8d97d752698.tar.bz2
Add 'rust.test/xfail_compile/issue-407-2.rs' [#407, #409]
This adds the testcase originally presented in #407, which is fixed by the #409 code changes.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/rust.test/xfail_compile/issue-407-2.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/rust.test/xfail_compile/issue-407-2.rs b/gcc/testsuite/rust.test/xfail_compile/issue-407-2.rs
new file mode 100644
index 0000000..e45fbde
--- /dev/null
+++ b/gcc/testsuite/rust.test/xfail_compile/issue-407-2.rs
@@ -0,0 +1,13 @@
+// { dg-excess-errors "Noisy error and debug" }
+
+// #407
+pub fn loopy() {
+ let mut a = 1;
+ loop {
+ if a < 40 {
+ a + = 1; // { dg-error "found unexpected token '=' in null denotation" }
+ } else {
+ break;
+ }
+ }
+}