public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR libstdc++/78179 run long double tests separately
@ 2018-09-03 14:54 Jonathan Wakely
  2018-09-19 21:13 ` Christophe Lyon
  0 siblings, 1 reply; 14+ messages in thread
From: Jonathan Wakely @ 2018-09-03 14:54 UTC (permalink / raw)
  To: libstdc++, gcc-patches; +Cc: danglin, sandra

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

Split the long double testing into a separate file, so that we can XFAIL
targets where the long double precision doesn't meet the expected
tolerances. The float and double tests are still expefted to PASS for
all targets.

	PR libstdc++/78179
	* testsuite/26_numerics/headers/cmath/hypot-long-double.cc: New test
	that runs the long double part of hypot.cc.
	* testsuite/26_numerics/headers/cmath/hypot.cc: Disable long double
	tests unless TEST_HYPOT_LONG_DOUBLE is defined.

Tested x86_64-linux, committed to trunk.



[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2925 bytes --]

commit f7369a2897f0d8ae014af88142b27569eecd3aa2
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Sep 3 15:48:33 2018 +0100

    PR libstdc++/78179 run long double tests separately
    
    Split the long double testing into a separate file, so that we can XFAIL
    targets where the long double precision doesn't meet the expected
    tolerances. The float and double tests are still expefted to PASS for
    all targets.
    
            PR libstdc++/78179
            * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: New test
            that runs the long double part of hypot.cc.
            * testsuite/26_numerics/headers/cmath/hypot.cc: Disable long double
            tests unless TEST_HYPOT_LONG_DOUBLE is defined.

diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
new file mode 100644
index 00000000000..8a054735ce9
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
@@ -0,0 +1,25 @@
+// Copyright (C) 2016-2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++17" }
+// { dg-do run { target c++17 } }
+// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } }
+
+// Run the long double tests from hypot.cc separately, because they fail on a
+// number of targets. See PR libstdc++/78179 for details.
+#define TEST_HYPOT_LONG_DOUBLE
+#include "hypot.cc"
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
index 69840c8117a..36c7553c5e8 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
@@ -17,7 +17,6 @@
 
 // { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
-// { dg-xfail-run-if "AIX long double" { powerpc-ibm-aix* } }
 
 #include <cmath>
 #include <type_traits>
@@ -126,9 +125,13 @@ const long double toler3 = 1e-16l;
 void
 test01()
 {
+  // See hypot-long-double.cc for this macro
+#ifndef TEST_HYPOT_LONG_DOUBLE
   test(data1, toler1);
   test(data2, toler2);
+#else
   test(data3, toler3);
+#endif
 }
 
 int

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-03 14:54 [PATCH] PR libstdc++/78179 run long double tests separately Jonathan Wakely
@ 2018-09-19 21:13 ` Christophe Lyon
  2018-09-19 21:18   ` Rainer Orth
  0 siblings, 1 reply; 14+ messages in thread
From: Christophe Lyon @ 2018-09-19 21:13 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc Patches, danglin, sandra

On Mon, 3 Sep 2018 at 16:54, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> Split the long double testing into a separate file, so that we can XFAIL
> targets where the long double precision doesn't meet the expected
> tolerances. The float and double tests are still expefted to PASS for
> all targets.
>
>         PR libstdc++/78179
>         * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: New test
>         that runs the long double part of hypot.cc.
>         * testsuite/26_numerics/headers/cmath/hypot.cc: Disable long double
>         tests unless TEST_HYPOT_LONG_DOUBLE is defined.
>
> Tested x86_64-linux, committed to trunk.
>

Hi,

I have noticed failures on hypot-long-double.cc on arm, so I suggest we add:

diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
index 8a05473..4c2e33b 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
@@ -17,7 +17,7 @@

 // { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
-// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } }
+// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
nios2-*-* arm*-*-* } }

 // Run the long double tests from hypot.cc separately, because they fail on a
 // number of targets. See PR libstdc++/78179 for details.

OK?

Christophe

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-19 21:13 ` Christophe Lyon
@ 2018-09-19 21:18   ` Rainer Orth
  2018-09-20 13:40     ` Christophe Lyon
  0 siblings, 1 reply; 14+ messages in thread
From: Rainer Orth @ 2018-09-19 21:18 UTC (permalink / raw)
  To: Christophe Lyon; +Cc: Jonathan Wakely, libstdc++, gcc Patches, danglin, sandra

Hi Christophe,

> I have noticed failures on hypot-long-double.cc on arm, so I suggest we add:
>
> diff --git
> a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> index 8a05473..4c2e33b 100644
> --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> @@ -17,7 +17,7 @@
>
>  // { dg-options "-std=gnu++17" }
>  // { dg-do run { target c++17 } }
> -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } }
> +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
> nios2-*-* arm*-*-* } }
>
>  // Run the long double tests from hypot.cc separately, because they fail on a
>  // number of targets. See PR libstdc++/78179 for details.
>
> OK?

