https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84504
--- Comment #7 from janus at gcc dot gnu.org ---
The following patch fixes the problem and shows no regressions on
x86_64-linux-gnu:
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 51552a79cde..4e95f243661 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -4321,7 +4321,7 @@ gfc_check_assign_symbol (gfc_symbol *sym, gfc_component
*comp, gfc_expr *rvalue)
if (!r)
return r;
- if (pointer && rvalue->expr_type != EXPR_NULL)
+ if (pointer && rvalue->expr_type != EXPR_NULL && !proc_pointer)
{
/* F08:C461. Additional checks for pointer initialization. */
symbol_attribute attr;