long double on ppc-darwin
Geoff Keating
geoffk@geoffk.org
Sun Dec 18 12:28:00 GMT 2005
On 17/12/2005, at 5:56 PM, Mike Stump wrote:
> On Dec 17, 2005, at 6:08 AM, FX Coudert wrote:
>
>> I'm trying to understand the gfortran failure
>> large_real_kind_2.F90 on ppc-darwin7.9, which can be reduced to:
>>
>> $ cat large_real_kind_2.F90
>> real(kind=16) :: x
>> real(8) :: y
>>
>> x = 1
>> y = x
>> x = cos (x)
>> y = cos (y)
>> print *, x, y, y-x
>>
>> end
>> $ ./usr/local/gfortran/bin/gfortran -g large_real_kind_2.F90 && ./
>> a.out
>> 0.5403023058681397650104827000000 0.540302305868140
>> 1.9841535727186827560257490000000E-0004
>>
>> But I can't make a C testcase for that. Is "long double" supposed
>> to be usable on ppc-darwin7.9 ?
>>
>
> The trick is that things like sinl have a linker name like _sinl
> $LDBL128. This is to enable 8 byte long doubles to continue to
> work, and _sin is an 8 byte long double routine. Don't ask.
> Binary compatibility is so very much fun.
>
> Since Geoff invented the scheme, I'm sure he had an idea of how he
> thought it should work for Fortran. My guess would be that gcc has
> to pick the right library names internally for all languages, thus,
> obviating the need for the asm () fun remap the names in C.
Yes; to do this right, GCC's builtins need to know about the
different names.
If you're interested in fixing this, I can tell you what to do...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2410 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20051218/70825c0d/attachment.p7s>
More information about the Gcc
mailing list