aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 9a81401..fe2f43a 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -13502,7 +13502,11 @@ resolve_component (gfc_component *c, gfc_symbol *sym)
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. */