From f0b1cf01782ba975cfda32800c91076df78058d6 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 15 Feb 2024 13:55:49 +0100 Subject: gccrs: Avoid *.bak suffixed tests - use dg-skip-if instead On Fri, Feb 09, 2024 at 11:03:38AM +0100, Jakub Jelinek wrote: > On Wed, Feb 07, 2024 at 12:43:59PM +0100, arthur.cohen@embecosm.com wrote: > > This patch introduces one regression because generics are getting better > > understood over time. The code here used to apply generics with the same > > symbol from previous segments which was a bit of a hack with out limited > > inference variable support. The regression looks like it will be related > > to another issue which needs to default integer inference variables much > > more aggresivly to default integer. > > > > Fixes #2723 > > * rust/compile/issue-1773.rs: Moved to... > > * rust/compile/issue-1773.rs.bak: ...here. > > Please don't use such suffixes in the testsuite. > Either delete the testcase, or xfail it somehow until the bug is fixed. To be precise, I have scripts to look for backup files in the tree (*~, *.bak, *.orig, *.rej etc.) and this stands in the way several times a day. Here is a fix for that in patch form, tested on x86_64-linux with make check-rust RUNTESTFLAGS='compile.exp=issue-1773.rs' 2024-02-15 Jakub Jelinek * rust/compile/issue-1773.rs.bak: Rename to ... * rust/compile/issue-1773.rs: ... this. Add dg-skip-if directive. --- gcc/testsuite/rust/compile/issue-1773.rs | 24 ++++++++++++++++++++++++ gcc/testsuite/rust/compile/issue-1773.rs.bak | 23 ----------------------- 2 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 gcc/testsuite/rust/compile/issue-1773.rs delete mode 100644 gcc/testsuite/rust/compile/issue-1773.rs.bak (limited to 'gcc') diff --git a/gcc/testsuite/rust/compile/issue-1773.rs b/gcc/testsuite/rust/compile/issue-1773.rs new file mode 100644 index 0000000..468497a --- /dev/null +++ b/gcc/testsuite/rust/compile/issue-1773.rs @@ -0,0 +1,24 @@ +#[lang = "sized"] +// { dg-skip-if "" { *-*-* } } +pub trait Sized {} + +trait Foo { + type A; + + fn test(a: Self::A) -> Self::A { + a + } +} + +struct Bar(T); +impl Foo for Bar { + type A = T; +} + +fn main() { + let a; + a = Bar(123); + + let b; + b = Bar::test(a.0); +} diff --git a/gcc/testsuite/rust/compile/issue-1773.rs.bak b/gcc/testsuite/rust/compile/issue-1773.rs.bak deleted file mode 100644 index a4542aea0..0000000 --- a/gcc/testsuite/rust/compile/issue-1773.rs.bak +++ /dev/null @@ -1,23 +0,0 @@ -#[lang = "sized"] -pub trait Sized {} - -trait Foo { - type A; - - fn test(a: Self::A) -> Self::A { - a - } -} - -struct Bar(T); -impl Foo for Bar { - type A = T; -} - -fn main() { - let a; - a = Bar(123); - - let b; - b = Bar::test(a.0); -} -- cgit v1.1