just a nit (and not a review): I'd prefer the target list to be sorted
alphabetically, not completely random.

Thanks.
        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-19 21:18   ` Rainer Orth
@ 2018-09-20 13:40     ` Christophe Lyon
  2018-09-20 14:22       ` Jonathan Wakely
  0 siblings, 1 reply; 14+ messages in thread
From: Christophe Lyon @ 2018-09-20 13:40 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Jonathan Wakely, libstdc++, gcc Patches, danglin, sandra

On Wed, 19 Sep 2018 at 23:13, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>
> Hi Christophe,
>
> > I have noticed failures on hypot-long-double.cc on arm, so I suggest we add:
> >
> > diff --git
> > a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> > b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> > index 8a05473..4c2e33b 100644
> > --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> > +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> > @@ -17,7 +17,7 @@
> >
> >  // { dg-options "-std=gnu++17" }
> >  // { dg-do run { target c++17 } }
> > -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } }
> > +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
> > nios2-*-* arm*-*-* } }
> >
> >  // Run the long double tests from hypot.cc separately, because they fail on a
> >  // number of targets. See PR libstdc++/78179 for details.
> >
> > OK?
>
> just a nit (and not a review): I'd prefer the target list to be sorted
> alphabetically, not completely random.
>

Sure, I can sort the whole list, if OK on principle.

Christophe

> Thanks.
>         Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-20 13:40     ` Christophe Lyon
@ 2018-09-20 14:22       ` Jonathan Wakely
  2018-09-20 17:14         ` Christophe Lyon
  2018-09-21  1:14         ` Hans-Peter Nilsson
  0 siblings, 2 replies; 14+ messages in thread
From: Jonathan Wakely @ 2018-09-20 14:22 UTC (permalink / raw)
  To: Christophe Lyon; +Cc: Rainer Orth, libstdc++, gcc Patches, danglin, sandra

On 20/09/18 15:36 +0200, Christophe Lyon wrote:
>On Wed, 19 Sep 2018 at 23:13, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>>
>> Hi Christophe,
>>
>> > I have noticed failures on hypot-long-double.cc on arm, so I suggest we add:
>> >
>> > diff --git
>> > a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>> > b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>> > index 8a05473..4c2e33b 100644
>> > --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>> > +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>> > @@ -17,7 +17,7 @@
>> >
>> >  // { dg-options "-std=gnu++17" }
>> >  // { dg-do run { target c++17 } }
>> > -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } }
>> > +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
>> > nios2-*-* arm*-*-* } }
>> >
>> >  // Run the long double tests from hypot.cc separately, because they fail on a
>> >  // number of targets. See PR libstdc++/78179 for details.
>> >
>> > OK?
>>
>> just a nit (and not a review): I'd prefer the target list to be sorted
>> alphabetically, not completely random.
>>
>
>Sure, I can sort the whole list, if OK on principle.

Yes, please go ahead and commit it with the sorted list.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-20 14:22       ` Jonathan Wakely
@ 2018-09-20 17:14         ` Christophe Lyon
  2018-09-21  1:14         ` Hans-Peter Nilsson
  1 sibling, 0 replies; 14+ messages in thread
From: Christophe Lyon @ 2018-09-20 17:14 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Rainer Orth, libstdc++, gcc Patches, danglin, sandra

On Thu, 20 Sep 2018 at 16:22, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> On 20/09/18 15:36 +0200, Christophe Lyon wrote:
> >On Wed, 19 Sep 2018 at 23:13, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
> >>
> >> Hi Christophe,
> >>
> >> > I have noticed failures on hypot-long-double.cc on arm, so I suggest we add:
> >> >
> >> > diff --git
> >> > a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> >> > b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> >> > index 8a05473..4c2e33b 100644
> >> > --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> >> > +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> >> > @@ -17,7 +17,7 @@
> >> >
> >> >  // { dg-options "-std=gnu++17" }
> >> >  // { dg-do run { target c++17 } }
> >> > -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } }
> >> > +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
> >> > nios2-*-* arm*-*-* } }
> >> >
> >> >  // Run the long double tests from hypot.cc separately, because they fail on a
> >> >  // number of targets. See PR libstdc++/78179 for details.
> >> >
> >> > OK?
> >>
> >> just a nit (and not a review): I'd prefer the target list to be sorted
> >> alphabetically, not completely random.
> >>
> >
> >Sure, I can sort the whole list, if OK on principle.
>
> Yes, please go ahead and commit it with the sorted list.
>

