From 6e7ff326cfc495b24cb815cc2b539c6bc139c8ea Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Sat, 17 Jan 2009 09:43:57 +0000 Subject: re PR fortran/38657 (PUBLIC/PRIVATE Common blocks) 2009-01-17 Paul Thomas PR fortran/38657 * module.c (write_common_0): Revert patch of 2009-01-10. 2009-01-17 Paul Thomas PR fortran/38657 * gfortran.dg/module_commons_3.f90: Remove From-SVN: r143459 --- gcc/fortran/module.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'gcc/fortran/module.c') diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 44ad3758f84..3ae59294f13 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -4337,7 +4337,6 @@ write_common_0 (gfc_symtree *st) { gfc_common_head *p; const char * name; - const char * lname; int flags; const char *label; struct written_common *w; @@ -4350,9 +4349,6 @@ write_common_0 (gfc_symtree *st) /* We will write out the binding label, or the name if no label given. */ name = st->n.common->name; - - /* Use the symtree(local)name to check if the common has been written. */ - lname = st->name; p = st->n.common; label = p->is_bind_c ? p->binding_label : p->name; @@ -4360,7 +4356,7 @@ write_common_0 (gfc_symtree *st) w = written_commons; while (w) { - int c = strcmp (lname, w->name); + int c = strcmp (name, w->name); c = (c != 0 ? c : strcmp (label, w->label)); if (c == 0) write_me = false; @@ -4388,7 +4384,7 @@ write_common_0 (gfc_symtree *st) /* Record that we have written this common. */ w = XCNEW (struct written_common); - w->name = lname; + w->name = p->name; w->label = label; gfc_insert_bbt (&written_commons, w, compare_written_commons); } -- cgit v1.2.1