[patch, fortran] Handle BT_CLASS as well as BT_DERIVED in trans-array.c
Tobias Burnus
burnus@net-b.de
Fri Dec 3 09:19:00 GMT 2010
Hello Thomas,
> the attached patch fixes a few instances where we only handled
> BT_DERIVED without taking care of BT_CLASS too. Other files should
> probably be audited for this, as well.
I concur that other files should be audit - we already had a couple of
bugs due to this. Side remark: With the current scheme, we will get in
trouble as soon as we have unlimited polymorphism as then the relation
BT_CLASS => BT_DERIVED no longer holds.
Additionally, one needs to be careful whether one has the class
container or the actual derived type. For some checks, looking at the
class container - instead of the derived type it wraps - will lead to
wrong code. I think the current patch is OK as the check for allocatable
components, which should also work for BT_CLASS. However, I hope that
Janus can confirm it.
Other than that, the patch looks OK and I think it can be committed.
Tobias
More information about the Fortran
mailing list