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: Need advice on PR 19929


Steve Kargl wrote:
> Well, I think I have determined at least a working hacking.
> I don't know if there is a better way to this, but if I do
> 
>    if (expr->symtree->n.sym->attr.dimension 
>        && expr->symtree->n.sym->ts.derived == NULL)
> 
> then I execute the else{} branch.

The correct check for a non-derived type is
   expr->symtree->n.sym->ts.type != BT_DERIVED

Looking over the code in trans_deallocate, I'm wondering why we don't look
through the gfc_ref-chain, IOW how do we make sure that we're dealing with the
component when building the call?  What doesn't look right to me is that the
component being deallocated is not of a derived type, so if we were doing the
right thing, a check for a derived type wouldn't make a difference.

- Tobi


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