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: [RFC] Implementing ASSOCIATE


Am 08.05.2010 19:33, schrieb Daniel Kraft:
> that is a good point, stupid me didn't really think about it that way.
> But of course it is clear that for SELECT TYPE, you have to use a
> temporary pointer variable as Janus already wrote above to get the
> type casting behaviour.
>
> On the other hand, I still think that this is not what we should do
> for ASSOCIATE but rather use the gfc_expr replacement; in the case of
> ASSOCIATE, that will do and I think it's a "simpler" way and
> introduces not so much additional clobber in some sense.

I think one also could do a gfc_expr replacement for SELECT TYPE - one
just needs to update the "ts" type (i.e. in a TYPE IS / CLASS IS section
all assignment/argument checks need to "see" the right type and normal
accesses should access "class.$data" and not "class"). One can still
decide that the current pointer solution is better - but then one should
consider marking the temporary variable as restricted.

I do not see how many changes the first method requires and how clumsy
it gets, but I do not see a road block - thus one should still consider
to move SELECT TYPE over to a expr replacement.

Tobias


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