diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-06 09:28:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-06 09:28:35 +0000 |
commit | 9fdb4b6aff586a1dece32f03f53aa6ea2837e7e4 (patch) | |
tree | 1abcb53ae12ecb4f81859d4d3b97ae25d0bc8837 | |
parent | 0824b2ed1f4df9b85305cdc287dba7b2c87ac35f (diff) | |
parent | 97dddb606f734e89c4d55b486868d8d97d752698 (diff) | |
download | gcc-9fdb4b6aff586a1dece32f03f53aa6ea2837e7e4.zip gcc-9fdb4b6aff586a1dece32f03f53aa6ea2837e7e4.tar.gz gcc-9fdb4b6aff586a1dece32f03f53aa6ea2837e7e4.tar.bz2 |
Merge #410
410: Fix #407, #409 testcases r=philberty a=tschwinge
@teromene, for your information/learning. ;-D
Co-authored-by: Thomas Schwinge <thomas@codesourcery.com>
-rw-r--r-- | gcc/testsuite/rust.test/xfail_compile/issue-407-2.rs | 13 | ||||
-rw-r--r-- | gcc/testsuite/rust.test/xfail_compile/issue-407.rs | 6 |
2 files changed, 17 insertions, 2 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; + } + } +} diff --git a/gcc/testsuite/rust.test/xfail_compile/issue-407.rs b/gcc/testsuite/rust.test/xfail_compile/issue-407.rs index 49ce91b..f51f7f9b 100644 --- a/gcc/testsuite/rust.test/xfail_compile/issue-407.rs +++ b/gcc/testsuite/rust.test/xfail_compile/issue-407.rs @@ -1,5 +1,7 @@ -// { dg-excess-errors "failed to parse" } +// { dg-excess-errors "Noisy error and debug" } + +// This already worked before the #409 code changes. fn test() { let mut a = 1; - a + = 1; // { dg-error "found unexpected token ‘=’ in null denotation" + a + = 1; // { dg-error "found unexpected token '=' in null denotation" } } |