This is the mail archive of the 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: PR 36322/36463

> The problem originates from symbols with the names "@0" and "@1". It
> seems like these are generated during the reading of the module file
> to replace "x" and "size". This happens in read_cleanup (module.c).
> The @-names are generated by gfc_get_unique_symtree, and are supposed
> to represent "hidden" symbols. Now I guess one should somehow mark
> them as "non-hidden", e.g. by setting the rsym.referenced field, so
> that they can keep their proper names.

It seems to me that the reason for this error is that the array spec
is not correctly reconstructed when reading the module file. I'm not
sure if this is actually supposed to work, or if it was just never
needed up to now.

To be precise the problem concerns the symtrees. The expression nodes
(e.g. EXPR_VARIABLE) for the array bounds are read correctly, but the
symtrees in the expressions are missing after the module file has been
read. Therefore it appears as if the symbol (e.g. the formal arg "x")
is not referenced, so it is "hidden" (being renamed to "@0").

I have to admit though, that I haven't understood the mechanisms of
reading and writing modules files in all details yet. It would be nice
if someone could check my claims and confirm the root of the problem.

Anyway, maybe one can already commit the rest of the patch, so that at
least the ICEs are silenced and the regression in PR36463 is fixed,
leaving the module stuff for a follow-up patch.


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