This is the mail archive of the
mailing list for the GNU Fortran project.
Re: PR 36322/36463
- From: "Janus Weil" <jaydub66 at googlemail dot com>
- To: "Paul Richard Thomas" <paul dot richard dot thomas at gmail dot com>
- Cc: FX <fxcoudert at gmail dot com>, fortran at gcc dot gnu dot org, mikael dot morin at tele2 dot fr
- Date: Thu, 23 Oct 2008 23:33:27 +0200
- Subject: Re: PR 36322/36463
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=dgyBr8iZPASeaRWJxHbzTDOqCYhf9AQM1BnKPA5o5JI=; b=AZKSzVk6koTJoaRWCg1nfJN8VJ+fwWlzsXRCwpeCmT5efaV91qjqW1vF8KMECZ8yC2 eJjP2L70AmoUra8Se62lNe28dYyv37InXq8WYjNW/kQ5uKqXgMBkTxfg2PuQG/fsxnsK CbTlvr3xYmKem6dxMGq9wVKcO00wkf+obQPcU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=ARn/JK02N1DPpB/TVYl2EL1I4QspIhuQH0bo641nIpYO6AfMCHbx4Yyk5ZaOYmyJfq FwUtN1J8pv8cLs8fWVWgTdhj8zEI6er3o4C0Srs9pJiVxEqwT+8LOFqdPlW/Vus00OOV nXZhEilatfbMYfmQqi5jd816+Y7q1L8bJdM50=
- References: <126D8D60-04F9-44F1-AB3B-6C4EF5CC899C@gmail.com> <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
> 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.