2017-11-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83021
* resolve.c (resolve_component): Only escape for use assciated
vtypes if the current namespace has no proc_name and is most
particularly block data.
From-SVN: r255202
+2017-11-28 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/83021
+ * resolve.c (resolve_component): Only escape for use assciated
+ vtypes if the current namespace has no proc_name and is most
+ particularly block data.
+
2017-11-28 Jakub Jelinek <jakub@redhat.com>
* trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR
if (c->attr.artificial)
return true;
- if (sym->attr.vtype && sym->attr.use_assoc)
+ /* Do not allow vtype components to be resolved in nameless namespaces
+ such as block data because the procedure pointers will cause ICEs
+ and vtables are not needed in these contexts. */
+ if (sym->attr.vtype && sym->attr.use_assoc
+ && sym->ns->proc_name == NULL)
return true;
/* F2008, C442. */