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: [Patch, Fortran] SELECT TYPE with associate-name


Janus Weil wrote:
Btw: This associate-name feature of SELECT TYPE is practically
identical to the ASSOCIATE statement, which means that the latter
could be implemented with pretty much the same technique (plus some
parsing bits). So, if people think that this is still ok as an
early-stage-3 project, I could also implement ASSOCIATE (if not, I
will start fixing some of the OOP PRs).

I thought about ASSOCIATE a little before I decided to implement BLOCK, and my opinion is that ASSOCIATE is probably a little more complicated, unfortunatly. If I understand it correctly, you also can give variables an associate-name and use it later to set the variable, rather than just reading some value.


So in this case I think you either need to add a copying-back at the end or do the association with pointers. I think we should also care about performance when associate-naming large arrays, so that this ideally goes without temporaries where possible.

My thoughts were to introduce a local variable just as you did for associating names to values (like function results or other calculations) but when the target is a EXPR_VARIABLE, copy the expression and substitute it directly at compile time for the associate-name; but I did not think really thoroughly about it, just enough to decide that BLOCK was probably easier (and I think BLOCK a little more useful).

Regarding whether to do this now or wait for next stage 1, I think we should in general wait as this is not really a bugfix; on the other hand, for me it would also be ok to do it quickly now, if others are also of this opinion.

BTW, as I did BLOCK, I would also volunteer to work on ASSOCIATE (next stage 1) if you want to work on other stuff then and bugfixing now.

Yours,
Daniel

--
Done:  Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri


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