aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index f54affa..478a555 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -4407,6 +4407,20 @@ gfc_check_assign_symbol (gfc_symbol *sym, gfc_component *comp, gfc_expr *rvalue)
"may not be a procedure pointer", &rvalue->where);
return false;
}
+ if (attr.proc == PROC_INTERNAL)
+ {
+ gfc_error ("Internal procedure %qs is invalid in "
+ "procedure pointer initialization at %L",
+ rvalue->symtree->name, &rvalue->where);
+ return false;
+ }
+ if (attr.dummy)
+ {
+ gfc_error ("Dummy procedure %qs is invalid in "
+ "procedure pointer initialization at %L",
+ rvalue->symtree->name, &rvalue->where);
+ return false;
+ }
}
return true;