diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-25 15:01:16 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-25 15:01:16 +0000 |
commit | c40fca439178eeda0b77b254f9db7ad402d5f301 (patch) | |
tree | 865291e5e807cb4b828220df3729141d099a64a7 /gcc/fortran/expr.c | |
parent | ab26248eabc88732e02205c13faa457f0e027605 (diff) | |
download | gcc-c40fca439178eeda0b77b254f9db7ad402d5f301.tar.gz |
2008-09-25 Tobias Burnus <burnus@net-b.de>
PR fortran/37504
* expr.c (gfc_check_pointer_assign): Allow assignment of
protected pointers.
* match.c (gfc_match_assignment,gfc_match_pointer_assignment):
Remove unreachable code.
2008-09-25 Tobias Burnus <burnus@net-b.de>
PR fortran/37504
* gfortran.dg/protected_7.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140663 138bc75d-0d04-0410-961f-82ee72b054a4
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 e15412adfbe..7b741b88050 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); |