[Bug libstdc++/32666] FAIL: abi_check

bkoz at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Jan 13 08:41:00 GMT 2009



------- Comment #7 from bkoz at gcc dot gnu dot org  2009-01-13 08:41 -------
From:
http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00197.html

Looking at the __signbitl issue first. HPPA is the only platform that wants to
export this. Let's try to figure out why.

I see this in include/c_global/cmath

  template<typename _Tp>
    inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
                                           int>::__type
    signbit(_Tp __f)
    {
      typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
      return __builtin_signbit(__type(__f));
    }

This is from 

130443      paolo     signbit(_Tp __f)

or

Author: paolo
Date: Mon Nov 26 18:24:54 2007
New Revision: 130443

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130443
Log:
2007-11-26  Paolo Carlini  <pcarlini@suse.de>

        PR libstdc++/25913
        * include/c_std/cmath (std::fpclassify, isfinite, isinf, isnan,
        isnormal, signbit, isgreater, isgreaterequal, isless, islessequal,
        islessgreater, isunordered): Guard with __enable_if and forward
        with __promote.
        * include/c_global/cmath: Likewise.
        * testsuite/26_numerics/headers/cmath/25913.cc: New.

        * include/c_std/cmath (__gnu_cxx::__capture_isfinite,
        __capture_isinf, __capture_isnan, __capture_isnormal,
        __capture_signbit, __capture_isgreater, __capture_isgreaterequal,
        __capture_isless, __capture_islessequal, __capture_islessgreater,
        __capture_isunordered): Remove.
        (std::isfinite, isinf, isnan, isnormal, signbit, isgreater,
        isgreaterequal, isless, islessequal, islessgreater, isunordered):
        Forward to the corresponding builtin.
        * include/c_global/cmath: Likewise.

        * include/c_global/cmath (std::atan2, pow): Guard with __enable_if.


OK. 

Well, that removed the last uses for libmath. (signbit, copysign. These were
once needed for the complex implementation but seem to not be necessary or use
builtins now, so can be removed.)

The following patch does so.

Dave, can you try it on hppa-linux? I've adjusted the baseline_symbols.txt file
such that it should pass now. If it does not, do 'make check-abi' and attach
the libstdc++.log file please. 

I'm not quite sure that the src/compatibility.cc bits are correct. They should
be correct for hppa, but I see that:

alpha-linux-gnu/baseline_symbols.txt:FUNC:atanl@@GLIBCXX_3.4.3
alpha-linux-gnu/baseline_symbols.txt:FUNC:tanl@@GLIBCXX_3.4
hppa-linux-gnu/baseline_symbols.txt:FUNC:atanl@@GLIBCXX_3.4.3
hppa-linux-gnu/baseline_symbols.txt:FUNC:tanl@@GLIBCXX_3.4
hppa-linux-gnu/baseline_symbols.txt.orig:FUNC:atanl@@GLIBCXX_3.4.3
hppa-linux-gnu/baseline_symbols.txt.orig:FUNC:tanl@@GLIBCXX_3.4
mips-linux-gnu/baseline_symbols.txt:FUNC:atanl@@GLIBCXX_3.4.3
mips-linux-gnu/baseline_symbols.txt:FUNC:tanl@@GLIBCXX_3.4
powerpc64-linux-gnu/baseline_symbols.txt:FUNC:atanl@GLIBCXX_3.4.3
powerpc64-linux-gnu/baseline_symbols.txt:FUNC:tanl@GLIBCXX_3.4
powerpc-linux-gnu/baseline_symbols.txt:FUNC:atanl@GLIBCXX_3.4.3
powerpc-linux-gnu/baseline_symbols.txt:FUNC:tanl@GLIBCXX_3.4
s390-linux-gnu/baseline_symbols.txt:FUNC:atanl@GLIBCXX_3.4.3
s390-linux-gnu/baseline_symbols.txt:FUNC:tanl@GLIBCXX_3.4
s390x-linux-gnu/baseline_symbols.txt:FUNC:atanl@@GLIBCXX_3.4.3
s390x-linux-gnu/baseline_symbols.txt:FUNC:tanl@@GLIBCXX_3.4
sparc-linux-gnu/baseline_symbols.txt:FUNC:atanl@GLIBCXX_3.4.3
sparc-linux-gnu/baseline_symbols.txt:FUNC:tanl@GLIBCXX_3.4

all these other ones need it too, and am not sure if the
_GLIBCXX_LONG_DOUBLE_COMPAT macro is true on these other platforms.


As an aside, I think that a lot of the GLIBCXX_CHECK_MATH finding of math
functions at configure time can be seriously reduced now that most of these are
builtins. This should be audited and fixed. We should not really have to define
most of these now.

-benjamin


-- 

bkoz at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bkoz at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-13 08:41:37
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32666



More information about the Gcc-bugs mailing list