OK committed as r264443:
Index: testsuite/26_numerics/headers/cmath/hypot-long-double.cc
===================================================================
--- testsuite/26_numerics/headers/cmath/hypot-long-double.cc (revision 264442)
+++ testsuite/26_numerics/headers/cmath/hypot-long-double.cc (revision 264443)
@@ -17,7 +17,7 @@

 // { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
-// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } }
+// { dg-xfail-run-if "PR 78179" { arm*-*-* hppa-*-linux* nios2-*-*
powerpc-ibm-aix* } }

 // Run the long double tests from hypot.cc separately, because they fail on a
 // number of targets. See PR libstdc++/78179 for details.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-20 14:22       ` Jonathan Wakely
  2018-09-20 17:14         ` Christophe Lyon
@ 2018-09-21  1:14         ` Hans-Peter Nilsson
  2018-09-21 10:25           ` Richard Earnshaw (lists)
  2018-09-21 10:34           ` Jonathan Wakely
  1 sibling, 2 replies; 14+ messages in thread
From: Hans-Peter Nilsson @ 2018-09-21  1:14 UTC (permalink / raw)
  To: jwakely; +Cc: christophe.lyon, ro, libstdc++, gcc-patches, danglin, sandra

> Date: Thu, 20 Sep 2018 15:22:23 +0100
> From: Jonathan Wakely <jwakely@redhat.com>

> On 20/09/18 15:36 +0200, Christophe Lyon wrote:
> >On Wed, 19 Sep 2018 at 23:13, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
> >>
> >> Hi Christophe,
> >>
> >> > I have noticed failures on hypot-long-double.cc on arm, so I suggest we add:
> >> >
> >> > diff --git
> >> > a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> >> > b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> >> > index 8a05473..4c2e33b 100644
> >> > --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> >> > +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> >> > @@ -17,7 +17,7 @@
> >> >
> >> >  // { dg-options "-std=gnu++17" }
> >> >  // { dg-do run { target c++17 } }
> >> > -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } }
> >> > +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
> >> > nios2-*-* arm*-*-* } }
> >> >
> >> >  // Run the long double tests from hypot.cc separately, because they fail on a
> >> >  // number of targets. See PR libstdc++/78179 for details.
> >> >
> >> > OK?
> >>
> >> just a nit (and not a review): I'd prefer the target list to be sorted
> >> alphabetically, not completely random.
> >>
> >
> >Sure, I can sort the whole list, if OK on principle.
> 
> Yes, please go ahead and commit it with the sorted list.

"Me too".  Can I please, rather than piling on to a target list,
replace the whole xfail-list with the equivalent of "target { !
large_long_double }" (an already-existing "effective target")?

I'll leave the thought of running the test only for
large_long_double targets (qualifying the dg-do run) instead of
an xfail-clause for maintainers.

brgds, H-P

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-21  1:14         ` Hans-Peter Nilsson
@ 2018-09-21 10:25           ` Richard Earnshaw (lists)
  2018-09-21 10:39             ` Jonathan Wakely
  2018-09-21 10:34           ` Jonathan Wakely
  1 sibling, 1 reply; 14+ messages in thread
From: Richard Earnshaw (lists) @ 2018-09-21 10:25 UTC (permalink / raw)
  To: Hans-Peter Nilsson, jwakely
  Cc: christophe.lyon, ro, libstdc++, gcc-patches, danglin, sandra

On 21/09/18 01:52, Hans-Peter Nilsson wrote:
>> Date: Thu, 20 Sep 2018 15:22:23 +0100
>> From: Jonathan Wakely <jwakely@redhat.com>
> 
>> On 20/09/18 15:36 +0200, Christophe Lyon wrote:
>>> On Wed, 19 Sep 2018 at 23:13, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>>>>
>>>> Hi Christophe,
>>>>
>>>>> I have noticed failures on hypot-long-double.cc on arm, so I suggest we add:
>>>>>
>>>>> diff --git
>>>>> a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>> b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>> index 8a05473..4c2e33b 100644
>>>>> --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>> +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>> @@ -17,7 +17,7 @@
>>>>>
>>>>>  // { dg-options "-std=gnu++17" }
>>>>>  // { dg-do run { target c++17 } }
>>>>> -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } }
>>>>> +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
>>>>> nios2-*-* arm*-*-* } }
>>>>>
>>>>>  // Run the long double tests from hypot.cc separately, because they fail on a
>>>>>  // number of targets. See PR libstdc++/78179 for details.
>>>>>
>>>>> OK?
>>>>
>>>> just a nit (and not a review): I'd prefer the target list to be sorted
>>>> alphabetically, not completely random.
>>>>
>>>
>>> Sure, I can sort the whole list, if OK on principle.
>>
>> Yes, please go ahead and commit it with the sorted list.
> 
> "Me too".  Can I please, rather than piling on to a target list,
> replace the whole xfail-list with the equivalent of "target { !
> large_long_double }" (an already-existing "effective target")?
> 
> I'll leave the thought of running the test only for
> large_long_double targets (qualifying the dg-do run) instead of
> an xfail-clause for maintainers.
> 
> brgds, H-P
> 

