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
This commit is contained in:
Tobias Schlüter 2004-09-15 13:12:52 +00:00 committed by Paul Brook
parent 1a141fe10a
commit 4672f86ad0
4 changed files with 26 additions and 3 deletions

View file

@ -1,3 +1,9 @@
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>
* data.c, decl.c, f95-lang.c, gfortran.h, match.c,

View file

@ -3198,9 +3198,6 @@ write_symbol (int n, gfc_symbol * sym)
mio_integer (&n);
mio_internal_string (sym->name);
if (sym->module[0] == '\0')
strcpy (sym->module, module_name);
mio_internal_string (sym->module);
mio_pointer_ref (&sym->ns);
@ -3226,6 +3223,8 @@ write_symbol0 (gfc_symtree * st)
write_symbol0 (st->right);
sym = st->n.sym;
if (sym->module[0] == '\0')
strcpy (sym->module, module_name);
if (sym->attr.flavor == FL_PROCEDURE && sym->attr.generic
&& !sym->attr.subroutine && !sym->attr.function)

View file

@ -1,3 +1,8 @@
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>
* gcc.c-torture/execute/pr17252.c: Fix thinko. Don't

View file

@ -0,0 +1,13 @@
! { 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