[FORTRAN PATCH]: Improved integer SIGN intrinsic (& bug-fix)

FX Coudert fxcoudert@gmail.com
Sat Jan 20 13:02:00 GMT 2007


> 2007-01-19  Roger Sayle  <roger@eyesopen.com>
>
>         * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
>         implementation for the SIGN intrinsic with integral operands.
>         (gfc_conv_intrinsic_minmax): Fix whitespace.

OK for 4.3 and 4.2, as is. Please also include in your commit the  
attached testcase, that includes Brooks' testcase and Steve's  
comment, as well as tests for the largest integer value of each  
integer kind.

For 4.1, it would be better to only add a call to gfc_evaluate_now.  
If you don't intend to do it, could you file a PR so that it doesn't  
get lost?

FX


-------------- next part --------------
A non-text attachment was scrubbed...
Name: sign_1.f90
Type: application/octet-stream
Size: 2147 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070120/0fc577a4/attachment.obj>
-------------- next part --------------



More information about the Fortran mailing list