Xfailing sounds wrong to me anyway.  An xfailed test ought to run, but
some critical component other than the bug/regression in the test
prevents it happening.  In this case the test can never be made to work
because the target environment simply doesn't support it.  So better to
just skip it.  If we want a separate compile-only test, then that's a
different issue and should be in a separate test.

So +1 for using large_long_double.

R.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-21  1:14         ` Hans-Peter Nilsson
  2018-09-21 10:25           ` Richard Earnshaw (lists)
@ 2018-09-21 10:34           ` Jonathan Wakely
  1 sibling, 0 replies; 14+ messages in thread
From: Jonathan Wakely @ 2018-09-21 10:34 UTC (permalink / raw)
  To: Hans-Peter Nilsson
  Cc: christophe.lyon, ro, libstdc++, gcc-patches, danglin, sandra

On 21/09/18 02:52 +0200, Hans-Peter Nilsson wrote:
>> Date: Thu, 20 Sep 2018 15:22:23 +0100
>> From: Jonathan Wakely <jwakely@redhat.com>
>
>> On 20/09/18 15:36 +0200, Christophe Lyon wrote:
>> >On Wed, 19 Sep 2018 at 23:13, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>> >>
>> >> Hi Christophe,
>> >>
>> >> > I have noticed failures on hypot-long-double.cc on arm, so I suggest we add:
>> >> >
>> >> > diff --git
>> >> > a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>> >> > b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>> >> > index 8a05473..4c2e33b 100644
>> >> > --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>> >> > +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>> >> > @@ -17,7 +17,7 @@
>> >> >
>> >> >  // { dg-options "-std=gnu++17" }
>> >> >  // { dg-do run { target c++17 } }
>> >> > -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } }
>> >> > +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
>> >> > nios2-*-* arm*-*-* } }
>> >> >
>> >> >  // Run the long double tests from hypot.cc separately, because they fail on a
>> >> >  // number of targets. See PR libstdc++/78179 for details.
>> >> >
>> >> > OK?
>> >>
>> >> just a nit (and not a review): I'd prefer the target list to be sorted
>> >> alphabetically, not completely random.
>> >>
>> >
>> >Sure, I can sort the whole list, if OK on principle.
>>
>> Yes, please go ahead and commit it with the sorted list.
>
>"Me too".  Can I please, rather than piling on to a target list,
>replace the whole xfail-list with the equivalent of "target { !
>large_long_double }" (an already-existing "effective target")?

That looks like exactly what we want here, thanks.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-21 10:25           ` Richard Earnshaw (lists)
@ 2018-09-21 10:39             ` Jonathan Wakely
  2018-09-21 10:50               ` Richard Earnshaw (lists)
  0 siblings, 1 reply; 14+ messages in thread
From: Jonathan Wakely @ 2018-09-21 10:39 UTC (permalink / raw)
  To: Richard Earnshaw (lists)
  Cc: Hans-Peter Nilsson, christophe.lyon, ro, libstdc++,
	gcc-patches, danglin, sandra

[-- Attachment #1: Type: text/plain, Size: 2923 bytes --]

On 21/09/18 11:24 +0100, Richard Earnshaw (lists) wrote:
>On 21/09/18 01:52, Hans-Peter Nilsson wrote:
>>> Date: Thu, 20 Sep 2018 15:22:23 +0100
>>> From: Jonathan Wakely <jwakely@redhat.com>
>>
>>> On 20/09/18 15:36 +0200, Christophe Lyon wrote:
>>>> On Wed, 19 Sep 2018 at 23:13, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>>>>>
>>>>> Hi Christophe,
>>>>>
>>>>>> I have noticed failures on hypot-long-double.cc on arm, so I suggest we add:
>>>>>>
>>>>>> diff --git
>>>>>> a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>>> b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>>> index 8a05473..4c2e33b 100644
>>>>>> --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>>> +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>>> @@ -17,7 +17,7 @@
>>>>>>
>>>>>>  // { dg-options "-std=gnu++17" }
>>>>>>  // { dg-do run { target c++17 } }
>>>>>> -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } }
>>>>>> +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
>>>>>> nios2-*-* arm*-*-* } }
>>>>>>
>>>>>>  // Run the long double tests from hypot.cc separately, because they fail on a
>>>>>>  // number of targets. See PR libstdc++/78179 for details.
>>>>>>
>>>>>> OK?
>>>>>
>>>>> just a nit (and not a review): I'd prefer the target list to be sorted
>>>>> alphabetically, not completely random.
>>>>>
>>>>
>>>> Sure, I can sort the whole list, if OK on principle.
>>>
>>> Yes, please go ahead and commit it with the sorted list.
>>
>> "Me too".  Can I please, rather than piling on to a target list,
>> replace the whole xfail-list with the equivalent of "target { !
>> large_long_double }" (an already-existing "effective target")?
>>
>> I'll leave the thought of running the test only for
>> large_long_double targets (qualifying the dg-do run) instead of
>> an xfail-clause for maintainers.
>>
>> brgds, H-P
>>
>
>Xfailing sounds wrong to me anyway.  An xfailed test ought to run, but
>some critical component other than the bug/regression in the test
>prevents it happening.  In this case the test can never be made to work
>because the target environment simply doesn't support it.

