diff options
author | Marc Poulhiès <dkm@kataplop.net> | 2021-04-20 19:31:24 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@kataplop.net> | 2021-04-21 19:54:43 +0200 |
commit | de5d648043cb545cdc61b4a594feb5f879f89b6b (patch) | |
tree | c01dd30cd1c32171f0a8bc6c20d970aabb4d0804 | |
parent | 498758a1c238a539b364ac2c632742a9b64ab4a5 (diff) | |
download | gcc-de5d648043cb545cdc61b4a594feb5f879f89b6b.zip gcc-de5d648043cb545cdc61b4a594feb5f879f89b6b.tar.gz gcc-de5d648043cb545cdc61b4a594feb5f879f89b6b.tar.bz2 |
Fix dg-ice handling in rust testsuite
Fix the pruning regex to also match ICE message and allow for dg-ice use.
Add the test from #382 as a sample example.
Should help #308
-rw-r--r-- | gcc/testsuite/lib/rust.exp | 2 | ||||
-rw-r--r-- | gcc/testsuite/rust.test/xfail_compile/unsafe.rs | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/testsuite/lib/rust.exp b/gcc/testsuite/lib/rust.exp index 7d2896b..528380b3 100644 --- a/gcc/testsuite/lib/rust.exp +++ b/gcc/testsuite/lib/rust.exp @@ -181,7 +181,7 @@ proc rust_target_compile { source dest type options } { ## FIXME: until the compiler is made less verbose, we need to prune its output almost completely. # Only keep lines containing certain diagnostics so that we can check these. global additional_prunes - lappend additional_prunes "^((?!(error: |warning: )).)*$" + lappend additional_prunes "^((?!(error: |warning: |\[Ii\]nternal compiler error: )).)*$" return [target_compile $source $dest $type $options] } diff --git a/gcc/testsuite/rust.test/xfail_compile/unsafe.rs b/gcc/testsuite/rust.test/xfail_compile/unsafe.rs new file mode 100644 index 0000000..632be94 --- /dev/null +++ b/gcc/testsuite/rust.test/xfail_compile/unsafe.rs @@ -0,0 +1,4 @@ +fn main() { // { dg-ice "#382" } + unsafe { + } +} |