diff options
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index e15412a..7b741b8 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3076,7 +3076,8 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) return FAILURE; } - if (attr.is_protected && attr.use_assoc) + if (attr.is_protected && attr.use_assoc + && !(attr.pointer || attr.proc_pointer)) { gfc_error ("Pointer assignment target has PROTECTED " "attribute at %L", &rvalue->where); |