That's not true, the test would work fine with different tolerances
for the expected results. If we used the same tolerances as for
double, then the targets where double and long double are the same
would pass.

>So better to
>just skip it.  If we want a separate compile-only test, then that's a
>different issue and should be in a separate test.

I was going to say that the advantage of dg-xfail-run-if is that we
still compile it, we just know it fails to produce the expected
results. There's definitely a benefit to checking it compiles OK even
when sizeof(long double) == sizeof(double).

>So +1 for using large_long_double.

Or we could un-split the test and do this instead:



[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 2085 bytes --]

diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
deleted file mode 100644
index bcc1fec635b..00000000000
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (C) 2016-2018 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// <http://www.gnu.org/licenses/>.
-
-// { dg-options "-std=gnu++17" }
-// { dg-do run { target c++17 } }
-// { dg-xfail-run-if "PR 78179" { arm*-*-* hppa-*-linux* nios2-*-* powerpc-ibm-aix* } }
-
-// Run the long double tests from hypot.cc separately, because they fail on a
-// number of targets. See PR libstdc++/78179 for details.
-#define TEST_HYPOT_LONG_DOUBLE
-#include "hypot.cc"
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
index 36c7553c5e8..886952d39b6 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
@@ -126,12 +126,12 @@ void
 test01()
 {
   // See hypot-long-double.cc for this macro
-#ifndef TEST_HYPOT_LONG_DOUBLE
   test(data1, toler1);
   test(data2, toler2);
-#else
-  test(data3, toler3);
-#endif
+  if (sizeof(long double) > sizeof(long double))
+    test(data3, toler3);
+  else
+    test(data3, (long double)toler2);
 }
 
 int

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-21 10:39             ` Jonathan Wakely
@ 2018-09-21 10:50               ` Richard Earnshaw (lists)
  2018-09-21 11:36                 ` Jonathan Wakely
  0 siblings, 1 reply; 14+ messages in thread
From: Richard Earnshaw (lists) @ 2018-09-21 10:50 UTC (permalink / raw)
  To: Jonathan Wakely
  Cc: Hans-Peter Nilsson, christophe.lyon, ro, libstdc++,
	gcc-patches, danglin, sandra

On 21/09/18 11:34, Jonathan Wakely wrote:
> On 21/09/18 11:24 +0100, Richard Earnshaw (lists) wrote:
>> On 21/09/18 01:52, Hans-Peter Nilsson wrote:
>>>> Date: Thu, 20 Sep 2018 15:22:23 +0100
>>>> From: Jonathan Wakely <jwakely@redhat.com>
>>>
>>>> On 20/09/18 15:36 +0200, Christophe Lyon wrote:
>>>>> On Wed, 19 Sep 2018 at 23:13, Rainer Orth
>>>>> <ro@cebitec.uni-bielefeld.de> wrote:
>>>>>>
>>>>>> Hi Christophe,
>>>>>>
>>>>>>> I have noticed failures on hypot-long-double.cc on arm, so I
>>>>>>> suggest we add:
>>>>>>>
>>>>>>> diff --git
>>>>>>> a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>>>>
>>>>>>> b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>>>>
>>>>>>> index 8a05473..4c2e33b 100644
>>>>>>> ---
>>>>>>> a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>>>>
>>>>>>> +++
>>>>>>> b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>>>>
>>>>>>> @@ -17,7 +17,7 @@
>>>>>>>
>>>>>>>  // { dg-options "-std=gnu++17" }
>>>>>>>  // { dg-do run { target c++17 } }
>>>>>>> -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
>>>>>>> nios2-*-* } }
>>>>>>> +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
>>>>>>> nios2-*-* arm*-*-* } }
>>>>>>>
>>>>>>>  // Run the long double tests from hypot.cc separately, because
>>>>>>> they fail on a
>>>>>>>  // number of targets. See PR libstdc++/78179 for details.
>>>>>>>
>>>>>>> OK?
>>>>>>
>>>>>> just a nit (and not a review): I'd prefer the target list to be
>>>>>> sorted
>>>>>> alphabetically, not completely random.
>>>>>>
>>>>>
>>>>> Sure, I can sort the whole list, if OK on principle.
>>>>
>>>> Yes, please go ahead and commit it with the sorted list.
>>>
>>> "Me too".  Can I please, rather than piling on to a target list,
>>> replace the whole xfail-list with the equivalent of "target { !
>>> large_long_double }" (an already-existing "effective target")?
>>>
>>> I'll leave the thought of running the test only for
>>> large_long_double targets (qualifying the dg-do run) instead of
>>> an xfail-clause for maintainers.
>>>
>>> brgds, H-P
>>>
>>
>> Xfailing sounds wrong to me anyway.  An xfailed test ought to run, but
>> some critical component other than the bug/regression in the test
>> prevents it happening.  In this case the test can never be made to work
>> because the target environment simply doesn't support it.
> 
> That's not true, the test would work fine with different tolerances
> for the expected results. If we used the same tolerances as for
> double, then the targets where double and long double are the same
> would pass.
> 
>> So better to
>> just skip it.  If we want a separate compile-only test, then that's a
>> different issue and should be in a separate test.
> 
> I was going to say that the advantage of dg-xfail-run-if is that we
> still compile it, we just know it fails to produce the expected
> results. There's definitely a benefit to checking it compiles OK even
> when sizeof(long double) == sizeof(double).
> 
>> So +1 for using large_long_double.
> 
> Or we could un-split the test and do this instead:
> 
> 
> 
> patch.txt
> 
> 
> diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> deleted file mode 100644
> index bcc1fec635b..00000000000
> --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -// Copyright (C) 2016-2018 Free Software Foundation, Inc.
> -//
> -// This file is part of the GNU ISO C++ Library.  This library is free
> -// software; you can redistribute it and/or modify it under the
> -// terms of the GNU General Public License as published by the
> -// Free Software Foundation; either version 3, or (at your option)
> -// any later version.
> -
> -// This library is distributed in the hope that it will be useful,
> -// but WITHOUT ANY WARRANTY; without even the implied warranty of
> -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> -// GNU General Public License for more details.
> -
> -// You should have received a copy of the GNU General Public License along
> -// with this library; see the file COPYING3.  If not see
> -// <http://www.gnu.org/licenses/>.
> -
> -// { dg-options "-std=gnu++17" }
> -// { dg-do run { target c++17 } }
> -// { dg-xfail-run-if "PR 78179" { arm*-*-* hppa-*-linux* nios2-*-* powerpc-ibm-aix* } }
> -
> -// Run the long double tests from hypot.cc separately, because they fail on a
> -// number of targets. See PR libstdc++/78179 for details.
> -#define TEST_HYPOT_LONG_DOUBLE
> -#include "hypot.cc"
> diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
> index 36c7553c5e8..886952d39b6 100644
> --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
> +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
> @@ -126,12 +126,12 @@ void
>  test01()
>  {
>    // See hypot-long-double.cc for this macro
> -#ifndef TEST_HYPOT_LONG_DOUBLE
>    test(data1, toler1);
>    test(data2, toler2);
> -#else
> -  test(data3, toler3);
> -#endif
> +  if (sizeof(long double) > sizeof(long double))

I presume you intend the second to be sizeof (double)...
Otherwise the test is always false.

> +    test(data3, toler3);
> +  else
> +    test(data3, (long double)toler2);
>  }
>  
>  int
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-21 10:50               ` Richard Earnshaw (lists)
@ 2018-09-21 11:36                 ` Jonathan Wakely
  2018-09-21 14:01                   ` Hans-Peter Nilsson
  0 siblings, 1 reply; 14+ messages in thread
