Dear Tobias,

On 2011-11-01 22:33, Tobias Burnus wrote:
Regarding the tree-walking issue: I think it is a general issue which
could also affect other things. I really wonder why we haven't been
bitten by it before. However, it might be that we hit those problems and
fixed them by "re"-resolving symbols at later parts. My feeling is that
the issue occurs either only with vtab/vtree or at least also due to
those functions. However, I might be wrong as I do not quickly see which
of the tree-traversal callers can generate new trees.

I don't remember all this very clearly, but I think that the gfc_symbol::tlink field is intended for something like this, even though this is not very clear (at least to me) from the explanatory comment I quoted below. Anyway, I thought I might point this out, as it might help you getting things working since the problem it addresses at least appears similar:

  /* Change management fields.  Symbols that might be modified by the
     current statement have the mark member nonzero and are kept in a
     singly linked list through the tlink field.  Of these symbols,
     symbols with old_symbol equal to NULL are symbols created within
     the current statement.  Otherwise, old_symbol points to a copy of
     the old symbol.  */

  struct gfc_symbol *old_symbol, *tlink;

Cheers,
- Tobi

Reply via email to