2008-09-01 Daniel Kraft <d@domob.eu>
+ PR fortran/37193
+ * module.c (read_module): Initialize use_only flag on used symbols.
+
+2008-09-01 Daniel Kraft <d@domob.eu>
+
* gfc-internals.texi (F2003 OOP), (Type-bound Procedures): New chapter
and section to document the internals of type-bound procedures.
(gfc_expr): Document EXPR_COMPCALL.
st = gfc_find_symtree (gfc_current_ns->sym_root, name);
/* Delete the symtree if the symbol has been added by a USE
- statement without an ONLY(11.3.2). Remember that the rsym
+ 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.*/
+ this case. */
if (st && (only_flag || info->u.rsym.renamed)
&& !st->n.sym->attr.use_only
&& !st->n.sym->attr.use_rename
if (strcmp (name, p) != 0)
sym->attr.use_rename = 1;
+ /* We need to set the only_flag here so that symbols from the
+ same USE...ONLY but earlier are not deleted from the tree in
+ the gfc_delete_symtree above. */
+ sym->attr.use_only = only_flag;
+
/* Store the symtree pointing to this symbol. */
info->u.rsym.symtree = st;
+2008-09-01 Daniel Kraft <d@domob.eu>
+
+ PR fortran/37193
+ * gfortran.dg/use_rename_4.f90: New test.
+ * gfortran.dg/use_rename_5.f90: New test.
+
2008-09-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37305