[gfortran,patch] Fix handling of optional args to MIN and MAX intrinsics

FX Coudert fxcoudert@gmail.com
Wed Jul 4 00:41:00 GMT 2007


Attached patch fixes the handling of optional arguments to the MIN  
and MAX intrinsics : their first two arguments are mandatory, and all  
following ones are optional. The devil is in the details, and the  
details are in the PR and the link to the comp.lang.fortran thread  
about this.

What this patch does is: 1. check that the first two arguments are  
provided ; 2. for each following arg, if it is an optional arg, only  
use it for comparison if it is actually present. I've have the patch  
for some time, but it built on top of Lee's trans-intrinsic.c patch,  
and since we have no fresh news I decided it was time to commit it  
nonetheless (thanks Joost for the friendly reminder!).

Regtested on x86_64-linux, OK for mainline ?

FX



:ADDPATCH fortran:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: minmax_optional.ChangeLog
Type: application/octet-stream
Size: 417 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070704/2f7d6d9e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: minmax_optional.diff
Type: application/octet-stream
Size: 5680 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070704/2f7d6d9e/attachment-0001.obj>


More information about the Fortran mailing list