https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67419

--- Comment #10 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot 
Uni-Bielefeld.DE> ---
> --- Comment #9 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot
> Uni-Bielefeld.DE> ---
>> --- Comment #7 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> 
>> ---
>> (In reply to r...@cebitec.uni-bielefeld.de from comment #5)
>>> If I drop the __builtin_ and include <stdio.h> and <math.h> instead, I
>>> get the expected
>>
>> Then the math.h header is playing tricks and GCC is not aware. This need to 
>> be
>> fixed in the solaris back-end (the same sort of thing happened with darwin in
>> the past, see darwin_patch_builtin in gcc/config/darwin.c).
>>
>> Best bet is to check in math.h how sqrtl() is defined. And then check the
>> assembly code for both the __builtin_sqrtl() and the header-defined sqrtl().
>
> That's what I'll do next, together with comparing S11 and S12 and -O0
> with -O1.

It's definitively a Solaris 12 bug: gcc creates identical code for the
__builtin_sqrtl case between Solaris 11 and 12.  It works on S11, but
fails on S12.  If I run the S12 binary to an S11 machine, it runs there
just fine.

I'll check with my contacts.

        Rainer

Reply via email to