This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Enhance testsuite c-torture test
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: davem at redhat dot com (David S. Miller)
- Cc: gcc-patches at gcc dot gnu dot org, law at redhat dot com
- Date: Thu, 16 May 2002 17:02:31 -0400 (EDT)
- Subject: Re: Enhance testsuite c-torture test
> > It probably is a real bug in hppa-hpux11 target.
Yup.
> Maybe. The test is causing a SIGFPE arithmetic exception.
>
> ...
> #1 0x7250 in _U_Qfcnvfxt_quad_to_dbl ()
> #2 0x5048 in ld2ull (d=9223372036854775808)
> ...
>
> We go into quadlib.c and we discover:
>
> /* HP only has signed conversion in library, so need to synthesize an
> unsigned version */
> unsigned int
> _U_Qfcnvfxt_quad_to_usgl(long double a)
> {
> extern long long _U_Qfcnvfxt_quad_to_dbl (long double a);
> return (unsigned int) _U_Qfcnvfxt_quad_to_dbl (a);
> }
>
> I'm assuming that the call to the HP library got converted into
> a sibling call.
>
> Anyways, we're calling it with (long double)(1 << 63) as the argument.
We are not actually using _U_Qfcnvfxt_quad_to_usgl here but we need
to do something similar for long double to unsigned long long.
_U_Qfcnvfxt_quad_to_dbl is only for signed conversions but we try to
use for the unsigned case. Looking at what the HP compiler does, I
see it uses _U_Qfcnvfxt_quad_to_quad.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)