This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, Fortran, RFC] Implement library side of {MIN,MAX}{LOC,VAL} with character arguments


Hello, 

sorry for the slow (yet faster than anyone else ;) review.

I'm a bit surprised that there is no resolve.c or iresolve.c change.
intrinsic.c may cerainly need some modification too.
Same goes for trans-intrinsic.c, but perhaps resolution time support is 
sufficient in the library call case.
Those are possible causes for your ICEs.

About the library code, I don't understand why you are changing ifunction.m4 
and at the same time adding a new ifunction-s.m4 providing (it seems) the same 
set of macros. I would think that either is necessary, not both. And sharing 
is better if possible.
I have the same concern about the {min,max}{loc{0,1},val}-s which should be 
shared with their non-character counterparts if possible, though in that case 
they are not that big, so it's perhaps not worth bothering too much.

Now onto the inline versions. Ahem! For those you can start looking at the 
existing minmax{loc,val} code, and if you are not running away as fast as you 
can within a couple of seconds, you can probably manage to do something there 
(adding code step by step and looking at the dump every time will certainly 
help). The different cases to be handled (with the different algorithms) are 
described in the comments before the functions, and some more comments are 
added to not get lost along a code, which remains, despite that, painfully big 
for something conceptually simple such as{min,max}{loc,val}.
Good luck.
I can certainly help on very specific points, but writing the whole code and 
testing will be too time consuming.

Mikael


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]