On Wed, 26 Sep 2018 at 17:26, Martin Jambor <mjam...@suse.cz> wrote: > > Hi, > > On Wed, Sep 26 2018, Christophe Lyon wrote: > > On Tue, 25 Sep 2018 at 17:50, Martin Jambor <mjam...@suse.cz> wrote: > >> > >> Hi, > >> > >> On Mon, Sep 24 2018, Christophe Lyon wrote: > >> > On Mon, 24 Sep 2018 at 20:46, Martin Jambor <mjam...@suse.cz> wrote: > >> >> > >> >> Hi, > >> >> > >> >> the test added to check whether _Float128 types are handled correctly by > >> >> the new warning about suspicious calls to abs-like functions fails on > >> >> many platforms. The patch below circumvents the problem by running on > >> >> i686/x86_64 only. I understand that the proper solution would be to > >> >> come up with a deja-gnu predicate and skip-if it was not provided but I > >> >> think that for one simple test that is a bit of an overkill and testing > >> >> it on x86_64 will provide all the test coverage we need. > >> >> > >> >> Tested on x86_64-linux and aarch64-linux, testing on i686-linux > >> >> pending. OK for trunk? > >> >> > >> >> Thanks, > >> >> > >> >> Martin > >> >> > >> >> > >> >> > >> >> 2018-09-24 Martin Jambor <mjam...@suse.cz> > >> >> > >> >> PR testsuite/87339 > >> >> * gcc.dg/warn-abs-1.c: Do not test _Float128. Remove > >> >> dg-skip-if. > >> >> * gcc.target/i386/warn-abs-3.c: New test. > >> >> --- > >> >> gcc/testsuite/gcc.dg/warn-abs-1.c | 4 +--- > >> >> gcc/testsuite/gcc.target/i386/warn-abs-3.c | 12 ++++++++++++ > >> >> 2 files changed, 13 insertions(+), 3 deletions(-) > >> >> create mode 100644 gcc/testsuite/gcc.target/i386/warn-abs-3.c > >> >> > >> >> diff --git a/gcc/testsuite/gcc.dg/warn-abs-1.c > >> >> b/gcc/testsuite/gcc.dg/warn-abs-1.c > >> >> index 129a3af8ac6..b494b14f4a9 100644 > >> >> --- a/gcc/testsuite/gcc.dg/warn-abs-1.c > >> >> +++ b/gcc/testsuite/gcc.dg/warn-abs-1.c > >> >> @@ -1,5 +1,4 @@ > >> >> /* { dg-do compile { target float128 } } */ > >> > > >> > Don't you want to remove the {target float128} part? > >> > >> I did notice it but yes, I do want to remove it. I am therefore going > >> to commit the following after re-testing on x86_64-linux and > >> aarch64-linux. > >> > >> Thank you, > >> > > > > Hi, thanks for this fix. > > Now the test runs on ARM, but fails because of two missing warnings: > > gcc.dg/warn-abs-1.c (test for warnings, line 46) > > gcc.dg/warn-abs-1.c (test for warnings, line 60) > > which correspond to: > > *pld = fabs (*pld); /* { dg-warning "may cause truncation of value" } */ > > *pcld = cabs (*pcld); /* { dg-warning "may cause truncation of value" } */ > > > > I see, I guess the easiest is to skip the test on targets that do not > really have long double, although if someone thinks that is too > restrictive, I can also split the test again and move long double bits > to a separate test. > > Can you please test whether the following helps? > Sorry for the delay, yes it is better in the sense that the tests are now skipped.
I haven't tried Joseph's suggestion yet. > Thanks and sorry for the disruptions, > > Martin > > > > diff --git a/gcc/testsuite/gcc.dg/warn-abs-1.c > b/gcc/testsuite/gcc.dg/warn-abs-1.c > index 1c487270042..88389ec6be8 100644 > --- a/gcc/testsuite/gcc.dg/warn-abs-1.c > +++ b/gcc/testsuite/gcc.dg/warn-abs-1.c > @@ -1,4 +1,5 @@ > /* { dg-do compile } */ > +/* { dg-require-effective-target large_long_double } */ > /* { dg-options "-Wabsolute-value" } */ > > #include <stdlib.h> > > >