diff options
author | Tobias Burnus <burnus@net-b.de> | 2008-09-25 17:01:16 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2008-09-25 17:01:16 +0200 |
commit | 3dcc3ef2a12a9e0965dd80d7c32a26bda892d861 (patch) | |
tree | 865291e5e807cb4b828220df3729141d099a64a7 /gcc/fortran/expr.c | |
parent | 116612b99423703dfdb01a531e42d1444af75e14 (diff) | |
download | gcc-3dcc3ef2a12a9e0965dd80d7c32a26bda892d861.zip gcc-3dcc3ef2a12a9e0965dd80d7c32a26bda892d861.tar.gz gcc-3dcc3ef2a12a9e0965dd80d7c32a26bda892d861.tar.bz2 |
re PR fortran/37504 (Wrongly rejects: unprotected_pointer => protected_pointer)
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.
From-SVN: r140663
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); |