+2016-11-23 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/78297
+ * trans-common.c (finish_equivalences): Do not dereference a NULL pointer.
+
2016-11-23 Janus Weil <janus@gcc.gnu.org>
Backport from trunk
{
c = gfc_get_common_head ();
/* We've lost the real location, so use the location of the
- enclosing procedure. */
- c->where = ns->proc_name->declared_at;
+ enclosing procedure. If we're in a BLOCK DATA block, then
+ use the location in the sym_root. */
+ if (ns->proc_name)
+ c->where = ns->proc_name->declared_at;
+ else if (ns->is_block_data)
+ c->where = ns->sym_root->n.sym->declared_at;
strcpy (c->name, z->module);
}
else