From: Jonathan Wakely @ 2018-09-21 11:36 UTC (permalink / raw)
  To: Richard Earnshaw (lists)
  Cc: Hans-Peter Nilsson, christophe.lyon, ro, libstdc++,
	gcc-patches, danglin, sandra

[-- Attachment #1: Type: text/plain, Size: 5898 bytes --]

On 21/09/18 11:39 +0100, Richard Earnshaw (lists) wrote:
>On 21/09/18 11:34, Jonathan Wakely wrote:
>> On 21/09/18 11:24 +0100, Richard Earnshaw (lists) wrote:
>>> On 21/09/18 01:52, Hans-Peter Nilsson wrote:
>>>>> Date: Thu, 20 Sep 2018 15:22:23 +0100
>>>>> From: Jonathan Wakely <jwakely@redhat.com>
>>>>
>>>>> On 20/09/18 15:36 +0200, Christophe Lyon wrote:
>>>>>> On Wed, 19 Sep 2018 at 23:13, Rainer Orth
>>>>>> <ro@cebitec.uni-bielefeld.de> wrote:
>>>>>>>
>>>>>>> Hi Christophe,
>>>>>>>
>>>>>>>> I have noticed failures on hypot-long-double.cc on arm, so I
>>>>>>>> suggest we add:
>>>>>>>>
>>>>>>>> diff --git
>>>>>>>> a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>>>>>
>>>>>>>> b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>>>>>
>>>>>>>> index 8a05473..4c2e33b 100644
>>>>>>>> ---
>>>>>>>> a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>>>>>
>>>>>>>> +++
>>>>>>>> b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>>>>>>>>
>>>>>>>> @@ -17,7 +17,7 @@
>>>>>>>>
>>>>>>>>  // { dg-options "-std=gnu++17" }
>>>>>>>>  // { dg-do run { target c++17 } }
>>>>>>>> -// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
>>>>>>>> nios2-*-* } }
>>>>>>>> +// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux*
>>>>>>>> nios2-*-* arm*-*-* } }
>>>>>>>>
>>>>>>>>  // Run the long double tests from hypot.cc separately, because
>>>>>>>> they fail on a
>>>>>>>>  // number of targets. See PR libstdc++/78179 for details.
>>>>>>>>
>>>>>>>> OK?
>>>>>>>
>>>>>>> just a nit (and not a review): I'd prefer the target list to be
>>>>>>> sorted
>>>>>>> alphabetically, not completely random.
>>>>>>>
>>>>>>
>>>>>> Sure, I can sort the whole list, if OK on principle.
>>>>>
>>>>> Yes, please go ahead and commit it with the sorted list.
>>>>
>>>> "Me too".  Can I please, rather than piling on to a target list,
>>>> replace the whole xfail-list with the equivalent of "target { !
>>>> large_long_double }" (an already-existing "effective target")?
>>>>
>>>> I'll leave the thought of running the test only for
>>>> large_long_double targets (qualifying the dg-do run) instead of
>>>> an xfail-clause for maintainers.
>>>>
>>>> brgds, H-P
>>>>
>>>
>>> Xfailing sounds wrong to me anyway.  An xfailed test ought to run, but
>>> some critical component other than the bug/regression in the test
>>> prevents it happening.  In this case the test can never be made to work
>>> because the target environment simply doesn't support it.
>>
>> That's not true, the test would work fine with different tolerances
>> for the expected results. If we used the same tolerances as for
>> double, then the targets where double and long double are the same
>> would pass.
>>
>>> So better to
>>> just skip it.  If we want a separate compile-only test, then that's a
>>> different issue and should be in a separate test.
>>
>> I was going to say that the advantage of dg-xfail-run-if is that we
>> still compile it, we just know it fails to produce the expected
>> results. There's definitely a benefit to checking it compiles OK even
>> when sizeof(long double) == sizeof(double).
>>
>>> So +1 for using large_long_double.
>>
>> Or we could un-split the test and do this instead:
>>
>>
>>
>> patch.txt
>>
>>
>> diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>> deleted file mode 100644
>> index bcc1fec635b..00000000000
>> --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
>> +++ /dev/null
>> @@ -1,25 +0,0 @@
>> -// Copyright (C) 2016-2018 Free Software Foundation, Inc.
>> -//
>> -// This file is part of the GNU ISO C++ Library.  This library is free
>> -// software; you can redistribute it and/or modify it under the
>> -// terms of the GNU General Public License as published by the
>> -// Free Software Foundation; either version 3, or (at your option)
>> -// any later version.
>> -
>> -// This library is distributed in the hope that it will be useful,
>> -// but WITHOUT ANY WARRANTY; without even the implied warranty of
>> -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> -// GNU General Public License for more details.
>> -
>> -// You should have received a copy of the GNU General Public License along
>> -// with this library; see the file COPYING3.  If not see
>> -// <http://www.gnu.org/licenses/>.
>> -
>> -// { dg-options "-std=gnu++17" }
>> -// { dg-do run { target c++17 } }
>> -// { dg-xfail-run-if "PR 78179" { arm*-*-* hppa-*-linux* nios2-*-* powerpc-ibm-aix* } }
>> -
>> -// Run the long double tests from hypot.cc separately, because they fail on a
>> -// number of targets. See PR libstdc++/78179 for details.
>> -#define TEST_HYPOT_LONG_DOUBLE
>> -#include "hypot.cc"
>> diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
>> index 36c7553c5e8..886952d39b6 100644
>> --- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
>> +++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
>> @@ -126,12 +126,12 @@ void
>>  test01()
>>  {
>>    // See hypot-long-double.cc for this macro
>> -#ifndef TEST_HYPOT_LONG_DOUBLE
>>    test(data1, toler1);
>>    test(data2, toler2);
>> -#else
>> -  test(data3, toler3);
>> -#endif
>> +  if (sizeof(long double) > sizeof(long double))
>
>I presume you intend the second to be sizeof (double)...
>Otherwise the test is always false.

Ha, yes :-)

