From: Mikael Morin Date: Sun, 4 Oct 2015 12:07:50 +0000 (+0000) Subject: Factor access to the common block head symbol X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6dcab5071487cfb42b4414d08c517210fac94d00;p=gcc.git Factor access to the common block head symbol * resolve.c (resolve_common_vars): Move access to the common block's head symbol inside the function. (resolve_common_blocks, resolve_types): Update callers. From-SVN: r228456 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1e9435550f5..014d67c621f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2015-10-04 Mikael Morin + + * resolve.c (resolve_common_vars): Move access to the common + block's head symbol inside the function. + (resolve_common_blocks, resolve_types): Update callers. + 2015-10-01 Louis Krupp PR fortran/62242 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 5822cb0e435..614d8a99072 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -912,9 +912,9 @@ resolve_entries (gfc_namespace *ns) /* Resolve common variables. */ static void -resolve_common_vars (gfc_symbol *sym, bool named_common) +resolve_common_vars (gfc_common_head *common_block, bool named_common) { - gfc_symbol *csym = sym; + gfc_symbol *csym = common_block->head; for (; csym; csym = csym->common_next) { @@ -972,7 +972,7 @@ resolve_common_blocks (gfc_symtree *common_root) if (common_root->right) resolve_common_blocks (common_root->right); - resolve_common_vars (common_root->n.common->head, true); + resolve_common_vars (common_root->n.common, true); /* The common name is a global name - in Fortran 2003 also if it has a C binding name, since Fortran 2008 only the C binding name is a global @@ -15289,7 +15289,7 @@ resolve_types (gfc_namespace *ns) resolve_entries (ns); - resolve_common_vars (ns->blank_common.head, false); + resolve_common_vars (&ns->blank_common, false); resolve_common_blocks (ns->common_root); resolve_contained_functions (ns);