This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]