I wrote it as sizeof(double) < sizeof(long double) at first, but
decided to flip it. And didn't finish doing so.

>> +    test(data3, toler3);
>> +  else
>> +    test(data3, (long double)toler2);

Also this should be (long double)toler1 because toler2 is the float
version.

Here's the corrected patch, any objections to this?





[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 2739 bytes --]

commit 2c41ac40a0fdfbe3ef5b8d48de3b62d70ce1b7ef
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Sep 21 12:19:18 2018 +0100

    Un-split hypot<long double> tests
    
    Remove the hypot-long-double.cc file that used dg-xfail-run-if and
    simply use the lower tolerance for double if long double is not larger
    than double.
    
            * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: Remove.
            * testsuite/26_numerics/headers/cmath/hypot.cc: Restore test for
            long double unconditionally, but use lower tolerance when
            sizeof(long double) == sizeof(double).

diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
deleted file mode 100644
index bcc1fec635b..00000000000
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (C) 2016-2018 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// <http://www.gnu.org/licenses/>.
-
-// { dg-options "-std=gnu++17" }
-// { dg-do run { target c++17 } }
-// { dg-xfail-run-if "PR 78179" { arm*-*-* hppa-*-linux* nios2-*-* powerpc-ibm-aix* } }
-
-// Run the long double tests from hypot.cc separately, because they fail on a
-// number of targets. See PR libstdc++/78179 for details.
-#define TEST_HYPOT_LONG_DOUBLE
-#include "hypot.cc"
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
index 36c7553c5e8..9fe8f53b00e 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
@@ -125,13 +125,12 @@ const long double toler3 = 1e-16l;
 void
 test01()
 {
-  // See hypot-long-double.cc for this macro
-#ifndef TEST_HYPOT_LONG_DOUBLE
   test(data1, toler1);
   test(data2, toler2);
-#else
-  test(data3, toler3);
-#endif
+  if (sizeof(long double) > sizeof(double))
+    test(data3, toler3);
+  else
+    test(data3, (long double)toler1);
 }
 
 int

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-21 11:36                 ` Jonathan Wakely
@ 2018-09-21 14:01                   ` Hans-Peter Nilsson
  2018-09-21 16:10                     ` Jonathan Wakely
  0 siblings, 1 reply; 14+ messages in thread
From: Hans-Peter Nilsson @ 2018-09-21 14:01 UTC (permalink / raw)
  To: jwakely; +Cc: libstdc++, gcc-patches

> Date: Fri, 21 Sep 2018 12:21:31 +0100
> From: Jonathan Wakely <jwakely@redhat.com>

> Here's the corrected patch, any objections to this?

Quite the contrary; LGTM.

brgds, H-P

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PR libstdc++/78179 run long double tests separately
  2018-09-21 14:01                   ` Hans-Peter Nilsson
