From 4672f86ad056e95dbdc570901efd8270056560a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Schl=C3=BCter?= Date: Wed, 15 Sep 2004 13:12:52 +0000 Subject: re PR fortran/16485 (Private subroutines from different modules collide during linking.) 2004-09-15 Tobias Schlueter 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 --- gcc/fortran/module.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc/fortran/module.c') diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 5fabcb0..c5a94d2 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -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) -- cgit v1.1