public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/112593] New: FAIL: 26_numerics/headers/cmath/equivalent_functions.cc on Solaris 11.3
@ 2023-11-17 17:17 redi at gcc dot gnu.org
  2023-11-23 14:02 ` [Bug libstdc++/112593] FAIL: 26_numerics/headers/cmath/equivalent_functions.cc on Solaris ro at gcc dot gnu.org
  2023-11-23 14:44 ` redi at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2023-11-17 17:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112593

            Bug ID: 112593
           Summary: FAIL:
                    26_numerics/headers/cmath/equivalent_functions.cc on
                    Solaris 11.3
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: testsuite-fail
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---
            Target: sparc-sun-solaris2.11

/export/home/jwakely/src/gcc/libstdc++-v3/testsuite/26_numerics/headers/cmath/equivalent_functions.cc:197:
void test_long_double_overload(): Assertion 'std::cosh(x) == std::coshl(x)'
failed.


std::cosh is provided by
/export/home/jwakely/build/gcc/include-fixed/iso/math_iso.h which has:

namespace std {
...
extern long double __coshl(long double);
...
inline long double cosh(long double __X) { return __coshl(__X); }


std::coshl is provided by libstdc++'s <cmath> (since r14-5341-g0b880466e910b4)
which does:

using std::coshl;

That finds ::coshl from /export/home/jwakely/build/gcc/include-fixed/math.h:

extern long double coshl (long double);


That means that Solaris provides both ::coshl and also std::__coshl, and they
return different values for cosh(1.0):

std::cosh(x)    = 1.5430806348152437784779056207570615
std::__coshl(x) = 1.5430806348152437784779056207570615
std::coshl(x)   = 1.5430806348152437784779056207570617

The first two match, as expected because std::cosh just calls std::__coshl.

I don't know why Solaris provides two different implementations of coshl.

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

* [Bug libstdc++/112593] FAIL: 26_numerics/headers/cmath/equivalent_functions.cc on Solaris
  2023-11-17 17:17 [Bug libstdc++/112593] New: FAIL: 26_numerics/headers/cmath/equivalent_functions.cc on Solaris 11.3 redi at gcc dot gnu.org
@ 2023-11-23 14:02 ` ro at gcc dot gnu.org
  2023-11-23 14:44 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: ro at gcc dot gnu.org @ 2023-11-23 14:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112593

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|FAIL:                       |FAIL:
                   |26_numerics/headers/cmath/e |26_numerics/headers/cmath/e
                   |quivalent_functions.cc on   |quivalent_functions.cc on
                   |Solaris 11.3                |Solaris
             Target|sparc-sun-solaris2.11       |sparc-sun-solaris2.11,
                   |                            |i386-pc-solaris2.11
                 CC|                            |ro at gcc dot gnu.org

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
The test also FAILs on Solaris 11.4, both sparc and x86, 32 and 64-bit. 
However,
the failure mode is different:

/vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/26_numerics/headers/cmath/equivalent_functions.cc:120:
void test_float_overload(): Assertion 'std::asin(x) == std::asinf(x)' failed.

I wouldn't worry too much about the 11.3 failure (if it's 11.3-only): 11.3
support is deprecated and was supported to be removed from trunk before the
GCC 14 release.  However, I've held off from the actual removal until new
sparc and x86 Solaris 11.4 cfarm systems are in place.

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

* [Bug libstdc++/112593] FAIL: 26_numerics/headers/cmath/equivalent_functions.cc on Solaris
  2023-11-17 17:17 [Bug libstdc++/112593] New: FAIL: 26_numerics/headers/cmath/equivalent_functions.cc on Solaris 11.3 redi at gcc dot gnu.org
  2023-11-23 14:02 ` [Bug libstdc++/112593] FAIL: 26_numerics/headers/cmath/equivalent_functions.cc on Solaris ro at gcc dot gnu.org
@ 2023-11-23 14:44 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2023-11-23 14:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112593

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-11-23
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Rainer Orth from comment #1)
> The test also FAILs on Solaris 11.4, both sparc and x86, 32 and 64-bit. 
> However,
> the failure mode is different:
> 
> /vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/26_numerics/headers/
> cmath/equivalent_functions.cc:120: void test_float_overload(): Assertion
> 'std::asin(x) == std::asinf(x)' failed.

That looks like a similar problem though. std::asin(float) probably calls
std::__asinf, which apparently gives a different result to ::asinf.

If you comment out the call to test_float_overload() in main, it might fail at
the same place in test_long_double_overload (or maybe somewhere else!)

> I wouldn't worry too much about the 11.3 failure (if it's 11.3-only): 11.3
> support is deprecated and was supported to be removed from trunk before the
> GCC 14 release.  However, I've held off from the actual removal until new
> sparc and x86 Solaris 11.4 cfarm systems are in place.

Yeah, the cfarm is the only way I can test on Solaris, so that's why I use 11.3
with -enable-obsolete.

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

end of thread, other threads:[~2023-11-23 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-17 17:17 [Bug libstdc++/112593] New: FAIL: 26_numerics/headers/cmath/equivalent_functions.cc on Solaris 11.3 redi at gcc dot gnu.org
2023-11-23 14:02 ` [Bug libstdc++/112593] FAIL: 26_numerics/headers/cmath/equivalent_functions.cc on Solaris ro at gcc dot gnu.org
2023-11-23 14:44 ` redi at gcc dot gnu.org

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).