This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [fortran-dev, patch] PR29600 - add optional kind arguments (F2003)


On Monday 23 March 2009 10:29:50 Janne Blomqvist wrote:
> On Mon, Mar 23, 2009 at 11:06, Daniel Franke <franke.daniel@gmail.com> 
wrote:
> > Attached patch adds optional kind arguments to MINLOC, MAXLOC and SHAPE
> > intrinsics.
> >
> > Bootstrapped and regression tested on i686-pc-linux-gnu.
> > Ok for dev and 4.5?
>
> IMHO it would be better to have the library return the result as type
> index_type (typedef for ssize_t in the library, I don't remember the
> name for that in the frontend; anyway the same type as used in array
> descriptors for lbound/ubound/stride), and have the frontend do a
> typecast. That way we avoid bloating the library with zillions of
> functions. It won't be any slower either, since the library functions
> must operate on the array descriptors with index_type anyway, this
> would just move the typecast from the library to the frontend.
>
> See also http://gcc.gnu.org/wiki/LibgfortranAbiCleanup

Janne,

even better would be to inline them, at least minloc/maxloc (PR31067).

I think it doesn't hurt to add more of the same until something is done about 
it, be it casting or inlining, as there is no additional burden for a future 
implementation of either. The patch as-is might not be perfect in this 
regard, but at least some progress can be made ...

Cheers

	Daniel


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