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] Handle BT_CLASS as well as BT_DERIVED in trans-array.c


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


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