[fortran, patch] LEADZ and TRAILZ for integer(kind=16)

Tobias Burnus burnus@net-b.de
Tue Sep 7 16:12:00 GMT 2010


  On 09/07/2010 10:16 AM, FX wrote:
> Attached patch improves the code generated for the LEADZ and TRAILZ intrinsics. For integer(kind=16), which is larger than C long long type, no builtin is present in the middle-end. Currently, we called library clz128/ctz128 functions in libgfortran.
>
> The question I have is: what should be done with the libgfortran functions? I think, for backward compatibility, we need to keep them, but I may be wrong.

Yes, they have to remain their until we break the backward 
compatibility, which is planned to do when the new array descriptor is 
committed. I have added it to the items at 
http://gcc.gnu.org/wiki/LibgfortranAbiCleanup

> Bootstrapped and regtested on x86_64-linux. OK to commit?

OK. Thanks for the patch. (I saw that the existing leadz_trailz_2.f90 
checks for the correctness.)

Tobias



More information about the Fortran mailing list