Commit 6dcab507 by Mikael Morin

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
parent 18696c74
2015-10-04 Mikael Morin <mikael@gcc.gnu.org>
* 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 <louis.krupp@zoho.com>
PR fortran/62242
......
......@@ -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);
......
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