@ 2018-09-21 16:10                     ` Jonathan Wakely
  0 siblings, 0 replies; 14+ messages in thread
From: Jonathan Wakely @ 2018-09-21 16:10 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: libstdc++, gcc-patches

On 21/09/18 15:48 +0200, Hans-Peter Nilsson wrote:
>> Date: Fri, 21 Sep 2018 12:21:31 +0100
>> From: Jonathan Wakely <jwakely@redhat.com>
>
>> Here's the corrected patch, any objections to this?
>
>Quite the contrary; LGTM.

Committed to trunk.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-09-21 15:41 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-03 14:54 [PATCH] PR libstdc++/78179 run long double tests separately Jonathan Wakely
2018-09-19 21:13 ` Christophe Lyon
2018-09-19 21:18   ` Rainer Orth
2018-09-20 13:40     ` Christophe Lyon
2018-09-20 14:22       ` Jonathan Wakely
2018-09-20 17:14         ` Christophe Lyon
2018-09-21  1:14         ` Hans-Peter Nilsson
2018-09-21 10:25           ` Richard Earnshaw (lists)
2018-09-21 10:39             ` Jonathan Wakely
2018-09-21 10:50               ` Richard Earnshaw (lists)
2018-09-21 11:36                 ` Jonathan Wakely
2018-09-21 14:01                   ` Hans-Peter Nilsson
2018-09-21 16:10                     ` Jonathan Wakely
2018-09-21 10:34           ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).