Commit 4672f86a by Tobias Schlüter Committed by Paul Brook

re PR fortran/16485 (Private subroutines from different modules collide during linking.)

2004-09-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>

	PR fortran/16485
	* module.c (write_symbol): Don't fill in module name here.
	(write_symbol0): Fill in here instead.
testsuite/
	* gfortran.dg/same_name_1.f90: New test.

From-SVN: r87551
parent 1a141fe1
2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/16485
* module.c (write_symbol): Don't fill in module name here.
(write_symbol0): Fill in here instead.
2004-09-14 Kazu Hirata <kazu@cs.umass.edu> 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
* data.c, decl.c, f95-lang.c, gfortran.h, match.c, * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
......
...@@ -3198,9 +3198,6 @@ write_symbol (int n, gfc_symbol * sym) ...@@ -3198,9 +3198,6 @@ write_symbol (int n, gfc_symbol * sym)
mio_integer (&n); mio_integer (&n);
mio_internal_string (sym->name); mio_internal_string (sym->name);
if (sym->module[0] == '\0')
strcpy (sym->module, module_name);
mio_internal_string (sym->module); mio_internal_string (sym->module);
mio_pointer_ref (&sym->ns); mio_pointer_ref (&sym->ns);
...@@ -3226,6 +3223,8 @@ write_symbol0 (gfc_symtree * st) ...@@ -3226,6 +3223,8 @@ write_symbol0 (gfc_symtree * st)
write_symbol0 (st->right); write_symbol0 (st->right);
sym = st->n.sym; sym = st->n.sym;
if (sym->module[0] == '\0')
strcpy (sym->module, module_name);
if (sym->attr.flavor == FL_PROCEDURE && sym->attr.generic if (sym->attr.flavor == FL_PROCEDURE && sym->attr.generic
&& !sym->attr.subroutine && !sym->attr.function) && !sym->attr.subroutine && !sym->attr.function)
......
2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/16485
* gfortran.dg/same_name_1.f90: New test.
2004-09-15 Diego Novillo <dnovillo@redhat.com> 2004-09-15 Diego Novillo <dnovillo@redhat.com>
* gcc.c-torture/execute/pr17252.c: Fix thinko. Don't * gcc.c-torture/execute/pr17252.c: Fix thinko. Don't
......
! { dg-do assemble }
module n
private u
contains
subroutine u
end subroutine u
end module n
module m
private :: u
contains
subroutine u
end subroutine u
end module m
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment