This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: complex vs. __builtin_cpow
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: 02 Jun 2004 22:58:36 +0200
- Subject: Re: complex vs. __builtin_cpow
- Organization: Integrable Solutions
- References: <20040602150725.3a719020.bkoz@redhat.com>
Benjamin Kosnik <bkoz@redhat.com> writes:
| Gaby:
|
| Your new patch gives two new errors on x86/linux:
|
| FAIL: 26_numerics/complex/13450.cc (test for excess errors)
| WARNING: 26_numerics/complex/13450.cc compilation failed to produce executable
| FAIL: 26_numerics/complex/pow.cc (test for excess errors)
| WARNING: 26_numerics/complex/pow.cc compilation failed to produce executable
Gloops, sorry for that. How this error escaped by testing is
unexplained to me.
| A sample from the log file:
|
| /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/complex: In function `std::complex<_Tp> std::log(conststd::complex<_Tp>&) [with _Tp = float]':
| /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/complex:891: instantiated from `std::complex<_Tp> std::pow(conststd::complex<_Tp>&, const_Tp&) [with _Tp = float]'
| /mnt/hd/src/gcc/libstdc++-v3/testsuite/26_numerics/complex/13450.cc:36: instantiated from `void test01_do(T, T) [with T = float]'
| /mnt/hd/src/gcc/libstdc++-v3/testsuite/26_numerics/complex/13450.cc:48: instantiated from here
| /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/complex:739: error: no matching function for call to `__complex_log(const float __complex__&)'
|
| Now, on line 736 of std_complex.h I see:
|
| /*
| inline __complex__ float
| __complex_log(__complex__ float __z) { return __builtin_clogf(__z); }
|
| inline __complex__ double
| __complex_log(__complex__ double __z) { return __builtin_clog(__z); }
|
| inline __complex__ long double
| __complex_log(const __complex__ long double& __z)
| { return __builtin_clog(__z); } */
|
| Is this supposed to be uncommented?
No, it is supposed to be in comment, awaiting for the resolution of
the "clog" issue I alluded to in message
http://gcc.gnu.org/ml/libstdc++/2004-05/msg00236.html
ans follow-ups (and I still have to send you several examples).
Until we resolve that issue. The line in the patch
template<typename _Tp>
inline complex<_Tp>
log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); }
should really have been
template<typename _Tp>
inline complex<_Tp>
log(const complex<_Tp>& __z) { return __complex_log(__z); }
without call to .__rep().
Sorry about that.
-- Gaby