[gfortran,patch] Another (possibly last?) LBOUND and UBOUND fix

FX Coudert fxcoudert@gmail.com
Sat Nov 4 17:20:00 GMT 2006


Hi all,

Attached patch fixes both the simplification and translation for  
intrinsic UBOUND/LBOUND to get correct results in all cases I could  
imagine. This clears completely PR 29489 & 29712. The logic behind  
both patches is straightforward, and the only thing noteworthy is  
that {L,U}BOUND simplification provided by this patch is a bit  
pessimistic: there are a few more cases that we should be able to  
simplify here, but for thoses cases the folding of code emitted will  
take sufficient to not need runtime evaluation.

I'm in no position to regtest this patch, being on the road with a  
very slow laptop. I bootstrapped it, and regtested only {L,U}BOUND- 
related testcases. Moreover, the patch is confined to two routines,  
so I'm confident it doesn't break other things. Nonetheless, I'd  
appreciate if a reviewer could give it a spin.

OK for mainline, 4.2 and 4.1?

FX



:ADDPATCH fortran:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ubound_lbound_4.ChangeLog
Type: application/octet-stream
Size: 483 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061104/391388c2/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ubound_lbound_4.diff
Type: application/octet-stream
Size: 12310 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061104/391388c2/attachment-0001.obj>


More information about the Fortran mailing list