+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
/* 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)
{
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
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);