This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51578] [4.3/4.4/4.5/4.6/4.7 Regression]
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Dec 2011 14:11:52 +0000
- Subject: [Bug fortran/51578] [4.3/4.4/4.5/4.6/4.7 Regression]
- Auto-submitted: auto-generated
- References: <bug-51578-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51578
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.3
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-12-16 14:11:52 UTC ---
The problem is the following in module.c's read_module:
/* Delete the symtree if the symbol has been added by a USE
statement without an ONLY(11.3.2). Remember that the rsym
will be the same as the symbol found in the symtree, for
this case. */
if (st && (only_flag || info->u.rsym.renamed)
&& !st->n.sym->attr.use_only
&& !st->n.sym->attr.use_rename
&& info->u.rsym.sym == st->n.sym)
gfc_delete_symtree (&gfc_current_ns->sym_root, name);
The goal is to get it working for:
use mod1, oxx=>axx
use mod2
and
use mod2, oxx=>axx
use mod1
and with the two lines flipped. But also for combinations such as:
use mod1
use mod2, oxx=>axx
use mod1, only :
use mod2
But avoid the import of "axx" for:
use mod2, oxx=>axx
use mod2
and for having twice "mod1" and for having the line order flipped.
I think one way would be to revamp the import procedure by reading first all
USE lines - consolidating the rename/only information for a module and then
start reading the modules.
(I think host-association of use-associated variables mixed with use statements
should not cause problems, but one should check.