diff options
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 78cb9f0..7f6c699 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -2414,6 +2414,13 @@ gfc_check_pointer_assign (gfc_expr * lvalue, gfc_expr * rvalue) return FAILURE; } + if (attr.protected && attr.use_assoc) + { + gfc_error ("Pointer assigment target has PROTECTED " + "attribute at %L", &rvalue->where); + return FAILURE; + } + return SUCCESS; } |